Skip to content

Commit

Permalink
Add 5.56 Rifle Model (#7)
Browse files Browse the repository at this point in the history
* Add Model definitions for Rifle_556

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

* Add Helper definitions for Rifle_556

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

* Add Translation for RIfle_556

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

* Add fixing defs for rifle_556

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

* Add item defs for rifle_556

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

---------

Signed-off-by: macinsight <[email protected]>
  • Loading branch information
macinsight authored Nov 26, 2023
1 parent 4fad76b commit 94f2d75
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ CoavinsFirearms.AddOrReplaceModel(
, { 'PistolReceiver_380acp', 'PistolSlide_380acp'}
, 'PistolReceiver_380acp')

CoavinsFirearms.AddOrReplaceModel(
'Rifle_556'
, { 'RifleUpperReceiver_556', 'RifleLowerReceiver_556' }
, 'RifleLowerReceiver_556')
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,28 @@ this.parts.PistolBarrel_380acp = {}
this.parts.PistolBarrel_380acp.InsertsInto = 'PistolSlide_380acp'
this.parts.PistolBarrel_380acp.ConditionLowerChance = 3 -- 1/3
this.parts.PistolBarrel_380acp.ConditionMax = 20
this.parts.RifleLowerReceiver_556 = {}
this.parts.RifleLowerReceiver_556.CombinesWith = 'RifleUpperReceiver_556'
this.parts.RifleLowerReceiver_556.ConditionLowerChance = 2
this.parts.RifleLowerReceiver_556.ConditionMax = 20
this.parts.RifleUpperReceiver_556 = {}
this.parts.RifleUpperReceiver_556.CombinesWith = 'RifleLowerReceiver_556'
this.parts.RifleUpperReceiver_556.Holds = { 'RifleBoltCarrier_556' }
this.parts.RifleUpperReceiver_556.ConditionLowerChance = 2
this.parts.RifleUpperReceiver_556.ConditionMax = 20
this.parts.RifleBoltCarrier_556 = {}
this.parts.RifleBoltCarrier_556.InsertsInto = 'RifleUpperReceiver_556'
this.parts.RifleBoltCarrier_556.Holds = { 'RifleFiringPin_556', 'RifleBolt_556' }
this.parts.RifleBoltCarrier_556.ConditionLowerChance = 3
this.parts.RifleBoltCarrier_556.ConditionMax = 20
this.parts.RifleFiringPin_556 = {}
this.parts.RifleFiringPin_556.InsertsInto = 'RifleBoltCarrier_556'
this.parts.RifleFiringPin_556.ConditionLowerChance = 4
this.parts.RifleFiringPin_556.ConditionMax = 20
this.parts.RifleBolt_556 = {}
this.parts.RifleBolt_556.InsertsInto = 'RifleBoltCarrier_556'
this.parts.RifleBolt_556.ConditionLowerChance = 2
this.parts.RifleBolt_556.ConditionMax = 20

this.getPartModel = function(modelName)
return this.parts[modelName]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,14 @@ ItemName_EN = {
ItemName_coavinsfirearms.PistolReceiver_380acp = "Pistol Frame (.45 ACP)",
ItemName_coavinsfirearms.PistolSlide_380acp = "Pistol Slide (.45 ACP)",
ItemName_coavinsfirearms.PistolBarrel_380acp = "Pistol Barrel (.45 ACP)",
ItemName_coavinsfirearms.RifleLowerReceiver_556 = "Rifle Lower Receiver (5.56)",
ItemName_coavinsfirearms.RifleLowerReceiver_556_Short = "Lower Receiver (5.56)",
ItemName_coavinsfirearms.RifleUpperReceiver_556 = "Rifle Upper Receiver (5.56)",
ItemName_coavinsfirearms.RifleUpperReceiver_556_Short = "Upper Receiver (5.56)",
ItemName_coavinsfirearms.RifleBoltCarrier_556 = "Rifle Bolt Carrier (5.56)",
ItemName_coavinsfirearms.RifleBoltCarrier_556_Short = "Bolt Carrier (5.56)",
ItemName_coavinsfirearms.RifleFiringPin_556 = "Rifle Firing Pin (5.56)",
ItemName_coavinsfirearms.RifleFiringPin_556_Short = "Firing Pin (5.56)",
ItemName_coavinsfirearms.RifleBolt_556 = "Rifle Bolt (5.56)",
ItemName_coavinsfirearms.RifleBolt_556_Short = "Bolt (5.56)",
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module coavinsfirearms {
imports {
Base
}

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

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

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

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

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

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

fixing Fix RifleBoltCarrier_556 Welding
{
Require : RifleBoltCarrier_556,
GlobalItem : BlowTorch=1,
ConditionModifier : 1.2,

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

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

Fixer : ScrapMetal=2; MetalWelding=6,
Fixer : SmallSheetMetal; MetalWelding=4,
}

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

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

item RifleLowerReceiver_556 {
DisplayName = Rifle Lower Receiver,
DisplayCategory = FirearmPart,
Type = Normal,
Icon = RifleLowerReceiver,
Weight = 2,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item RifleUpperReceiver_556 {
DisplayName = Rifle Upper Receiver,
DisplayCategory = FirearmPart,
Type = Normal,
Icon = RifleUpperReceiver,
Weight = 2,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item RifleBoltCarrier_556 {
DisplayName = Rifle Bolt Carrier,
DisplayCategory = FirearmPart,
Type = Normal,
Icon = RifleBoltCarrier,
Weight = 2,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item RifleFiringPin_556 {
DisplayName = Rifle Firing Pin,
DisplayCategory = FirearmPart,
Type = Normal,
Icon = RifleFiringPin,
Weight = 2,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}

item RifleBolt_556 {
DisplayName = Rifle Bolt,
DisplayCategory = FirearmPart,
Type = Normal,
Icon = RifleBolt,
Weight = 2,
ConditionMax = 20,
WorldStaticModel = Paperbag_Ground,
}
}

0 comments on commit 94f2d75

Please sign in to comment.