From 38eebe966ff42da0d7cdb27f7424f97cef6df62d Mon Sep 17 00:00:00 2001 From: macinsight Date: Mon, 27 Nov 2023 15:51:16 +0100 Subject: [PATCH 1/6] Add Model Definitions for #81 Signed-off-by: macinsight --- .../media/lua/client/coavinsfirearms/CoavinsModels.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua index 17842133..3060df04 100644 --- a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua +++ b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua @@ -91,3 +91,7 @@ CoavinsFirearms.AddOrReplaceModel( 'Shotgun_20g' , { 'ShotgunReceiver_20g', 'ShotgunBarrel_20g' } , 'ShotgunReceiver_20g') +CoavinsFirearms.AddOrReplaceModel( + 'Shotgun_4g' +, { 'ShotgunReceiver_4g', 'ShotgunBarrel_4g' } +, 'ShotgunReceiver_4g') From 4b0202fcaa3d2982d6ce3e25228bd4fa310f226f Mon Sep 17 00:00:00 2001 From: macinsight Date: Mon, 27 Nov 2023 15:52:02 +0100 Subject: [PATCH 2/6] Add Helper definitions for #81 Signed-off-by: macinsight --- .../client/coavinsfirearms/FirearmsHelper.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua index aba02ecd..cf014a43 100644 --- a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua +++ b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua @@ -360,6 +360,29 @@ this.parts.ShotgunBarrel_20g = {} this.parts.ShotgunBarrel_20g.CombinesWith = 'ShotgunReceiver_20g' this.parts.ShotgunBarrel_20g.ConditionLowerChance = 3 this.parts.ShotgunBarrel_20g.ConditionMax = 20 +this.parts.ShotgunReceiver_4g = {} +this.parts.ShotgunReceiver_4g.CombinesWith = 'ShotgunBarrel_4g' +this.parts.ShotgunReceiver_4g.Holds = { 'ShotgunForend_4g' } +this.parts.ShotgunReceiver_4g.ConditionLowerChance = 1 +this.parts.ShotgunReceiver_4g.ConditionMax = 20 +this.parts.ShotgunForend_4g = {} +this.parts.ShotgunForend_4g.InsertsInto = 'ShotgunReceiver_4g' +this.parts.ShotgunForend_4g.Holds = { 'ShotgunBoltCarrier_4g' } +this.parts.ShotgunForend_4g.ConditionLowerChance = 2 +this.parts.ShotgunForend_4g.ConditionMax = 20 +this.parts.ShotgunBoltCarrier_4g = {} +this.parts.ShotgunBoltCarrier_4g.InsertsInto = 'ShotgunForend_4g' +this.parts.ShotgunBoltCarrier_4g.Holds = { 'ShotgunBolt_4g' } +this.parts.ShotgunBoltCarrier_4g.ConditionLowerChance = 4 +this.parts.ShotgunBoltCarrier_4g.ConditionMax = 20 +this.parts.ShotgunBolt_4g = {} +this.parts.ShotgunBolt_4g.InsertsInto = 'ShotgunBoltCarrier_4g' +this.parts.ShotgunBolt_4g.ConditionLowerChance = 3 +this.parts.ShotgunBolt_4g.ConditionMax = 20 +this.parts.ShotgunBarrel_4g = {} +this.parts.ShotgunBarrel_4g.CombinesWith = 'ShotgunReceiver_4g' +this.parts.ShotgunBarrel_4g.ConditionLowerChance = 3 +this.parts.ShotgunBarrel_4g.ConditionMax = 20 this.getPartModel = function(modelName) return this.parts[modelName] From 19e41cca1ab56b5286335a46923d454f70b2b5e7 Mon Sep 17 00:00:00 2001 From: macinsight Date: Mon, 27 Nov 2023 15:52:55 +0100 Subject: [PATCH 3/6] Add Translation definitions for #81 Signed-off-by: macinsight --- .../media/lua/shared/Translate/EN/ItemName_EN.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Contents/mods/coavinsfirearms/media/lua/shared/Translate/EN/ItemName_EN.txt b/src/Contents/mods/coavinsfirearms/media/lua/shared/Translate/EN/ItemName_EN.txt index a151bb03..cee07e87 100644 --- a/src/Contents/mods/coavinsfirearms/media/lua/shared/Translate/EN/ItemName_EN.txt +++ b/src/Contents/mods/coavinsfirearms/media/lua/shared/Translate/EN/ItemName_EN.txt @@ -140,4 +140,14 @@ ItemName_EN = { ItemName_coavinsfirearms.ShotgunBolt_20g_Short = "Bolt (20g)", ItemName_coavinsfirearms.ShotgunBarrel_20g = "Shotgun Barrel (20g)", ItemName_coavinsfirearms.ShotgunBarrel_20g_Short = "Barrel (20g)", + ItemName_coavinsfirearms.ShotgunReceiver_4g = "Shotgun Receiver (4g)", + ItemName_coavinsfirearms.ShotgunReceiver_4g_Short = "Receiver (4g)", + ItemName_coavinsfirearms.ShotgunForend_4g = "Shotgun Forend (4g)", + ItemName_coavinsfirearms.ShotgunForend_4g_Short = "Forend (4g)", + ItemName_coavinsfirearms.ShotgunBoltCarrier_4g = "Shotgun Bolt Carrier (4g)", + ItemName_coavinsfirearms.ShotgunBoltCarrier_4g_Short = "Bolt Carrier (4g)", + ItemName_coavinsfirearms.ShotgunBolt_4g = "Shotgun Bolt (4g)", + ItemName_coavinsfirearms.ShotgunBolt_4g_Short = "Bolt (4g)", + ItemName_coavinsfirearms.ShotgunBarrel_4g = "Shotgun Barrel (4g)", + ItemName_coavinsfirearms.ShotgunBarrel_4g_Short = "Barrel (4g)", } From 4d7368d33ecd11ad28091f0299778fbd6f1e9251 Mon Sep 17 00:00:00 2001 From: macinsight Date: Mon, 27 Nov 2023 15:53:56 +0100 Subject: [PATCH 4/6] Add fix definitions for #81 Signed-off-by: macinsight --- .../fixings/coavins_fixing_shotgun_4g.txt | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_shotgun_4g.txt diff --git a/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_shotgun_4g.txt b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_shotgun_4g.txt new file mode 100644 index 00000000..4f07c157 --- /dev/null +++ b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_shotgun_4g.txt @@ -0,0 +1,63 @@ +module coavinsfirearms { + imports { + Base + } + + fixing Fix ShotgunReceiver_4g Welding + { + Require : ShotgunReceiver_4g, + GlobalItem : BlowTorch=2, + ConditionModifier : 1.2, + + Fixer : SmallSheetMetal; MetalWelding=3, + Fixer : ScrapMetal; MetalWelding=1, + } + + fixing Fix ShotgunReceiver_4g + { + Require : ShotgunReceiver_4g, + ConditionModifier : 1, + + Fixer : DuctTape=2; Aiming=4, + Fixer : Scotchtape=3; Aiming=2, + } + + fixing Fix ShotgunForend_4g + { + Require : ShotgunForend_4g, + ConditionModifier : 1, + + Fixer : DuctTape=1; Aiming=2, + Fixer : Scotchtape=2; Aiming=1, + } + + fixing Fix ShotgunBoltCarrier_4g Welding + { + Require : ShotgunBoltCarrier_4g, + GlobalItem : BlowTorch=1, + ConditionModifier : 1.2, + + Fixer : ScrapMetal; MetalWelding=1, + } + + fixing Fix ShotgunBolt_4g Welding + { + Require : ShotgunBolt_4g, + GlobalItem : BlowTorch=2, + ConditionModifier : 1.2, + + Fixer : SmallSheetMetal; MetalWelding=4, + Fixer : ScrapMetal; MetalWelding=1, + } + + fixing Fix ShotgunBarrel_4g Welding + { + Require : ShotgunBarrel_4g, + GlobalItem : BlowTorch=4, + ConditionModifier : 1.2, + + Fixer : SheetMetal; MetalWelding=7, + Fixer : SmallSheetMetal; MetalWelding=5, + Fixer : ScrapMetal; MetalWelding=3, + } +} From 906ac35fa34cb68dca4b6d1860fcd226d589307e Mon Sep 17 00:00:00 2001 From: macinsight Date: Mon, 27 Nov 2023 15:54:42 +0100 Subject: [PATCH 5/6] Add item definitions for #81 Signed-off-by: macinsight --- .../weapons/coavins_items_shotgun_4g.txt | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_shotgun_4g.txt diff --git a/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_shotgun_4g.txt b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_shotgun_4g.txt new file mode 100644 index 00000000..8a340531 --- /dev/null +++ b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_shotgun_4g.txt @@ -0,0 +1,55 @@ +module coavinsfirearms { + imports { + Base + } + + item ShotgunReceiver_4g { + DisplayName = Shotgun Receiver (4g), + DisplayCategory = FirearmPart, + Type = Normal, + Icon = ShotgunReceiver, + Weight = 2, + ConditionMax = 20, + WorldStaticModel = Paperbag_Ground, + } + + item ShotgunForend_4g { + DisplayName = Shotgun Forend (4g), + DisplayCategory = FirearmPart, + Type = Normal, + Icon = ShotgunForend, + Weight = 0.5, + ConditionMax = 20, + WorldStaticModel = CarvingFork_Ground, + } + + item ShotgunBoltCarrier_4g { + DisplayName = Shotgun Bolt Carrier (4g), + DisplayCategory = FirearmPart, + Type = Normal, + Icon = ShotgunBoltCarrier, + Weight = 0.3, + ConditionMax = 20, + WorldStaticModel = Staples_Ground, + } + + item ShotgunBolt_4g { + DisplayName = Shotgun Bolt (4g), + DisplayCategory = FirearmPart, + Type = Normal, + Icon = ShotgunBolt, + Weight = 0.2, + ConditionMax = 20, + WorldStaticModel = Staples_Ground, + } + + item ShotgunBarrel_4g { + DisplayName = Shotgun Barrel (4g), + DisplayCategory = FirearmPart, + Type = Normal, + Icon = ShotgunBarrel, + Weight = 1, + ConditionMax = 20, + WorldStaticModel = PlasticPipe, + } +} From b87754f25435f3423713c173d5f41cce99a02287 Mon Sep 17 00:00:00 2001 From: macinsight Date: Mon, 27 Nov 2023 15:56:17 +0100 Subject: [PATCH 6/6] Add firearms to #81 Signed-off-by: macinsight --- .../lua/client/coavinssupport2/CoavinsInclude_WeaponPack.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Contents/mods/coavinssupport2/media/lua/client/coavinssupport2/CoavinsInclude_WeaponPack.lua b/src/Contents/mods/coavinssupport2/media/lua/client/coavinssupport2/CoavinsInclude_WeaponPack.lua index 429804e8..fca3328b 100644 --- a/src/Contents/mods/coavinssupport2/media/lua/client/coavinssupport2/CoavinsInclude_WeaponPack.lua +++ b/src/Contents/mods/coavinssupport2/media/lua/client/coavinssupport2/CoavinsInclude_WeaponPack.lua @@ -503,8 +503,8 @@ CoavinsFirearms.Include('Base.M1936', 'GenericRevolver') -- SCARSC_Fold -- SHOTGUN_4G.txt --- KS23 --- KS23_S_Pistol +CoavinsFirearms.Include('KS23','Shotgun_4g') +CoavinsFirearms.Include('KS23_S_Pistol','Shotgun_4g') -- SHOTGUN_870.txt CoavinsFirearms.Include('Base.M870_Wingmaster', 'GenericShotgun')