From b3c547ce5b4c93d83e27542ce1ffeaca14117162 Mon Sep 17 00:00:00 2001 From: Brandon Sturgeon Date: Wed, 25 Jan 2023 14:33:26 -0800 Subject: [PATCH] Apply possible new syntax --- .../cfc_m9k/cfc9k_bobs_gun_base.lua | 5 +- .../cfc_m9k/cfc9k_lmg_agile.lua | 61 +++--- .../cfc_m9k/cfc9k_lmg_base.lua | 70 +++---- .../cfc_m9k/cfc9k_lmg_heavy.lua | 72 +++---- .../cfc_m9k/cfc9k_lmg_suppression.lua | 33 ++- .../cfc_m9k/cfc9k_pistol_base.lua | 72 +++---- .../cfc_m9k/cfc9k_pistol_handcannon.lua | 29 +-- .../cfc_m9k/cfc9k_pistol_heavy.lua | 60 +++--- .../cfc_m9k/cfc9k_pistol_light.lua | 60 +++--- .../cfc_m9k/cfc9k_pistol_machine.lua | 62 +++--- .../cfc_m9k/cfc9k_pistol_revolver.lua | 97 ++++----- .../cfc_m9k/cfc9k_rifle_base.lua | 189 +++++++----------- .../cfc_m9k/cfc9k_rifle_battle.lua | 128 +++++------- .../cfc_m9k/cfc9k_rifle_heavy.lua | 102 ++++------ .../cfc_m9k/cfc9k_rifle_light.lua | 18 +- .../cfc_m9k/cfc9k_rifle_marksman.lua | 111 +++++----- .../cfc_m9k/cfc9k_scoped_base.lua | 4 +- .../cfc_m9k/cfc9k_shotgun_base.lua | 66 +++--- .../cfc_m9k/cfc9k_shotgun_elephant.lua | 29 +-- .../cfc_m9k/cfc9k_shotgun_heavy.lua | 70 +++---- .../cfc_m9k/cfc9k_shotgun_highrepeating.lua | 70 +++---- .../cfc_m9k/cfc9k_shotgun_light.lua | 9 +- .../cfc_m9k/cfc9k_shotgun_lowrepeating.lua | 9 +- .../cfc_m9k/cfc9k_smg_base.lua | 18 +- .../cfc_m9k/cfc9k_smg_heavy.lua | 145 +++++--------- .../cfc_m9k/cfc9k_smg_highcap.lua | 9 +- .../cfc_m9k/cfc9k_smg_light.lua | 9 +- .../cfc_m9k/cfc9k_sniper_antimat.lua | 37 ++-- .../cfc_m9k/cfc9k_sniper_base.lua | 103 ++++------ .../cfc_m9k/cfc9k_sniper_heavy.lua | 101 ++++------ .../cfc_m9k/cfc9k_sniper_semi.lua | 9 +- lua/cfc_entity_stubber/css/set_max_ammo.lua | 12 +- lua/cfc_entity_stubber/cw/cw_base.lua | 16 +- lua/cfc_entity_stubber/cw/cw_boberg.lua | 3 +- lua/cfc_entity_stubber/cw/cw_deagle.lua | 3 +- lua/cfc_entity_stubber/cw/cw_fiveseven.lua | 3 +- lua/cfc_entity_stubber/cw/cw_g3a3.lua | 3 +- lua/cfc_entity_stubber/cw/cw_g4p_awm.lua | 3 +- .../cw/cw_g4p_g2contender.lua | 7 +- lua/cfc_entity_stubber/cw/cw_g4p_m98b.lua | 3 +- .../cw/cw_g4p_mp412_rex.lua | 16 +- lua/cfc_entity_stubber/cw/cw_jng90.lua | 3 +- lua/cfc_entity_stubber/cw/cw_l115.lua | 3 +- lua/cfc_entity_stubber/cw/cw_m1911.lua | 3 +- .../cw/cw_m249_official.lua | 3 +- lua/cfc_entity_stubber/cw/cw_makarov.lua | 3 +- lua/cfc_entity_stubber/cw/cw_mr96.lua | 3 +- lua/cfc_entity_stubber/cw/cw_ragingbull.lua | 3 +- lua/cfc_entity_stubber/cw/cw_scarh.lua | 3 +- lua/cfc_entity_stubber/cw/cw_shorty.lua | 3 +- lua/cfc_entity_stubber/cw/cw_sv98.lua | 3 +- lua/cfc_entity_stubber/cw/cw_trg42.lua | 3 +- lua/cfc_entity_stubber/cw/cw_ump45.lua | 3 +- lua/cfc_entity_stubber/lfs/combine_heli.lua | 5 +- 54 files changed, 786 insertions(+), 1181 deletions(-) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_bobs_gun_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_bobs_gun_base.lua index f63cda8..1c22cbd 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_bobs_gun_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_bobs_gun_base.lua @@ -1,6 +1,5 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "bobs_gun_base" ) +cfcEntityStubber.registerStub( "bobs_gun_base", function( weapon ) weapon.ShouldDoMoveSpread = false -end ) \ No newline at end of file +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_agile.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_agile.lua index ef1d42b..1cee520 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_agile.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_agile.lua @@ -1,45 +1,32 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m1918bar" - } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "LMG:Agile" +cfcEntityStubber.registerStub( "m9k_m1918bar", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "LMG:Agile" - weapon.ShouldDoMoveSpread = true - weapon.Primary.RPM = 500 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.32 - weapon.Primary.Damage = 40 - weapon.Primary.Spread = 0.05 - weapon.Primary.IronAccuracy = 0.007 - end + weapon.ShouldDoMoveSpread = true + weapon.Primary.RPM = 500 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.32 + weapon.Primary.Damage = 40 + weapon.Primary.Spread = 0.05 + weapon.Primary.IronAccuracy = 0.007 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_fg42" - } +cfcEntityStubber.registerStub( "m9k_fg42", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "LMG:Agile" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "LMG:Agile" - - weapon.ShouldDoMoveSpread = true - weapon.Primary.RPM = 525 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.32 - weapon.Primary.Damage = 40 - weapon.Primary.Spread = 0.053 - weapon.Primary.IronAccuracy = 0.0073 - end + weapon.ShouldDoMoveSpread = true + weapon.Primary.RPM = 525 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.32 + weapon.Primary.Damage = 40 + weapon.Primary.Spread = 0.053 + weapon.Primary.IronAccuracy = 0.0073 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_base.lua index febd39f..4b5ee7a 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_base.lua @@ -1,49 +1,35 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m249lmg" - } +cfcEntityStubber.registerStub( "m9k_m249lmg", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "LMG:Base" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "LMG:Base" - - weapon.ShouldDoMoveSpread = true - weapon.Primary.RPM = 700 - weapon.Primary.ClipSize = 100 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.5 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.05 - weapon.Primary.IronAccuracy = 0.009 - weapon.Primary.Ammo = "AirboatGun" - weapon.Primary.DefaultClip = 1000 - end + weapon.ShouldDoMoveSpread = true + weapon.Primary.RPM = 700 + weapon.Primary.ClipSize = 100 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.5 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.05 + weapon.Primary.IronAccuracy = 0.009 + weapon.Primary.Ammo = "AirboatGun" + weapon.Primary.DefaultClip = 1000 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_ares_shrike" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "LMG:Base" +cfcEntityStubber.registerStub( "m9k_ares_shrike", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "LMG:Base" - weapon.ShouldDoMoveSpread = true - weapon.Primary.RPM = 700 - weapon.Primary.ClipSize = 100 - weapon.Primary.KickUp = 0.95 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.45 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.048 - weapon.Primary.IronAccuracy = 0.0093 - weapon.Primary.Ammo = "AirboatGun" - weapon.Primary.DefaultClip = 1000 - end + weapon.ShouldDoMoveSpread = true + weapon.Primary.RPM = 700 + weapon.Primary.ClipSize = 100 + weapon.Primary.KickUp = 0.95 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.45 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.048 + weapon.Primary.IronAccuracy = 0.0093 + weapon.Primary.Ammo = "AirboatGun" + weapon.Primary.DefaultClip = 1000 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_heavy.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_heavy.lua index 74bb08d..734a1fa 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_heavy.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_heavy.lua @@ -1,49 +1,35 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m60" - } +cfcEntityStubber.registerStub( "m9k_m60", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "LMG:Heavy" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "LMG:Heavy" - - weapon.ShouldDoMoveSpread = true - weapon.Primary.RPM = 550 - weapon.Primary.ClipSize = 100 - weapon.Primary.KickUp = 1.3 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.55 - weapon.Primary.Damage = 40 - weapon.Primary.Spread = 0.065 - weapon.Primary.IronAccuracy = 0.005 - weapon.Primary.Ammo = "AirboatGun" - weapon.ACF_DamageMult = 1.5 - end + weapon.ShouldDoMoveSpread = true + weapon.Primary.RPM = 550 + weapon.Primary.ClipSize = 100 + weapon.Primary.KickUp = 1.3 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.55 + weapon.Primary.Damage = 40 + weapon.Primary.Spread = 0.065 + weapon.Primary.IronAccuracy = 0.005 + weapon.Primary.Ammo = "AirboatGun" + weapon.ACF_DamageMult = 1.5 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_pkm" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "LMG:Heavy" +cfcEntityStubber.registerStub( "m9k_pkm", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "LMG:Heavy" - weapon.ShouldDoMoveSpread = true - weapon.Primary.RPM = 550 - weapon.Primary.ClipSize = 100 - weapon.Primary.KickUp = 1.3 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.55 - weapon.Primary.Damage = 40 - weapon.Primary.Spread = 0.065 - weapon.Primary.IronAccuracy = 0.005 - weapon.Primary.Ammo = "AirboatGun" - weapon.ACF_DamageMult = 1.5 - end -end ) \ No newline at end of file + weapon.ShouldDoMoveSpread = true + weapon.Primary.RPM = 550 + weapon.Primary.ClipSize = 100 + weapon.Primary.KickUp = 1.3 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.55 + weapon.Primary.Damage = 40 + weapon.Primary.Spread = 0.065 + weapon.Primary.IronAccuracy = 0.005 + weapon.Primary.Ammo = "AirboatGun" + weapon.ACF_DamageMult = 1.5 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_suppression.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_suppression.lua index 2db67ed..d9bda56 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_suppression.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_lmg_suppression.lua @@ -1,25 +1,18 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_minigun" - } +cfcEntityStubber.registerStub( "m9k_minigun", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "LMG:Suppression" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "LMG:Suppression" + weapon.Primary.Sound = "BlackVulcan.Single" - weapon.Primary.Sound = "BlackVulcan.Single" - - weapon.ShouldDoMoveSpread = true - weapon.Primary.RPM = 725 - weapon.Primary.ClipSize = 150 - weapon.Primary.KickUp = 0.9 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.4 - weapon.Primary.NumShots = 2 - weapon.Primary.Damage = 20 - weapon.Primary.Spread = 0.03 - end + weapon.ShouldDoMoveSpread = true + weapon.Primary.RPM = 725 + weapon.Primary.ClipSize = 150 + weapon.Primary.KickUp = 0.9 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.4 + weapon.Primary.NumShots = 2 + weapon.Primary.Damage = 20 + weapon.Primary.Spread = 0.03 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_base.lua index 8c46b77..55791fd 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_base.lua @@ -1,49 +1,35 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m92beretta" - } +cfcEntityStubber.registerStub( "m9k_m92beretta", function( weapon ) + weapon.Purpose = "A basic, all-around pistol" + weapon.CFC_Category = "Pistol:Base" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "A basic, all-around pistol" - weapon.CFC_Category = "Pistol:Base" - - weapon.Primary.RPM = 525 - weapon.Primary.ClipSize = 12 - weapon.Primary.KickUp = 0.98 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.2 - weapon.Primary.Automatic = false - weapon.Primary.Ammo = "pistol" - weapon.Primary.NumShots = 1 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.018 - weapon.Primary.IronAccuracy = 0.0012 - end + weapon.Primary.RPM = 525 + weapon.Primary.ClipSize = 12 + weapon.Primary.KickUp = 0.98 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.2 + weapon.Primary.Automatic = false + weapon.Primary.Ammo = "pistol" + weapon.Primary.NumShots = 1 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.018 + weapon.Primary.IronAccuracy = 0.0012 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_luger" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "A basic, all-around pistol" - weapon.CFC_Category = "Pistol:Base" +cfcEntityStubber.registerStub( "m9k_luger", function( weapon ) + weapon.Purpose = "A basic, all-around pistol" + weapon.CFC_Category = "Pistol:Base" - weapon.Primary.RPM = 500 - weapon.Primary.ClipSize = 12 - weapon.Primary.KickUp = 0.98 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.2 - weapon.Primary.Automatic = false - weapon.Primary.Ammo = "pistol" - weapon.Primary.NumShots = 1 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.02 - weapon.Primary.IronAccuracy = 0.001 - end -end ) \ No newline at end of file + weapon.Primary.RPM = 500 + weapon.Primary.ClipSize = 12 + weapon.Primary.KickUp = 0.98 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.2 + weapon.Primary.Automatic = false + weapon.Primary.Ammo = "pistol" + weapon.Primary.NumShots = 1 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.02 + weapon.Primary.IronAccuracy = 0.001 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_handcannon.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_handcannon.lua index de6c70c..f5b63a7 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_handcannon.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_handcannon.lua @@ -1,22 +1,15 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_model500" - } +cfcEntityStubber.registerStub( "m9k_model500", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Handcannon" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Handcannon" - - weapon.Primary.RPM = 45 - weapon.Primary.ClipSize = 5 - weapon.Primary.KickUp = 7 - weapon.Primary.KickDown = 3 - weapon.Primary.KickHorizontal = 2 - weapon.Primary.Damage = 90 - weapon.Primary.Spread = 0.04 - weapon.Primary.IronAccuracy = 0.0003 - end + weapon.Primary.RPM = 45 + weapon.Primary.ClipSize = 5 + weapon.Primary.KickUp = 7 + weapon.Primary.KickDown = 3 + weapon.Primary.KickHorizontal = 2 + weapon.Primary.Damage = 90 + weapon.Primary.Spread = 0.04 + weapon.Primary.IronAccuracy = 0.0003 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_heavy.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_heavy.lua index 6dca469..fece84d 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_heavy.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_heavy.lua @@ -1,43 +1,29 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_colt1911" - } +cfcEntityStubber.registerStub( "m9k_colt1911", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Heavy" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Heavy" - - weapon.Primary.RPM = 425 - weapon.Primary.ClipSize = 7 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.3 - weapon.Primary.Damage = 40 - weapon.Primary.Spread = 0.027 - weapon.Primary.IronAccuracy = 0.0028 - end + weapon.Primary.RPM = 425 + weapon.Primary.ClipSize = 7 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.3 + weapon.Primary.Damage = 40 + weapon.Primary.Spread = 0.027 + weapon.Primary.IronAccuracy = 0.0028 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_usp" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Heavy" +cfcEntityStubber.registerStub( "m9k_usp", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Heavy" - weapon.Primary.RPM = 425 - weapon.Primary.ClipSize = 9 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.3 - weapon.Primary.Damage = 34 - weapon.Primary.Spread = 0.03 - weapon.Primary.IronAccuracy = 0.003 - end -end ) \ No newline at end of file + weapon.Primary.RPM = 425 + weapon.Primary.ClipSize = 9 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.3 + weapon.Primary.Damage = 34 + weapon.Primary.Spread = 0.03 + weapon.Primary.IronAccuracy = 0.003 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_light.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_light.lua index 5aec169..301b352 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_light.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_light.lua @@ -1,43 +1,29 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_sig_p229r" - } +cfcEntityStubber.registerStub( "m9k_sig_p229r", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Light" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Light" - - weapon.Primary.RPM = 550 - weapon.Primary.ClipSize = 12 - weapon.Primary.KickUp = 0.85 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.15 - weapon.Primary.Damage = 24 - weapon.Primary.Spread = 0.025 - weapon.Primary.IronAccuracy = 0.001 - end + weapon.Primary.RPM = 550 + weapon.Primary.ClipSize = 12 + weapon.Primary.KickUp = 0.85 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.15 + weapon.Primary.Damage = 24 + weapon.Primary.Spread = 0.025 + weapon.Primary.IronAccuracy = 0.001 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_hk45" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Light" +cfcEntityStubber.registerStub( "m9k_hk45", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Light" - weapon.Primary.RPM = 535 - weapon.Primary.ClipSize = 12 - weapon.Primary.KickUp = 0.9 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.15 - weapon.Primary.Damage = 24 - weapon.Primary.Spread = 0.022 - weapon.Primary.IronAccuracy = 0.0097 - end -end ) \ No newline at end of file + weapon.Primary.RPM = 535 + weapon.Primary.ClipSize = 12 + weapon.Primary.KickUp = 0.9 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.15 + weapon.Primary.Damage = 24 + weapon.Primary.Spread = 0.022 + weapon.Primary.IronAccuracy = 0.0097 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_machine.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_machine.lua index 71aba3d..ba2a17b 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_machine.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_machine.lua @@ -1,45 +1,31 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_glock" - } +cfcEntityStubber.registerStub( "m9k_glock", function( weapon ) + weapon.Purpose = "An automatic, less accurate version of the base pistol" + weapon.CFC_Category = "Pistol:Machine" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "An automatic, less accurate version of the base pistol" - weapon.CFC_Category = "Pistol:Machine" - - weapon.Primary.RPM = 850 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1.1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.25 - weapon.Primary.Automatic = true - weapon.Primary.Damage = 20 - weapon.Primary.Spread = 0.03 - weapon.Primary.IronAccuracy = 0.01 - end + weapon.Primary.RPM = 850 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1.1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.25 + weapon.Primary.Automatic = true + weapon.Primary.Damage = 20 + weapon.Primary.Spread = 0.03 + weapon.Primary.IronAccuracy = 0.01 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_tec9" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "An automatic, less accurate version of the base pistol" - weapon.CFC_Category = "Pistol:Machine" +cfcEntityStubber.registerStub( "m9k_tec9", function( weapon ) + weapon.Purpose = "An automatic, less accurate version of the base pistol" + weapon.CFC_Category = "Pistol:Machine" - weapon.Primary.RPM = 800 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1.1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.25 - weapon.Primary.Automatic = true - weapon.Primary.Damage = 20 - weapon.Primary.Spread = 0.025 - weapon.Primary.IronAccuracy = 0.01 - end + weapon.Primary.RPM = 800 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1.1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.25 + weapon.Primary.Automatic = true + weapon.Primary.Damage = 20 + weapon.Primary.Spread = 0.025 + weapon.Primary.IronAccuracy = 0.01 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_revolver.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_revolver.lua index 20a1192..e666174 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_revolver.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_pistol_revolver.lua @@ -1,66 +1,45 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_ragingbull", - "m9k_coltpython", - "m9k_scoped_taurus", - "m9k_model3russian", - "m9k_model627", - "m9k_deagle", - "m9k_m29satan" - } - - for _, weaponClass in pairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Revolver" - - weapon.Primary.RPM = 175 - weapon.Primary.ClipSize = 6 - weapon.Primary.KickUp = 4 - weapon.Primary.KickDown = 0.3 - weapon.Primary.KickHorizontal = 1.4 - weapon.Primary.Damage = 75 - weapon.Primary.Spread = 0.02 - weapon.Primary.NumShots = 1 - weapon.Primary.IronAccuracy = 0.0005 - end +cfcEntityStubber.registerStub( "m9k_ragingbull", function( weapon ) + "m9k_deagle", + "m9k_m29satan" +} + +for _, weaponClass in pairs( weapons ) do + local weapon = cfcEntityStubber.getWeapon( weaponClass ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Revolver" + + weapon.Primary.RPM = 175 + weapon.Primary.ClipSize = 6 + weapon.Primary.KickUp = 4 + weapon.Primary.KickDown = 0.3 + weapon.Primary.KickHorizontal = 1.4 + weapon.Primary.Damage = 75 + weapon.Primary.Spread = 0.02 + weapon.Primary.NumShots = 1 + weapon.Primary.IronAccuracy = 0.0005 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_remington1858" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Revolver" - - weapon.Primary.RPM = 275 - weapon.Primary.ClipSize = 6 - weapon.Primary.KickUp = 4 - weapon.Primary.KickDown = 0.3 - weapon.Primary.KickHorizontal = 1.5 - weapon.Primary.Automatic = false - weapon.Primary.Damage = 55 - weapon.Primary.Spread = 0.01 - weapon.Primary.NumShots = 1 - weapon.Primary.IronAccuracy = 0.0007 - end +cfcEntityStubber.registerStub( "m9k_remington1858", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Revolver" + + weapon.Primary.RPM = 275 + weapon.Primary.ClipSize = 6 + weapon.Primary.KickUp = 4 + weapon.Primary.KickDown = 0.3 + weapon.Primary.KickHorizontal = 1.5 + weapon.Primary.Automatic = false + weapon.Primary.Damage = 55 + weapon.Primary.Spread = 0.01 + weapon.Primary.NumShots = 1 + weapon.Primary.IronAccuracy = 0.0007 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_scoped_taurus" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Pistol:Revolver" +cfcEntityStubber.registerStub( "m9k_scoped_taurus", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Pistol:Revolver" - weapon.Primary.SpreadZoomed = 0.0005 - end -end ) \ No newline at end of file + weapon.Primary.SpreadZoomed = 0.0005 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_base.lua index 17d9a16..0b0246d 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_base.lua @@ -1,124 +1,89 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m4a1" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Base" - - weapon.Primary.RPM = 700 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.23 - weapon.Primary.Automatic = true - weapon.Primary.Ammo = "ar2" - weapon.Primary.NumShots = 1 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.04 - weapon.Primary.IronAccuracy = 0.0055 - end +cfcEntityStubber.registerStub( "m9k_m4a1", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Base" + + weapon.Primary.RPM = 700 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.23 + weapon.Primary.Automatic = true + weapon.Primary.Ammo = "ar2" + weapon.Primary.NumShots = 1 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.04 + weapon.Primary.IronAccuracy = 0.0055 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_l85" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Base" - - weapon.Primary.RPM = 700 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.25 - weapon.Primary.Automatic = true - weapon.Primary.Ammo = "ar2" - weapon.Primary.NumShots = 1 - weapon.Primary.Damage = 25 - weapon.Primary.Spread = 0.043 - weapon.Primary.Sound = "an94.Single" - weapon.Primary.SpreadZoomed = 0.005 - end +cfcEntityStubber.registerStub( "m9k_l85", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Base" + + weapon.Primary.RPM = 700 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.25 + weapon.Primary.Automatic = true + weapon.Primary.Ammo = "ar2" + weapon.Primary.NumShots = 1 + weapon.Primary.Damage = 25 + weapon.Primary.Spread = 0.043 + weapon.Primary.Sound = "an94.Single" + weapon.Primary.SpreadZoomed = 0.005 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m416" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Base" - - weapon.Primary.RPM = 675 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 0.95 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.21 - weapon.Primary.Automatic = true - weapon.Primary.Ammo = "ar2" - weapon.Primary.NumShots = 1 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.04 - weapon.Primary.IronAccuracy = 0.0055 - end +cfcEntityStubber.registerStub( "m9k_m416", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Base" + + weapon.Primary.RPM = 675 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 0.95 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.21 + weapon.Primary.Automatic = true + weapon.Primary.Ammo = "ar2" + weapon.Primary.NumShots = 1 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.04 + weapon.Primary.IronAccuracy = 0.0055 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_acr" - - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Base" - - weapon.Primary.RPM = 725 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 1.8 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.25 - weapon.Primary.Automatic = true - weapon.Primary.Ammo = "ar2" - weapon.Primary.NumShots = 1 - weapon.Primary.Damage = 20 - weapon.Primary.Spread = 0.05 - weapon.Primary.IronAccuracy = 0.01 - end +cfcEntityStubber.registerStub( "m9k_acr", function( weapon ) + local weapon = cfcEntityStubber.getWeapon( weaponClass ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Base" + + weapon.Primary.RPM = 725 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 1.8 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.25 + weapon.Primary.Automatic = true + weapon.Primary.Ammo = "ar2" + weapon.Primary.NumShots = 1 + weapon.Primary.Damage = 20 + weapon.Primary.Spread = 0.05 + weapon.Primary.IronAccuracy = 0.01 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_amd65" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Base" - - weapon.Primary.RPM = 690 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 0.95 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.23 - weapon.Primary.Automatic = true - weapon.Primary.Ammo = "ar2" - weapon.Primary.NumShots = 1 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.04 - weapon.Primary.IronAccuracy = 0.01 - end +cfcEntityStubber.registerStub( "m9k_amd65", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Base" + + weapon.Primary.RPM = 690 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 0.95 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.23 + weapon.Primary.Automatic = true + weapon.Primary.Ammo = "ar2" + weapon.Primary.NumShots = 1 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.04 + weapon.Primary.IronAccuracy = 0.01 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_battle.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_battle.lua index f2afc4d..8628871 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_battle.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_battle.lua @@ -1,86 +1,58 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_g3a3" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Battle" - - weapon.Primary.RPM = 550 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1.1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.35 - weapon.Primary.Damage = 30 - weapon.Primary.Spread = 0.05 - weapon.Primary.IronAccuracy = 0.01 - end +cfcEntityStubber.registerStub( "m9k_g3a3", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Battle" + + weapon.Primary.RPM = 550 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1.1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.35 + weapon.Primary.Damage = 30 + weapon.Primary.Spread = 0.05 + weapon.Primary.IronAccuracy = 0.01 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m16a4_acog" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Battle" - - weapon.Primary.RPM = 450 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1.3 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.3 - weapon.Primary.Damage = 30 - weapon.Primary.Spread = 0.03 - weapon.Primary.SpreadZoomed = 0.006 - end +cfcEntityStubber.registerStub( "m9k_m16a4_acog", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Battle" + + weapon.Primary.RPM = 450 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1.3 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.3 + weapon.Primary.Damage = 30 + weapon.Primary.Spread = 0.03 + weapon.Primary.SpreadZoomed = 0.006 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_fal" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Battle" - - weapon.Primary.RPM = 450 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.3 - weapon.Primary.Damage = 35 - weapon.Primary.Spread = 0.03 - weapon.Primary.IronAccuracy = 0.008 - weapon.Primary.Automatic = false - end +cfcEntityStubber.registerStub( "m9k_fal", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Battle" + + weapon.Primary.RPM = 450 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.3 + weapon.Primary.Damage = 35 + weapon.Primary.Spread = 0.03 + weapon.Primary.IronAccuracy = 0.008 + weapon.Primary.Automatic = false end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_scar" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Battle" - - weapon.Primary.RPM = 485 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 1.1 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.6 - weapon.Primary.Damage = 32 - weapon.Primary.Spread = 0.03 - weapon.Primary.IronAccuracy = 0.006 - end -end ) \ No newline at end of file +cfcEntityStubber.registerStub( "m9k_scar", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Battle" + + weapon.Primary.RPM = 485 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 1.1 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.6 + weapon.Primary.Damage = 32 + weapon.Primary.Spread = 0.03 + weapon.Primary.IronAccuracy = 0.006 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_heavy.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_heavy.lua index 6c3c481..73744f5 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_heavy.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_heavy.lua @@ -1,13 +1,12 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_ak47", "m9k_ak74" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "Rifle:Heavy" @@ -19,70 +18,49 @@ cfcEntityStubber.registerStub( function() weapon.Primary.Damage = 35 weapon.Primary.Spread = 0.05 weapon.Primary.IronAccuracy = 0.0047 - end -end ) - -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_an94" - } + end ) +end - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Heavy" +cfcEntityStubber.registerStub( "m9k_an94", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Heavy" - weapon.Primary.RPM = 400 - weapon.Primary.ClipSize = 15 - weapon.Primary.KickUp = 1.7 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.23 - weapon.Primary.Damage = 28 - weapon.Primary.Spread = 0.05 - weapon.Primary.IronAccuracy = 0.0047 - weapon.Primary.NumShots = 2 - weapon.Primary.Automatic = false - end + weapon.Primary.RPM = 400 + weapon.Primary.ClipSize = 15 + weapon.Primary.KickUp = 1.7 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.23 + weapon.Primary.Damage = 28 + weapon.Primary.Spread = 0.05 + weapon.Primary.IronAccuracy = 0.0047 + weapon.Primary.NumShots = 2 + weapon.Primary.Automatic = false end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_vikhr" - } +cfcEntityStubber.registerStub( "m9k_vikhr", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Heavy" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Heavy" - - weapon.Primary.RPM = 625 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 1.3 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.25 - weapon.Primary.Damage = 30 - weapon.Primary.Spread = 0.053 - weapon.Primary.IronAccuracy = 0.005 - end + weapon.Primary.RPM = 625 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 1.3 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.25 + weapon.Primary.Damage = 30 + weapon.Primary.Spread = 0.053 + weapon.Primary.IronAccuracy = 0.005 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_g36" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Heavy" +cfcEntityStubber.registerStub( "m9k_g36", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Heavy" - weapon.Primary.RPM = 575 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 1.15 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.23 - weapon.Primary.Damage = 35 - weapon.Primary.Spread = 0.05 - weapon.Primary.IronAccuracy = 0.0047 - end -end ) \ No newline at end of file + weapon.Primary.RPM = 575 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 1.15 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.23 + weapon.Primary.Damage = 35 + weapon.Primary.Spread = 0.05 + weapon.Primary.IronAccuracy = 0.0047 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_light.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_light.lua index b562b64..b8e74f6 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_light.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_light.lua @@ -1,6 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_tar21", "m9k_honeybadger", @@ -11,8 +11,7 @@ cfcEntityStubber.registerStub( function() "m9k_auga3" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "Rifle:Light" @@ -24,23 +23,22 @@ cfcEntityStubber.registerStub( function() weapon.Primary.Damage = 25 weapon.Primary.Spread = 0.04 weapon.Primary.IronAccuracy = 0.01 - end -end ) + end ) +end -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_f2000", "m9k_honeybadger", "m9k_auga3" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "Rifle:Light" weapon.Primary.SpreadBefore = 0.04 weapon.Primary.SpreadZoomed = 0.002 weapon.Primary.Damage = 20 - end -end ) + end ) +end diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_marksman.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_marksman.lua index 0dd31db..d65e3c6 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_marksman.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_rifle_marksman.lua @@ -1,73 +1,52 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m14sp" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Marksman" - - weapon.Primary.RPM = 300 - weapon.Primary.ClipSize = 15 - weapon.Primary.KickUp = 2 - weapon.Primary.KickDown = 1 - weapon.Primary.KickHorizontal = 0.2 - weapon.Primary.Automatic = false - weapon.Primary.Ammo = "AirboatGun" - weapon.Primary.Damage = 55 - weapon.Primary.Spread = 0.06 - weapon.Primary.IronAccuracy = 0.0001 - weapon.Primary.DefaultClip = 1001 - end +cfcEntityStubber.registerStub( "m9k_m14sp", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Marksman" + + weapon.Primary.RPM = 300 + weapon.Primary.ClipSize = 15 + weapon.Primary.KickUp = 2 + weapon.Primary.KickDown = 1 + weapon.Primary.KickHorizontal = 0.2 + weapon.Primary.Automatic = false + weapon.Primary.Ammo = "AirboatGun" + weapon.Primary.Damage = 55 + weapon.Primary.Spread = 0.06 + weapon.Primary.IronAccuracy = 0.0001 + weapon.Primary.DefaultClip = 1001 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_sl8" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Marksman" - - weapon.Primary.RPM = 300 - weapon.Primary.ClipSize = 15 - weapon.Primary.KickUp = 2 - weapon.Primary.KickDown = 1 - weapon.Primary.KickHorizontal = 0.2 - weapon.Primary.Automatic = true - weapon.Primary.Ammo = "AirboatGun" - weapon.Primary.Damage = 49 - weapon.Primary.SpreadBefore = 0.065 - weapon.Primary.SpreadZoomed = 0.0005 - weapon.Primary.DefaultClip = 1000 - end +cfcEntityStubber.registerStub( "m9k_sl8", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Marksman" + + weapon.Primary.RPM = 300 + weapon.Primary.ClipSize = 15 + weapon.Primary.KickUp = 2 + weapon.Primary.KickDown = 1 + weapon.Primary.KickHorizontal = 0.2 + weapon.Primary.Automatic = true + weapon.Primary.Ammo = "AirboatGun" + weapon.Primary.Damage = 49 + weapon.Primary.SpreadBefore = 0.065 + weapon.Primary.SpreadZoomed = 0.0005 + weapon.Primary.DefaultClip = 1000 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_winchester73" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Rifle:Marksman" - - weapon.Primary.RPM = 70 - weapon.Primary.ClipSize = 7 - weapon.Primary.KickUp = 2 - weapon.Primary.KickDown = 1 - weapon.Primary.KickHorizontal = 0.3 - weapon.Primary.Automatic = false - weapon.Primary.Ammo = "AirboatGun" - weapon.Primary.Damage = 70 - weapon.Primary.Spread = 0.003 - weapon.Primary.IronAccuracy = 0.0001 - weapon.Primary.DefaultClip = 1000 - end +cfcEntityStubber.registerStub( "m9k_winchester73", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Rifle:Marksman" + + weapon.Primary.RPM = 70 + weapon.Primary.ClipSize = 7 + weapon.Primary.KickUp = 2 + weapon.Primary.KickDown = 1 + weapon.Primary.KickHorizontal = 0.3 + weapon.Primary.Automatic = false + weapon.Primary.Ammo = "AirboatGun" + weapon.Primary.Damage = 70 + weapon.Primary.Spread = 0.003 + weapon.Primary.IronAccuracy = 0.0001 + weapon.Primary.DefaultClip = 1000 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_scoped_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_scoped_base.lua index f11fde9..b0e4e44 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_scoped_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_scoped_base.lua @@ -1,6 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "bobs_scoped_base" ) + +cfcEntityStubber.registerStub( "bobs_scoped_base", function( weapon ) weapon.ShouldDoMoveSpread = false function weapon:ScopeIN() diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_base.lua index d434da6..a9bc4cb 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_base.lua @@ -1,47 +1,33 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_ithacam37" - } +cfcEntityStubber.registerStub( "m9k_ithacam37", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Shotgun:Base" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Shotgun:Base" - - weapon.Primary.RPM = 60 - weapon.Primary.ClipSize = 8 - weapon.Primary.KickUp = 3 - weapon.Primary.KickDown = 2 - weapon.Primary.KickHorizontal = 5 - weapon.Primary.NumShots = 12 - weapon.Primary.Damage = 12 - weapon.Primary.Spread = 0.05 - weapon.Primary.IronAccuracy = 0.02 - weapon.ShellTime = 0.4 - end + weapon.Primary.RPM = 60 + weapon.Primary.ClipSize = 8 + weapon.Primary.KickUp = 3 + weapon.Primary.KickDown = 2 + weapon.Primary.KickHorizontal = 5 + weapon.Primary.NumShots = 12 + weapon.Primary.Damage = 12 + weapon.Primary.Spread = 0.05 + weapon.Primary.IronAccuracy = 0.02 + weapon.ShellTime = 0.4 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_1887winchester" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Shotgun:Base" +cfcEntityStubber.registerStub( "m9k_1887winchester", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Shotgun:Base" - weapon.Primary.RPM = 75 - weapon.Primary.ClipSize = 8 - weapon.Primary.KickUp = 3 - weapon.Primary.KickDown = 2 - weapon.Primary.KickHorizontal = 5 - weapon.Primary.NumShots = 12 - weapon.Primary.Damage = 12 - weapon.Primary.Spread = 0.055 - weapon.Primary.IronAccuracy = 0.025 - weapon.ShellTime = 0.4 - end + weapon.Primary.RPM = 75 + weapon.Primary.ClipSize = 8 + weapon.Primary.KickUp = 3 + weapon.Primary.KickDown = 2 + weapon.Primary.KickHorizontal = 5 + weapon.Primary.NumShots = 12 + weapon.Primary.Damage = 12 + weapon.Primary.Spread = 0.055 + weapon.Primary.IronAccuracy = 0.025 + weapon.ShellTime = 0.4 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_elephant.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_elephant.lua index 5f40c2c..2309e91 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_elephant.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_elephant.lua @@ -1,22 +1,15 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_dbarrel" - } +cfcEntityStubber.registerStub( "m9k_dbarrel", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Shotgun:Elephant" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Shotgun:Elephant" - - weapon.Primary.RPM = 50 - weapon.Primary.ClipSize = 2 - weapon.Primary.KickUp = 6 - weapon.Primary.KickDown = 2 - weapon.Primary.KickHorizontal = 5 - weapon.Primary.NumShots = 12 - weapon.Primary.Damage = 15 - weapon.Primary.Spread = 0.07 - end + weapon.Primary.RPM = 50 + weapon.Primary.ClipSize = 2 + weapon.Primary.KickUp = 6 + weapon.Primary.KickDown = 2 + weapon.Primary.KickHorizontal = 5 + weapon.Primary.NumShots = 12 + weapon.Primary.Damage = 15 + weapon.Primary.Spread = 0.07 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_heavy.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_heavy.lua index 077835e..d07e5c1 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_heavy.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_heavy.lua @@ -1,49 +1,35 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_mossberg590" - } +cfcEntityStubber.registerStub( "m9k_mossberg590", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Shotgun:Heavy" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Shotgun:Heavy" - - weapon.Primary.RPM = 50 - weapon.Primary.ClipSize = 5 - weapon.Primary.KickUp = 5 - weapon.Primary.KickDown = 2 - weapon.Primary.KickHorizontal = 5 - weapon.Primary.NumShots = 12 - weapon.Primary.Damage = 15 - weapon.Primary.Spread = 0.07 - weapon.Primary.IronAccuracy = 0.03 - weapon.Primary.Ammo = "AirboatGun" - weapon.Primary.DefaultClip = 1000 - end + weapon.Primary.RPM = 50 + weapon.Primary.ClipSize = 5 + weapon.Primary.KickUp = 5 + weapon.Primary.KickDown = 2 + weapon.Primary.KickHorizontal = 5 + weapon.Primary.NumShots = 12 + weapon.Primary.Damage = 15 + weapon.Primary.Spread = 0.07 + weapon.Primary.IronAccuracy = 0.03 + weapon.Primary.Ammo = "AirboatGun" + weapon.Primary.DefaultClip = 1000 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_1897winchester" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Shotgun:Heavy" +cfcEntityStubber.registerStub( "m9k_1897winchester", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Shotgun:Heavy" - weapon.Primary.RPM = 55 - weapon.Primary.ClipSize = 5 - weapon.Primary.KickUp = 5 - weapon.Primary.KickDown = 2 - weapon.Primary.KickHorizontal = 5 - weapon.Primary.NumShots = 12 - weapon.Primary.Damage = 15 - weapon.Primary.Spread = 0.073 - weapon.Primary.IronAccuracy = 0.033 - weapon.Primary.Ammo = "AirboatGun" - weapon.Primary.DefaultClip = 1000 - end + weapon.Primary.RPM = 55 + weapon.Primary.ClipSize = 5 + weapon.Primary.KickUp = 5 + weapon.Primary.KickDown = 2 + weapon.Primary.KickHorizontal = 5 + weapon.Primary.NumShots = 12 + weapon.Primary.Damage = 15 + weapon.Primary.Spread = 0.073 + weapon.Primary.IronAccuracy = 0.033 + weapon.Primary.Ammo = "AirboatGun" + weapon.Primary.DefaultClip = 1000 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_highrepeating.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_highrepeating.lua index a4047e2..f893bc0 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_highrepeating.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_highrepeating.lua @@ -1,49 +1,35 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_striker12" - } +cfcEntityStubber.registerStub( "m9k_striker12", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Shotgun:HighCap" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Shotgun:HighCap" - - weapon.Primary.RPM = 325 - weapon.Primary.ClipSize = 12 - weapon.Primary.KickUp = 3 - weapon.Primary.KickDown = 1 - weapon.Primary.KickHorizontal = 1.2 - weapon.Primary.Automatic = true - weapon.Primary.NumShots = 12 - weapon.Primary.Damage = 6 - weapon.Primary.Spread = 0.09 - weapon.Primary.IronAccuracy = 0.05 - weapon.ShellTime = 0.09 - end + weapon.Primary.RPM = 325 + weapon.Primary.ClipSize = 12 + weapon.Primary.KickUp = 3 + weapon.Primary.KickDown = 1 + weapon.Primary.KickHorizontal = 1.2 + weapon.Primary.Automatic = true + weapon.Primary.NumShots = 12 + weapon.Primary.Damage = 6 + weapon.Primary.Spread = 0.09 + weapon.Primary.IronAccuracy = 0.05 + weapon.ShellTime = 0.09 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_usas" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Shotgun:HighCap" +cfcEntityStubber.registerStub( "m9k_usas", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Shotgun:HighCap" - weapon.Primary.RPM = 325 - weapon.Primary.ClipSize = 20 - weapon.Primary.KickUp = 3 - weapon.Primary.KickDown = 1 - weapon.Primary.KickHorizontal = 1.2 - weapon.Primary.Automatic = true - weapon.Primary.NumShots = 12 - weapon.Primary.Damage = 5 - weapon.Primary.Spread = 0.09 - weapon.Primary.IronAccuracy = 0.05 - weapon.ShellTime = 0.09 - end + weapon.Primary.RPM = 325 + weapon.Primary.ClipSize = 20 + weapon.Primary.KickUp = 3 + weapon.Primary.KickDown = 1 + weapon.Primary.KickHorizontal = 1.2 + weapon.Primary.Automatic = true + weapon.Primary.NumShots = 12 + weapon.Primary.Damage = 5 + weapon.Primary.Spread = 0.09 + weapon.Primary.IronAccuracy = 0.05 + weapon.ShellTime = 0.09 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_light.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_light.lua index 92cae0b..7b59359 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_light.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_light.lua @@ -1,13 +1,12 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_m3", "m9k_remington870" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "Shotgun:Light" @@ -20,5 +19,5 @@ cfcEntityStubber.registerStub( function() weapon.Primary.Damage = 9 weapon.Primary.Spread = 0.05 weapon.Primary.IronAccuracy = 0.016 - end -end ) + end ) +end diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_lowrepeating.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_lowrepeating.lua index f98272c..888b70a 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_lowrepeating.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_shotgun_lowrepeating.lua @@ -1,14 +1,13 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_spas12", "m9k_browningauto5", "m9k_jackhammer" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "Shotgun:LowCap" @@ -21,5 +20,5 @@ cfcEntityStubber.registerStub( function() weapon.Primary.Damage = 8 weapon.Primary.Spread = 0.09 weapon.Primary.IronAccuracy = 0.04 - end -end ) + end ) +end diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_base.lua index 51dac0e..1324fe4 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_base.lua @@ -1,6 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_mp5", "m9k_mp7", @@ -8,8 +8,7 @@ cfcEntityStubber.registerStub( function() "m9k_magpulpdr" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "SMG:Base" @@ -21,17 +20,16 @@ cfcEntityStubber.registerStub( function() weapon.Primary.Damage = 20 weapon.Primary.Spread = 0.036 weapon.Primary.IronAccuracy = 0.02 - end -end ) + end ) +end -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_mp5", "m9k_magpulpdr" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "SMG:Base" @@ -39,5 +37,5 @@ cfcEntityStubber.registerStub( function() weapon.Primary.RPM = 850 weapon.Primary.Spread = 0.04 weapon.Primary.IronAccuracy = 0.03 - end -end ) + end ) +end diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_heavy.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_heavy.lua index 081d13b..33753e6 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_heavy.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_heavy.lua @@ -1,106 +1,71 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_ump45" - } +cfcEntityStubber.registerStub( "m9k_ump45", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "SMG:Heavy" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "SMG:Heavy" - - weapon.Primary.RPM = 750 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 0.55 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.22 - weapon.Primary.Damage = 24 - weapon.Primary.Spread = 0.03 - weapon.Primary.IronAccuracy = 0.027 - end + weapon.Primary.RPM = 750 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 0.55 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.22 + weapon.Primary.Damage = 24 + weapon.Primary.Spread = 0.03 + weapon.Primary.IronAccuracy = 0.027 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_usc" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "SMG:Heavy" +cfcEntityStubber.registerStub( "m9k_usc", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "SMG:Heavy" - weapon.Primary.RPM = 750 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 0.53 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.21 - weapon.Primary.Damage = 24 - weapon.Primary.Spread = 0.027 - weapon.Primary.IronAccuracy = 0.02 - end + weapon.Primary.RPM = 750 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 0.53 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.21 + weapon.Primary.Damage = 24 + weapon.Primary.Spread = 0.027 + weapon.Primary.IronAccuracy = 0.02 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_mp40" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "SMG:Heavy" +cfcEntityStubber.registerStub( "m9k_mp40", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "SMG:Heavy" - weapon.Primary.RPM = 750 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 0.53 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.22 - weapon.Primary.Damage = 24 - weapon.Primary.Spread = 0.03 - weapon.Primary.IronAccuracy = 0.027 - end + weapon.Primary.RPM = 750 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 0.53 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.22 + weapon.Primary.Damage = 24 + weapon.Primary.Spread = 0.03 + weapon.Primary.IronAccuracy = 0.027 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_uzi" - } +cfcEntityStubber.registerStub( "m9k_uzi", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "SMG:Heavy" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "SMG:Heavy" - - weapon.Primary.RPM = 750 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 0.55 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.2 - weapon.Primary.Damage = 24 - weapon.Primary.Spread = 0.03 - weapon.Primary.IronAccuracy = 0.027 - end + weapon.Primary.RPM = 750 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 0.55 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.2 + weapon.Primary.Damage = 24 + weapon.Primary.Spread = 0.03 + weapon.Primary.IronAccuracy = 0.027 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_sten" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "SMG:Heavy" +cfcEntityStubber.registerStub( "m9k_sten", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "SMG:Heavy" - weapon.Primary.RPM = 725 - weapon.Primary.ClipSize = 30 - weapon.Primary.KickUp = 0.53 - weapon.Primary.KickDown = 0 - weapon.Primary.KickHorizontal = 0.22 - weapon.Primary.Damage = 24 - weapon.Primary.Spread = 0.027 - weapon.Primary.IronAccuracy = 0.024 - end + weapon.Primary.RPM = 725 + weapon.Primary.ClipSize = 30 + weapon.Primary.KickUp = 0.53 + weapon.Primary.KickDown = 0 + weapon.Primary.KickHorizontal = 0.22 + weapon.Primary.Damage = 24 + weapon.Primary.Spread = 0.027 + weapon.Primary.IronAccuracy = 0.024 end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_highcap.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_highcap.lua index a0dcc9a..b5cd6c7 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_highcap.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_highcap.lua @@ -1,14 +1,13 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_bizonp19", "m9k_smgp90", "m9k_thompson" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "SMG:HighCap" @@ -20,5 +19,5 @@ cfcEntityStubber.registerStub( function() weapon.Primary.Damage = 19 weapon.Primary.Spread = 0.04 weapon.Primary.IronAccuracy = 0.03 - end -end ) + end ) +end diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_light.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_light.lua index cb64f31..5740ddd 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_light.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_smg_light.lua @@ -1,13 +1,12 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_vector", "m9k_mp9" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "SMG:Light" @@ -19,5 +18,5 @@ cfcEntityStubber.registerStub( function() weapon.Primary.Damage = 19 weapon.Primary.Spread = 0.02 weapon.Primary.IronAccuracy = 0.01 - end -end ) + end ) +end diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_antimat.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_antimat.lua index 014fd7b..f7c967a 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_antimat.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_antimat.lua @@ -1,25 +1,18 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_barret_m82" - } +cfcEntityStubber.registerStub( "m9k_barret_m82", function( weapon ) + weapon.Purpose = "Strong against props at medium range, but too inacurate to effectivly hit infantry." + weapon.CFC_Category = "Sniper:AntiMat" + weapon.PrintName = "Anti-Materiel Rifle" - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "Strong against props at medium range, but too inacurate to effectivly hit infantry." - weapon.CFC_Category = "Sniper:AntiMat" - weapon.PrintName = "Anti-Materiel Rifle" - - weapon.Primary.RPM = 100 - weapon.Primary.ClipSize = 5 - weapon.Primary.KickUp = 2.5 - weapon.Primary.KickDown = 1 - weapon.Primary.KickHorizontal = 3 - weapon.Primary.Damage = 150 - weapon.Primary.SpreadBefore = 0.07 - weapon.Primary.SpreadZoomed = 0.0015 - weapon.Primary.DefaultClip = 1000 - weapon.ACF_DamageMult = 10 - end -end ) \ No newline at end of file + weapon.Primary.RPM = 100 + weapon.Primary.ClipSize = 5 + weapon.Primary.KickUp = 2.5 + weapon.Primary.KickDown = 1 + weapon.Primary.KickHorizontal = 3 + weapon.Primary.Damage = 150 + weapon.Primary.SpreadBefore = 0.07 + weapon.Primary.SpreadZoomed = 0.0015 + weapon.Primary.DefaultClip = 1000 + weapon.ACF_DamageMult = 10 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_base.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_base.lua index 8b43fd3..d2b27c2 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_base.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_base.lua @@ -1,68 +1,47 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m24" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Sniper:Base" - - weapon.Primary.RPM = 50 - weapon.Primary.ClipSize = 8 - weapon.Primary.KickUp = 2 - weapon.Primary.KickDown = 4 - weapon.Primary.KickHorizontal = 8 - weapon.Primary.Damage = 75 - weapon.Primary.SpreadBefore = 0.02 - weapon.Primary.SpreadZoomed = 0.0001 - weapon.Primary.DefaultClip = 1000 - end +cfcEntityStubber.registerStub( "m9k_m24", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Sniper:Base" + + weapon.Primary.RPM = 50 + weapon.Primary.ClipSize = 8 + weapon.Primary.KickUp = 2 + weapon.Primary.KickDown = 4 + weapon.Primary.KickHorizontal = 8 + weapon.Primary.Damage = 75 + weapon.Primary.SpreadBefore = 0.02 + weapon.Primary.SpreadZoomed = 0.0001 + weapon.Primary.DefaultClip = 1000 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_remington7615p" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Sniper:Base" - - weapon.Primary.RPM = 75 - weapon.Primary.ClipSize = 8 - weapon.Primary.KickUp = 2 - weapon.Primary.KickDown = 4 - weapon.Primary.KickHorizontal = 8 - weapon.Primary.Damage = 25 - weapon.Primary.SpreadBefore = 0.035 - weapon.Primary.SpreadZoomed = 0.0005 - weapon.Primary.DefaultClip = 1000 - end +cfcEntityStubber.registerStub( "m9k_remington7615p", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Sniper:Base" + + weapon.Primary.RPM = 75 + weapon.Primary.ClipSize = 8 + weapon.Primary.KickUp = 2 + weapon.Primary.KickDown = 4 + weapon.Primary.KickHorizontal = 8 + weapon.Primary.Damage = 25 + weapon.Primary.SpreadBefore = 0.035 + weapon.Primary.SpreadZoomed = 0.0005 + weapon.Primary.DefaultClip = 1000 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_contender" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Sniper:Base" - - weapon.Primary.RPM = 50 - weapon.Primary.ClipSize = 1 - weapon.Primary.KickUp = 4 - weapon.Primary.KickDown = 6 - weapon.Primary.KickHorizontal = 8 - weapon.Primary.Automatic = false - weapon.Primary.Damage = 75 - weapon.Primary.SpreadBefore = 0.013 - weapon.Primary.SpreadZoomed = 0.0001 - weapon.Primary.DefaultClip = 1000 - end -end ) \ No newline at end of file +cfcEntityStubber.registerStub( "m9k_contender", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Sniper:Base" + + weapon.Primary.RPM = 50 + weapon.Primary.ClipSize = 1 + weapon.Primary.KickUp = 4 + weapon.Primary.KickDown = 6 + weapon.Primary.KickHorizontal = 8 + weapon.Primary.Automatic = false + weapon.Primary.Damage = 75 + weapon.Primary.SpreadBefore = 0.013 + weapon.Primary.SpreadZoomed = 0.0001 + weapon.Primary.DefaultClip = 1000 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_heavy.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_heavy.lua index 228c0a9..b38b0ca 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_heavy.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_heavy.lua @@ -1,67 +1,46 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_aw50" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Sniper:Heavy" - - weapon.Primary.RPM = 40 - weapon.Primary.ClipSize = 5 - weapon.Primary.KickUp = 4 - weapon.Primary.KickDown = 6 - weapon.Primary.KickHorizontal = 8 - weapon.Primary.Damage = 105 - weapon.Primary.SpreadBefore = 0.06 - weapon.Primary.SpreadZoomed = 0.0002 - weapon.Primary.DefaultClip = 1000 - end +cfcEntityStubber.registerStub( "m9k_aw50", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Sniper:Heavy" + + weapon.Primary.RPM = 40 + weapon.Primary.ClipSize = 5 + weapon.Primary.KickUp = 4 + weapon.Primary.KickDown = 6 + weapon.Primary.KickHorizontal = 8 + weapon.Primary.Damage = 105 + weapon.Primary.SpreadBefore = 0.06 + weapon.Primary.SpreadZoomed = 0.0002 + weapon.Primary.DefaultClip = 1000 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_m98b" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Sniper:Heavy" - - weapon.Primary.RPM = 40 - weapon.Primary.ClipSize = 5 - weapon.Primary.KickUp = 4 - weapon.Primary.KickDown = 6 - weapon.Primary.KickHorizontal = 8 - weapon.Primary.Damage = 105 - weapon.Primary.SpreadBefore = 0.06 - weapon.Primary.SpreadZoomed = 0.0002 - weapon.Primary.DefaultClip = 1000 - end +cfcEntityStubber.registerStub( "m9k_m98b", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Sniper:Heavy" + + weapon.Primary.RPM = 40 + weapon.Primary.ClipSize = 5 + weapon.Primary.KickUp = 4 + weapon.Primary.KickDown = 6 + weapon.Primary.KickHorizontal = 8 + weapon.Primary.Damage = 105 + weapon.Primary.SpreadBefore = 0.06 + weapon.Primary.SpreadZoomed = 0.0002 + weapon.Primary.DefaultClip = 1000 end ) -cfcEntityStubber.registerStub( function() - local weapons = { - "m9k_intervention" - } - - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - weapon.Purpose = "" - weapon.CFC_Category = "Sniper:Heavy" - - weapon.Primary.RPM = 40 - weapon.Primary.ClipSize = 5 - weapon.Primary.KickUp = 4 - weapon.Primary.KickDown = 6 - weapon.Primary.KickHorizontal = 8 - weapon.Primary.Damage = 105 - weapon.Primary.SpreadBefore = 0.06 - weapon.Primary.SpreadZoomed = 0.0002 - weapon.Primary.DefaultClip = 1000 - end -end ) \ No newline at end of file +cfcEntityStubber.registerStub( "m9k_intervention", function( weapon ) + weapon.Purpose = "" + weapon.CFC_Category = "Sniper:Heavy" + + weapon.Primary.RPM = 40 + weapon.Primary.ClipSize = 5 + weapon.Primary.KickUp = 4 + weapon.Primary.KickDown = 6 + weapon.Primary.KickHorizontal = 8 + weapon.Primary.Damage = 105 + weapon.Primary.SpreadBefore = 0.06 + weapon.Primary.SpreadZoomed = 0.0002 + weapon.Primary.DefaultClip = 1000 +end ) diff --git a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_semi.lua b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_semi.lua index 6408599..e02672c 100644 --- a/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_semi.lua +++ b/lua/cfc_entity_stubber/cfc_m9k/cfc9k_sniper_semi.lua @@ -1,6 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() +do local weapons = { "m9k_dragunov", "m9k_psg1", @@ -8,8 +8,7 @@ cfcEntityStubber.registerStub( function() "m9k_svt40" } - for _, weaponClass in ipairs( weapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) + cfcEntityStubber.registerStub( weapons, function( weapon ) weapon.Purpose = "" weapon.CFC_Category = "Sniper:Semi" @@ -23,5 +22,5 @@ cfcEntityStubber.registerStub( function() weapon.Primary.SpreadZoomed = 0.0001 weapon.Primary.Automatic = false weapon.Primary.DefaultClip = 1000 - end -end ) + end ) +end diff --git a/lua/cfc_entity_stubber/css/set_max_ammo.lua b/lua/cfc_entity_stubber/css/set_max_ammo.lua index 2aa250d..2551724 100644 --- a/lua/cfc_entity_stubber/css/set_max_ammo.lua +++ b/lua/cfc_entity_stubber/css/set_max_ammo.lua @@ -1,6 +1,7 @@ AddCSLuaFile() + -- Stupid method but these fucking weapons don't use a base so it's the only way. -local cssWeapons = { +local weapons = { "weapon_elite", "weapon_p228", "weapon_glock", @@ -27,11 +28,6 @@ local cssWeapons = { "weapon_scout" } -cfcEntityStubber.registerStub( function() - for _, weaponClass in ipairs( cssWeapons ) do - local weapon = cfcEntityStubber.getWeapon( weaponClass ) - if IsValid( weapon ) then - weapon.Primary.MaxAmmo = weapon.Primary.MaxAmmo * 10 - end - end +cfcEntityStubber.registerStub( weapons, function( weapon ) + weapon.Primary.MaxAmmo = weapon.Primary.MaxAmmo * 10 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_base.lua b/lua/cfc_entity_stubber/cw/cw_base.lua index cc010cd..5e3139f 100644 --- a/lua/cfc_entity_stubber/cw/cw_base.lua +++ b/lua/cfc_entity_stubber/cw/cw_base.lua @@ -1,19 +1,19 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() + +cfcEntityStubber.registerStub( "cw_base", function( weapon ) -- https://github.com/Facepunch/garrysmod-issues/issues/5290 this issue makes some guns such as the cw rpg unusable on base branches -- So we just disable the spread sensitivity scaling - local cwBase = cfcEntityStubber.getWeapon( "cw_base" ) - cwBase.HolsterOnLadder = false - cwBase.NearWallEnabled = false - cwBase.scaleSensitivityToSpread = false + weapon.HolsterOnLadder = false + weapon.NearWallEnabled = false + weapon.scaleSensitivityToSpread = false if CLIENT then - cwBase._AdjustMouseSensitivity = cwBase._AdjustMouseSensitivity or cwBase.AdjustMouseSensitivity + weapon._AdjustMouseSensitivity = weapon._AdjustMouseSensitivity or weapon.AdjustMouseSensitivity - cwBase.AdjustMouseSensitivity = function(self, ...) + weapon.AdjustMouseSensitivity = function( self, ... ) self.OverallMouseSens = 1 - return cwBase._AdjustMouseSensitivity(self, ...) + return weapon._AdjustMouseSensitivity( self, ... ) end end end ) diff --git a/lua/cfc_entity_stubber/cw/cw_boberg.lua b/lua/cfc_entity_stubber/cw/cw_boberg.lua index ed8bcfc..0669683 100644 --- a/lua/cfc_entity_stubber/cw/cw_boberg.lua +++ b/lua/cfc_entity_stubber/cw/cw_boberg.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_boberg" ) +cfcEntityStubber.registerStub( "cw_boberg", function( weapon ) weapon.Damage = 50 weapon.AimSpread = 0.005 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_deagle.lua b/lua/cfc_entity_stubber/cw/cw_deagle.lua index f70f0ae..5de7b7d 100644 --- a/lua/cfc_entity_stubber/cw/cw_deagle.lua +++ b/lua/cfc_entity_stubber/cw/cw_deagle.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_deagle" ) +cfcEntityStubber.registerStub( "cw_deagle", function( weapon ) weapon.FireDelay = 0.595 weapon.ReloadSpeed = 1.25 weapon.HipSpread = 0.01 diff --git a/lua/cfc_entity_stubber/cw/cw_fiveseven.lua b/lua/cfc_entity_stubber/cw/cw_fiveseven.lua index c3d2e0a..cd92c72 100644 --- a/lua/cfc_entity_stubber/cw/cw_fiveseven.lua +++ b/lua/cfc_entity_stubber/cw/cw_fiveseven.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_fiveseven" ) +cfcEntityStubber.registerStub( "cw_fiveseven", function( weapon ) weapon.Damage = 30 weapon.HipSpread = 0.02 weapon.MaxSpreadInc = 0.02 diff --git a/lua/cfc_entity_stubber/cw/cw_g3a3.lua b/lua/cfc_entity_stubber/cw/cw_g3a3.lua index e8f509f..f38529b 100644 --- a/lua/cfc_entity_stubber/cw/cw_g3a3.lua +++ b/lua/cfc_entity_stubber/cw/cw_g3a3.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_g3a3" ) +cfcEntityStubber.registerStub( "cw_g3a3", function( weapon ) weapon.FireDelay = 0.09 weapon.ReloadSpeed = 1.40 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_g4p_awm.lua b/lua/cfc_entity_stubber/cw/cw_g4p_awm.lua index 0e85d5c..0aa0baf 100644 --- a/lua/cfc_entity_stubber/cw/cw_g4p_awm.lua +++ b/lua/cfc_entity_stubber/cw/cw_g4p_awm.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_g4p_awm" ) +cfcEntityStubber.registerStub( "cw_g4p_awm", function( weapon ) weapon.Recoil = 15 weapon.Damage = 150 weapon.ACF_DamageMult = 15 diff --git a/lua/cfc_entity_stubber/cw/cw_g4p_g2contender.lua b/lua/cfc_entity_stubber/cw/cw_g4p_g2contender.lua index 0f382d9..93ff028 100644 --- a/lua/cfc_entity_stubber/cw/cw_g4p_g2contender.lua +++ b/lua/cfc_entity_stubber/cw/cw_g4p_g2contender.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_g4p_g2contender" ) +cfcEntityStubber.registerStub( "cw_g4p_g2contender", function( weapon ) weapon.Attachments = {} weapon.Recoil = 60 weapon.Shots = 20 @@ -11,9 +10,11 @@ cfcEntityStubber.registerStub( function() weapon.ClumpSpread = 0.1 weapon.ReloadSpeed = 0.55 + if not SERVER then return end + local IsValid = IsValid - hook.Add( "EntityTakeDamage", "CW_Stubber_BuffWhateverGunForce", function( ent, dmg ) + hook.Add( "EntityTakeDamage", "EntityStubber_BuffContenderForce", function( ent, dmg ) local attacker = dmg:GetAttacker() if not IsValid( attacker ) then return end if not attacker:IsPlayer() then return end diff --git a/lua/cfc_entity_stubber/cw/cw_g4p_m98b.lua b/lua/cfc_entity_stubber/cw/cw_g4p_m98b.lua index 8aa9c02..e3416a7 100644 --- a/lua/cfc_entity_stubber/cw/cw_g4p_m98b.lua +++ b/lua/cfc_entity_stubber/cw/cw_g4p_m98b.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_g4p_m98b" ) +cfcEntityStubber.registerStub( "cw_g4p_m98b", function( weapon ) weapon.Damage = 110 weapon.ACF_DamageMult = 10 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_g4p_mp412_rex.lua b/lua/cfc_entity_stubber/cw/cw_g4p_mp412_rex.lua index 3364071..b3c8b86 100644 --- a/lua/cfc_entity_stubber/cw/cw_g4p_mp412_rex.lua +++ b/lua/cfc_entity_stubber/cw/cw_g4p_mp412_rex.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_g4p_mp412_rex" ) +cfcEntityStubber.registerStub( "cw_g4p_mp412_rex", function( weapon ) weapon.CanRicochet = true weapon.CanPenetrate = false weapon.ReloadSpeed = 1.1 @@ -14,5 +13,14 @@ cfcEntityStubber.registerStub( function() weapon.SpeedDec = 0 weapon.HolsterUnderwater = false weapon.FireDelay = 0.595 - weapon.NoRicochet = {[MAT_FLESH] = true, [MAT_ANTLION] = false, [MAT_BLOODYFLESH] = false, [MAT_DIRT] = false, [MAT_SAND] = false, [MAT_GLASS] = false, [MAT_ALIENFLESH] = false, [MAT_GRASS] = false} -end) + weapon.NoRicochet = { + [MAT_FLESH] = true, + [MAT_ANTLION] = false, + [MAT_BLOODYFLESH] = false, + [MAT_DIRT] = false, + [MAT_SAND] = false, + [MAT_GLASS] = false, + [MAT_ALIENFLESH] = false, + [MAT_GRASS] = false + } +end ) diff --git a/lua/cfc_entity_stubber/cw/cw_jng90.lua b/lua/cfc_entity_stubber/cw/cw_jng90.lua index 3ada4d6..b6dbaeb 100644 --- a/lua/cfc_entity_stubber/cw/cw_jng90.lua +++ b/lua/cfc_entity_stubber/cw/cw_jng90.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_jng90" ) +cfcEntityStubber.registerStub( "cw_jng90", function( weapon ) weapon.Damage = 120 weapon.ACF_DamageMult = 15 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_l115.lua b/lua/cfc_entity_stubber/cw/cw_l115.lua index 39af100..cf43a0c 100644 --- a/lua/cfc_entity_stubber/cw/cw_l115.lua +++ b/lua/cfc_entity_stubber/cw/cw_l115.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_l115" ) +cfcEntityStubber.registerStub( "cw_l115", function( weapon ) weapon.ACF_DamageMult = 15 weapon.damage = 150 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_m1911.lua b/lua/cfc_entity_stubber/cw/cw_m1911.lua index bc43779..f96d153 100644 --- a/lua/cfc_entity_stubber/cw/cw_m1911.lua +++ b/lua/cfc_entity_stubber/cw/cw_m1911.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_m1911" ) +cfcEntityStubber.registerStub( "cw_m1911", function( weapon ) weapon.AimSpread = 0.005 weapon.SpreadPerShot = 0.0005 weapon.Damage = 35 diff --git a/lua/cfc_entity_stubber/cw/cw_m249_official.lua b/lua/cfc_entity_stubber/cw/cw_m249_official.lua index 48e8dd4..4d1d545 100644 --- a/lua/cfc_entity_stubber/cw/cw_m249_official.lua +++ b/lua/cfc_entity_stubber/cw/cw_m249_official.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_m249_official" ) +cfcEntityStubber.registerStub( "cw_m249_official", function( weapon ) weapon.HipSpread = 0.02 weapon.VelocitySensitivity = 2.0 weapon.FireDelay = 0.1 diff --git a/lua/cfc_entity_stubber/cw/cw_makarov.lua b/lua/cfc_entity_stubber/cw/cw_makarov.lua index 289e915..92f2bc4 100644 --- a/lua/cfc_entity_stubber/cw/cw_makarov.lua +++ b/lua/cfc_entity_stubber/cw/cw_makarov.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_makarov" ) +cfcEntityStubber.registerStub( "cw_makarov", function( weapon ) weapon.Damage = 30 weapon.DeployTime = 0.01 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_mr96.lua b/lua/cfc_entity_stubber/cw/cw_mr96.lua index e5230a4..4797a4a 100644 --- a/lua/cfc_entity_stubber/cw/cw_mr96.lua +++ b/lua/cfc_entity_stubber/cw/cw_mr96.lua @@ -1,6 +1,5 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_mr96" ) +cfcEntityStubber.registerStub( "cw_mr96", function( weapon ) weapon.ReloadSpeed = 1.2 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_ragingbull.lua b/lua/cfc_entity_stubber/cw/cw_ragingbull.lua index 3486bc8..6828b5b 100644 --- a/lua/cfc_entity_stubber/cw/cw_ragingbull.lua +++ b/lua/cfc_entity_stubber/cw/cw_ragingbull.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_ragingbull" ) +cfcEntityStubber.registerStub( "cw_ragingbull", function( weapon ) weapon.HipSpread = 0.009 weapon.AimSpread = 0.009 weapon.MaxSpreadInc = 0.03 diff --git a/lua/cfc_entity_stubber/cw/cw_scarh.lua b/lua/cfc_entity_stubber/cw/cw_scarh.lua index bdd01eb..6a2588f 100644 --- a/lua/cfc_entity_stubber/cw/cw_scarh.lua +++ b/lua/cfc_entity_stubber/cw/cw_scarh.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_scarh" ) +cfcEntityStubber.registerStub( "cw_scarh", function( weapon ) weapon.AimSpread = 0.0010 weapon.SpreadPerShot = 0.005 weapon.ReloadSpeed = 1.3 diff --git a/lua/cfc_entity_stubber/cw/cw_shorty.lua b/lua/cfc_entity_stubber/cw/cw_shorty.lua index a6ee53d..5a46172 100644 --- a/lua/cfc_entity_stubber/cw/cw_shorty.lua +++ b/lua/cfc_entity_stubber/cw/cw_shorty.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_shorty" ) +cfcEntityStubber.registerStub( "cw_shorty", function( weapon ) weapon.VelocitySensitivity = 0.5 weapon.Recoil = 6 weapon.damage = 10 diff --git a/lua/cfc_entity_stubber/cw/cw_sv98.lua b/lua/cfc_entity_stubber/cw/cw_sv98.lua index e4648aa..b8386a0 100644 --- a/lua/cfc_entity_stubber/cw/cw_sv98.lua +++ b/lua/cfc_entity_stubber/cw/cw_sv98.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_sv98" ) +cfcEntityStubber.registerStub( "cw_sv98", function( weapon ) weapon.SpreadCooldown = 0.05 weapon.HipSpread = 0.05 weapon.damage = 125 diff --git a/lua/cfc_entity_stubber/cw/cw_trg42.lua b/lua/cfc_entity_stubber/cw/cw_trg42.lua index 1302feb..c716449 100644 --- a/lua/cfc_entity_stubber/cw/cw_trg42.lua +++ b/lua/cfc_entity_stubber/cw/cw_trg42.lua @@ -1,7 +1,6 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_trg42" ) +cfcEntityStubber.registerStub( "cw_trg42", function( weapon ) weapon.AimSpread = 0.0001 weapon.ACF_DamageMult = 10 end ) diff --git a/lua/cfc_entity_stubber/cw/cw_ump45.lua b/lua/cfc_entity_stubber/cw/cw_ump45.lua index 5ea5a0b..30b1f0a 100644 --- a/lua/cfc_entity_stubber/cw/cw_ump45.lua +++ b/lua/cfc_entity_stubber/cw/cw_ump45.lua @@ -1,6 +1,5 @@ AddCSLuaFile() -cfcEntityStubber.registerStub( function() - local weapon = cfcEntityStubber.getWeapon( "cw_ump45" ) +cfcEntityStubber.registerStub( "cw_ump45", function( weapon ) weapon.ReloadSpeed = 1.7 end ) diff --git a/lua/cfc_entity_stubber/lfs/combine_heli.lua b/lua/cfc_entity_stubber/lfs/combine_heli.lua index 0ec90c8..1e0865d 100644 --- a/lua/cfc_entity_stubber/lfs/combine_heli.lua +++ b/lua/cfc_entity_stubber/lfs/combine_heli.lua @@ -2,7 +2,6 @@ AddCSLuaFile() -- https://github.com/Blu-x92/LunasFlightSchool/blob/master/lfs_base_content/lua/entities/lunasflightschool_combineheli/shared.lua -cfcEntityStubber.registerStub( function() - local heli = scripted_ents.GetStored( "lunasflightschool_combineheli" ) - heli.MaxHealth = 1000 -- originally 1600 hp +cfcEntityStubber.registerStub( "lunasflightschool_combineheli", function( sent ) + sent.MaxHealth = 1000 -- originally 1600 hp end )