From 202da013ab427a432fa82cb6c610948d53cfbbae Mon Sep 17 00:00:00 2001 From: macinsight Date: Sun, 26 Nov 2023 20:37:33 +0100 Subject: [PATCH 1/2] Add .357 Revolver Model (#9) * Add model defs for .357 Revolver Signed-off-by: macinsight * Add Helper Defs for .357 Revolver Signed-off-by: macinsight * Add Translation for .357 Revolver Signed-off-by: macinsight * Add fixing defs for .357 Revolver Signed-off-by: macinsight * Add item defs for .357 Revolver Signed-off-by: macinsight * Update Items that have .357 Revolver assigned Signed-off-by: macinsight --------- Signed-off-by: macinsight --- .../client/coavinsfirearms/CoavinsModels.lua | 4 +++ .../client/coavinsfirearms/FirearmsHelper.lua | 8 +++++ .../lua/shared/Translate/EN/ItemName_EN.txt | 4 +++ .../fixings/coavins_fixing_revolver_357.txt | 33 +++++++++++++++++++ .../weapons/coavins_items_revolver_357.txt | 25 ++++++++++++++ .../CoavinsInclude_WeaponPack.lua | 16 ++++----- 6 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_revolver_357.txt create mode 100644 src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_revolver_357.txt 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 ea783b59..7ec8c1b4 100644 --- a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua +++ b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua @@ -75,3 +75,7 @@ CoavinsFirearms.AddOrReplaceModel( 'Rifle_556' , { 'RifleUpperReceiver_556', 'RifleLowerReceiver_556' } , 'RifleLowerReceiver_556') +CoavinsFirearms.AddOrReplaceModel( + 'Revolver_357' +, { 'RevolverReceiver_357', 'RevolverCylinder_357' } +, 'RevolverReceiver_357') 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 f5950362..f0845037 100644 --- a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua +++ b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua @@ -308,6 +308,14 @@ this.parts.RifleBolt_556 = {} this.parts.RifleBolt_556.InsertsInto = 'RifleBoltCarrier_556' this.parts.RifleBolt_556.ConditionLowerChance = 2 this.parts.RifleBolt_556.ConditionMax = 20 +this.parts.RevolverReceiver_357 = {} +this.parts.RevolverReceiver_357.CombinesWith = 'RevolverCylinder_357' +this.parts.RevolverReceiver_357.ConditionLowerChance = 1 +this.parts.RevolverReceiver_357.ConditionMax = 20 +this.parts.RevolverCylinder_357 = {} +this.parts.RevolverCylinder_357.CombinesWith = 'RevolverReceiver_357' +this.parts.RevolverCylinder_357.ConditionLowerChance = 3 +this.parts.RevolverCylinder_357.ConditionMax = 20 this.getPartModel = function(modelName) return this.parts[modelName] 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 4723b9e4..809d074a 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 @@ -116,4 +116,8 @@ ItemName_EN = { 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)", + ItemName_coavinsfirearms.RevolverReceiver_357 = "Revolver Frame (.357 MAG)", + ItemName_coavinsfirearms.RevolverReceiver_357_Short = "Frame (.357 MAG)", + ItemName_coavinsfirearms.RevolverCylinder_357 = "Revolver Cylinder (.357 MAG)", + ItemName_coavinsfirearms.RevolverCylinder_357_Short = "Cylinder (.357 MAG)" } diff --git a/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_revolver_357.txt b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_revolver_357.txt new file mode 100644 index 00000000..b97c007e --- /dev/null +++ b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_revolver_357.txt @@ -0,0 +1,33 @@ +module coavinsfirearms { + imports { + Base + } + + fixing Fix RevolverReceiver_357 Welding + { + Require : RevolverReceiver_357, + GlobalItem : BlowTorch=2, + ConditionModifier : 1.2, + + Fixer : SmallSheetMetal; MetalWelding=3, + Fixer : ScrapMetal; MetalWelding=1, + } + + fixing Fix RevolverReceiver_357 + { + Require : RevolverReceiver_357, + ConditionModifier : 1, + + Fixer : DuctTape=2; Aiming=4, + Fixer : Scotchtape=3; Aiming=2, + } + + fixing Fix RevolverCylinder_357 Welding + { + Require : RevolverCylinder_357, + GlobalItem : BlowTorch=3, + ConditionModifier : 1.2, + + Fixer : SmallSheetMetal=2; MetalWelding=6, + } +} diff --git a/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_revolver_357.txt b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_revolver_357.txt new file mode 100644 index 00000000..d4a1b343 --- /dev/null +++ b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_items_revolver_357.txt @@ -0,0 +1,25 @@ +module coavinsfirearms { + imports { + Base + } + + item RevolverReceiver_357 { + DisplayName = Revolver Frame (.357), + DisplayCategory = FirearmPart, + Type = Normal, + Icon = RevolverReceiver, + Weight = 0.5, + ConditionMax = 20, + WorldStaticModel = Paperbag_Ground, + } + + item RevolverCylinder_357 { + DisplayName = Revolver Cylinder (.357), + DisplayCategory = FirearmPart, + Type = Normal, + Icon = RevolverCylinder, + Weight = 0.3, + ConditionMax = 20, + WorldStaticModel = Paperclip, + } +} 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 3170ae18..b931d0fb 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 @@ -67,19 +67,19 @@ -- 357 COMBO CALIBER.txt CoavinsFirearms.Include('Base.GP100_2', 'GenericRevolver') -CoavinsFirearms.Include('Base.GP100_2_357', 'GenericRevolver') +CoavinsFirearms.Include('Base.GP100_2_357', 'Revolver_357') CoavinsFirearms.Include('Base.GP100_4', 'GenericRevolver') -CoavinsFirearms.Include('Base.GP100_4_357', 'GenericRevolver') +CoavinsFirearms.Include('Base.GP100_4_357', 'Revolver_357') CoavinsFirearms.Include('Base.GP100_6', 'GenericRevolver') -CoavinsFirearms.Include('Base.GP100_6_357', 'GenericRevolver') +CoavinsFirearms.Include('Base.GP100_6_357', 'Revolver_357') CoavinsFirearms.Include('Base.K6S', 'GenericRevolver') -CoavinsFirearms.Include('Base.K6S_357', 'GenericRevolver') --- Marlin_1894 --- Marlin_1894_357 +CoavinsFirearms.Include('Base.K6S_357', 'Revolver_357') +-- Marlin_189 +CoavinsFirearms.Include('Marlin_1894_357', 'Revolver_357') CoavinsFirearms.Include('Base.Rhino_60DS', 'GenericRevolver') -CoavinsFirearms.Include('Base.Rhino_60DS_357', 'GenericRevolver') +CoavinsFirearms.Include('Base.Rhino_60DS_357', 'Revolver_357') CoavinsFirearms.Include('Base.SW_327', 'GenericRevolver') -CoavinsFirearms.Include('Base.SW_327_357', 'GenericRevolver') +CoavinsFirearms.Include('Base.SW_327_357', 'Revolver_357') -- 1911.txt CoavinsFirearms.Include('Base.AMT1911', 'GenericPistol') From 0e562de424ed8930338f5734dec9f6a706c1c1e2 Mon Sep 17 00:00:00 2001 From: macinsight Date: Sun, 26 Nov 2023 20:53:01 +0100 Subject: [PATCH 2/2] add 44cal (#10) * Add model def for pistol_44cal Signed-off-by: macinsight * Add helper defs for #56 Signed-off-by: macinsight * Add translations for #56 Signed-off-by: macinsight * Add fixing defs for #56 Signed-off-by: macinsight * Add item defs for #56 Signed-off-by: macinsight * Assign Model to firearms Signed-off-by: macinsight --------- Signed-off-by: macinsight --- .../client/coavinsfirearms/CoavinsModels.lua | 4 ++ .../client/coavinsfirearms/FirearmsHelper.lua | 13 ++++++ .../lua/shared/Translate/EN/ItemName_EN.txt | 6 +++ .../fixings/coavins_fixing_pistol_44cal.txt | 43 +++++++++++++++++++ .../weapons/coavins_parts_pistol_44cal.txt | 35 +++++++++++++++ .../CoavinsInclude_WeaponPack.lua | 8 ++-- 6 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_pistol_44cal.txt create mode 100644 src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_parts_pistol_44cal.txt 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 7ec8c1b4..a1400a81 100644 --- a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua +++ b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/CoavinsModels.lua @@ -79,3 +79,7 @@ CoavinsFirearms.AddOrReplaceModel( 'Revolver_357' , { 'RevolverReceiver_357', 'RevolverCylinder_357' } , 'RevolverReceiver_357') +CoavinsFirearms.AddOrReplaceModel( + 'Pistol_44cal' +, { 'PistolReceiver_44cal', 'PistolSlide_44cal'} +, 'PistolReceiver_44cal') 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 f0845037..9604f7b8 100644 --- a/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua +++ b/src/Contents/mods/coavinsfirearms/media/lua/client/coavinsfirearms/FirearmsHelper.lua @@ -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] 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 809d074a..c8438086 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 @@ -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)", } diff --git a/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_pistol_44cal.txt b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_pistol_44cal.txt new file mode 100644 index 00000000..9c4ef722 --- /dev/null +++ b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/fixings/coavins_fixing_pistol_44cal.txt @@ -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, + } +} diff --git a/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_parts_pistol_44cal.txt b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_parts_pistol_44cal.txt new file mode 100644 index 00000000..acd32d4e --- /dev/null +++ b/src/Contents/mods/coavinsfirearms/media/scripts/coavinsfirearms/weapons/coavins_parts_pistol_44cal.txt @@ -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, + } +} 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 b931d0fb..8da15066 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 @@ -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