Skip to content

Commit

Permalink
add 44cal (#10)
Browse files Browse the repository at this point in the history
* Add model def for pistol_44cal

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

* Add helper defs for coavins#56

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

* Add translations for coavins#56

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

* Add fixing defs for coavins#56

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

* Add item defs for coavins#56

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

* Assign Model to firearms

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

---------

Signed-off-by: macinsight <[email protected]>
  • Loading branch information
macinsight authored Nov 26, 2023
1 parent 202da01 commit 0e562de
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ CoavinsFirearms.AddOrReplaceModel(
'Revolver_357'
, { 'RevolverReceiver_357', 'RevolverCylinder_357' }
, 'RevolverReceiver_357')
CoavinsFirearms.AddOrReplaceModel(
'Pistol_44cal'
, { 'PistolReceiver_44cal', 'PistolSlide_44cal'}
, 'PistolReceiver_44cal')
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,19 @@ this.parts.RevolverCylinder_357 = {}
this.parts.RevolverCylinder_357.CombinesWith = 'RevolverReceiver_357'
this.parts.RevolverCylinder_357.ConditionLowerChance = 3
this.parts.RevolverCylinder_357.ConditionMax = 20
this.parts.PistolReceiver_44cal = {}
this.parts.PistolReceiver_44cal.CombinesWith = 'PistolSlide_44cal'
this.parts.PistolReceiver_44cal.ConditionLowerChance = 1 -- 100%
this.parts.PistolReceiver_44cal.ConditionMax = 20
this.parts.PistolSlide_44cal = {}
this.parts.PistolSlide_44cal.CombinesWith = 'PistolReceiver_44cal'
this.parts.PistolSlide_44cal.Holds = { 'PistolBarrel_44cal' }
this.parts.PistolSlide_44cal.ConditionLowerChance = 2 -- 1/2
this.parts.PistolSlide_44cal.ConditionMax = 20
this.parts.PistolBarrel_44cal = {}
this.parts.PistolBarrel_44cal.InsertsInto = 'PistolSlide_44cal'
this.parts.PistolBarrel_44cal.ConditionLowerChance = 3 -- 1/3
this.parts.PistolBarrel_44cal.ConditionMax = 20

this.getPartModel = function(modelName)
return this.parts[modelName]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,10 @@ ItemName_EN = {
ItemName_coavinsfirearms.RevolverReceiver_357_Short = "Frame (.357 MAG)",
ItemName_coavinsfirearms.RevolverCylinder_357 = "Revolver Cylinder (.357 MAG)",
ItemName_coavinsfirearms.RevolverCylinder_357_Short = "Cylinder (.357 MAG)"
ItemName_coavinsfirearms.PistolReceiver_44cal = "Pistol Frame (.44cal)",
ItemName_coavinsfirearms.PistolReceiver_44cal_Short = "Frame (.44cal)",
ItemName_coavinsfirearms.PistolSlide_44cal = "Pistol Slide (.44cal)",
ItemName_coavinsfirearms.PistolSlide_44cal_Short = "Slide (.44cal)",
ItemName_coavinsfirearms.PistolBarrel_44cal = "Pistol Barrel (.44cal)",
ItemName_coavinsfirearms.PistolBarrel_44cal_Short = "Barrel (.44cal)",
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module coavinsfirearms {
imports {
Base
}

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

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

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

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

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

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

fixing Fix PistolBarrel_44cal Welding
{
Require : PistolBarrel_44cal,
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_44cal {
DisplayName = Pistol Frame (.44 Cal),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolReceiver,
Weight = 0.4,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item PistolSlide_44cal {
DisplayName = Pistol Slide (.44 Cal),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolSlide,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Paperclip,
}

item PistolBarrel_44cal {
DisplayName = Pistol Barrel (.44 Cal),
DisplayCategory = FirearmPart,
Type = Normal,
Icon = PistolBarrel,
Weight = 0.3,
ConditionMax = 20,
WorldStaticModel = Razor_Ground,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
-- ZIP22

-- 44_CAL.txt
-- M29_44
-- M29_44Carbine
-- Automag
-- DEagle
CoavinsFirearms.Include('M29_44','Pistol_44cal')
CoavinsFirearms.Include('M29_44Carbine','Pistol_44cal')
CoavinsFirearms.Include('Automag','Pistol_44cal')
CoavinsFirearms.Include('DEagle','Pistol_44cal')

-- 50_BMG.txt
-- BOAR
Expand Down

0 comments on commit 0e562de

Please sign in to comment.