Skip to content

Commit

Permalink
Add 9mm Pistol Model (#6)
Browse files Browse the repository at this point in the history
* Add Model definitions for 9mm Pistols

Signed-off-by: macinsight <[email protected]>

* Add Model definitions for Pistol_9mm

Signed-off-by: macinsight <[email protected]>

* Add Parts definitions for Pistol_9mm

Signed-off-by: macinsight <[email protected]>

* Add language definitions for Pistol_9mm

Signed-off-by: macinsight <[email protected]>

* Add fixing definitions for Pistol_9mm

Signed-off-by: macinsight <[email protected]>

* Add parts definitions for Pistol_9mm

Signed-off-by: macinsight <[email protected]>

---------

Signed-off-by: macinsight <[email protected]>
  • Loading branch information
macinsight authored Nov 26, 2023
1 parent e25ddde commit 4fad76b
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ CoavinsFirearms.AddOrReplaceModel(
'Pistol_45acp'
, { 'PistolReceiver_45acp', 'PistolSlide_45acp'}
, 'PistolReceiver_45acp')

CoavinsFirearms.AddOrReplaceModel(
'Pistol_9mm'
, { 'PistolReceiver_9mm', 'PistolSlide_9mm'}
, 'PistolReceiver_9mm')

CoavinsFirearms.AddOrReplaceModel(
'Shotgun_10g'
, { 'ShotgunReceiver_10g', 'ShotgunBarrel_10g' }
Expand All @@ -65,4 +71,3 @@ CoavinsFirearms.AddOrReplaceModel(
, { 'PistolReceiver_380acp', 'PistolSlide_380acp'}
, 'PistolReceiver_380acp')


Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,23 @@ this.parts.PistolSlide_45acp.CombinesWith = 'PistolReceiver_45acp'
this.parts.PistolSlide_45acp.Holds = { 'PistolBarrel_45acp' }
this.parts.PistolSlide_45acp.ConditionLowerChance = 2 -- 1/2
this.parts.PistolSlide_45acp.ConditionMax = 20
this.parts.PistolBarrel_9mm = {}
this.parts.PistolBarrel_9mm.InsertsInto = 'PistolSlide_9mm'
this.parts.PistolBarrel_9mm.ConditionLowerChance = 3 -- 1/3
this.parts.PistolBarrel_9mm.ConditionMax = 20
this.parts.PistolReceiver_9mm = {}
this.parts.PistolReceiver_9mm.CombinesWith = 'PistolSlide_9mm'
this.parts.PistolReceiver_9mm.ConditionLowerChance = 1 -- 100%
this.parts.PistolReceiver_9mm.ConditionMax = 20
this.parts.PistolSlide_9mm = {}
this.parts.PistolSlide_9mm.CombinesWith = 'PistolReceiver_9mm'
this.parts.PistolSlide_9mm.Holds = { 'PistolBarrel_9mm' }
this.parts.PistolSlide_9mm.ConditionLowerChance = 2 -- 1/2
this.parts.PistolSlide_9mm.ConditionMax = 20
this.parts.PistolBarrel_9mm = {}
this.parts.PistolBarrel_9mm.InsertsInto = 'PistolSlide_9mm'
this.parts.PistolBarrel_9mm.ConditionLowerChance = 3 -- 1/3
this.parts.PistolBarrel_9mm.ConditionMax = 20
this.parts.PistolBarrel_45acp = {}
this.parts.PistolBarrel_45acp.InsertsInto = 'PistolSlide_45acp'
this.parts.PistolBarrel_45acp.ConditionLowerChance = 3 -- 1/3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ ItemName_EN = {
ItemName_coavinsfirearms.PistolSlide_22lr = "Pistol Slide (.22LR)",
ItemName_coavinsfirearms.PistolBarrel_22lr = "Pistol Barrel (.22LR)",
ItemName_coavinsfirearms.PistolReceiver_45acp = "Pistol Frame (.45 ACP)",
ItemName_coavinsfirearms.PistolSlide_9mm = "Pistol Slide (9mm)",
ItemName_coavinsfirearms.PistolBarrel_9mm = "Pistol Barrel (9mm)",
ItemName_coavinsfirearms.PistolReceiver_9mm = "Pistol Frame (9mm)",
ItemName_coavinsfirearms.PistolSlide_45acp = "Pistol Slide (.45 ACP)",
ItemName_coavinsfirearms.PistolBarrel_45acp = "Pistol Barrel (.45 ACP)",
ItemName_coavinsfirearms.ShotgunReceiver_10g = "Shotgun Receiver (10g)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module coavinsfirearms {
imports {
Base
}

fixing Fix PistolReceiver_9mm Welding
{
Require : PistolReceiver_9mm,
GlobalItem : BlowTorch=2,
ConditionModifier : 1.2,

Fixer : SmallSheetMetal; MetalWelding=3,
Fixer : ScrapMetal; MetalWelding=1,
}

fixing Fix PistolReceiver_9mm
{
Require : PistolReceiver_9mm,
ConditionModifier : 1,

Fixer : DuctTape=2; Aiming=4,
Fixer : Scotchtape=3; Aiming=2,
}

fixing Fix PistolSlide_9mm Welding
{
Require : PistolSlide_9mm,
GlobalItem : BlowTorch=2,
ConditionModifier : 1.2,

Fixer : SmallSheetMetal; MetalWelding=3,
Fixer : ScrapMetal; MetalWelding=1,
}

fixing Fix PistolBarrel_9mm Welding
{
Require : PistolBarrel_9mm,
GlobalItem : BlowTorch=5,
ConditionModifier : 1.2,

Fixer : SmallSheetMetal=2; MetalWelding=8,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module coavinsfirearms {
imports {
Base
}

item PistolReceiver_9mm {
DisplayName = Pistol Frame (9mm),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolReceiver,
Weight = 0.4,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item PistolSlide_9mm {
DisplayName = Pistol Slide (9mm),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolSlide,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Paperclip,
}

item PistolBarrel_9mm {
DisplayName = Pistol Barrel (9mm),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolBarrel,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Razor_Ground,
}
}

0 comments on commit 4fad76b

Please sign in to comment.