diff --git a/_maps/RandomRuins/SandRuins/whitesands_surface_starfurycrash.dmm b/_maps/RandomRuins/SandRuins/whitesands_surface_starfurycrash.dmm index 9e00376a8953..230481e65503 100644 --- a/_maps/RandomRuins/SandRuins/whitesands_surface_starfurycrash.dmm +++ b/_maps/RandomRuins/SandRuins/whitesands_surface_starfurycrash.dmm @@ -34,9 +34,7 @@ }, /area/overmap_encounter/planetoid/cave/explored) "dX" = ( -/obj/item/gun/ballistic/automatic/pistol{ - spawnwithmagazine = 0 - }, +/obj/item/gun/ballistic/automatic/pistol/no_mag, /turf/open/floor/plating/asteroid/whitesands, /area/overmap_encounter/planetoid/cave/explored) "eg" = ( diff --git a/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm b/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm index a4f6006bf88b..73f4a5875db1 100644 --- a/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm +++ b/_maps/RandomRuins/SpaceRuins/bigderelict1.dmm @@ -522,9 +522,7 @@ /turf/open/floor/plasteel, /area/ruin/space/has_grav/derelictoutpost/powerstorage) "bI" = ( -/obj/item/gun/ballistic/automatic/pistol/candor{ - spawnwithmagazine = 0 - }, +/obj/item/gun/ballistic/automatic/pistol/candor/no_mag, /turf/open/floor/plasteel, /area/ruin/space/has_grav/derelictoutpost/powerstorage) "bJ" = ( @@ -1333,9 +1331,7 @@ desc = "A thick gelatinous surface covers the floor. Someone get the golashes."; name = "gelatinous floor" }, -/obj/item/gun/ballistic/automatic/pistol/candor{ - spawnwithmagazine = 0 - }, +/obj/item/gun/ballistic/automatic/pistol/candor/no_mag, /obj/item/ammo_box/magazine/m45, /turf/open/floor/plating/asteroid, /area/ruin/space/has_grav/derelictoutpost) @@ -1493,9 +1489,7 @@ /turf/open/floor/plating, /area/ruin/space/has_grav/derelictoutpost) "dJ" = ( -/obj/item/gun/ballistic/automatic/pistol/candor{ - spawnwithmagazine = 0 - }, +/obj/item/gun/ballistic/automatic/pistol/candor/no_mag, /obj/structure/alien/weeds{ color = "#4BAE56"; desc = "A thick gelatinous surface covers the floor. Someone get the golashes."; diff --git a/_maps/RandomRuins/SpaceRuins/ntfacility.dmm b/_maps/RandomRuins/SpaceRuins/ntfacility.dmm index c9a4b0798185..bacfb7fe76ac 100644 --- a/_maps/RandomRuins/SpaceRuins/ntfacility.dmm +++ b/_maps/RandomRuins/SpaceRuins/ntfacility.dmm @@ -1619,9 +1619,7 @@ /turf/open/floor/plasteel/dark, /area/ruin/powered) "KJ" = ( -/obj/item/gun/ballistic/revolver/detective{ - spawnwithmagazine = 0 - }, +/obj/item/gun/ballistic/revolver/detective/no_mag, /obj/effect/decal/cleanable/blood, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt/dust, diff --git a/_maps/shuttles/inteq/inteq_talos.dmm b/_maps/shuttles/inteq/inteq_talos.dmm index 45ecbf33d0a7..1e08e3912dc6 100644 --- a/_maps/shuttles/inteq/inteq_talos.dmm +++ b/_maps/shuttles/inteq/inteq_talos.dmm @@ -3417,14 +3417,12 @@ /obj/structure/sign/poster/retro/lasergun_new{ pixel_x = -32 }, -/obj/item/gun/ballistic/shotgun/bulldog/inteq{ +/obj/item/gun/ballistic/shotgun/bulldog/inteq/no_mag{ pixel_x = -8; pixel_y = 8; - spawnwithmagazine = 0 }, -/obj/item/gun/ballistic/shotgun/bulldog/inteq{ +/obj/item/gun/ballistic/shotgun/bulldog/inteq/no_mag{ pixel_x = -12; - spawnwithmagazine = 0 }, /turf/open/floor/plasteel/tech/grid, /area/ship/security/armory) diff --git a/_maps/shuttles/inteq/inteq_vaquero.dmm b/_maps/shuttles/inteq/inteq_vaquero.dmm index 927f372ab3c5..23a80717b42f 100644 --- a/_maps/shuttles/inteq/inteq_vaquero.dmm +++ b/_maps/shuttles/inteq/inteq_vaquero.dmm @@ -263,10 +263,9 @@ /obj/item/ammo_box/magazine/co9mm{ pixel_x = -5 }, -/obj/item/gun/ballistic/shotgun/bulldog/inteq{ +/obj/item/gun/ballistic/shotgun/bulldog/inteq/no_mag{ pixel_x = -4; pixel_y = 5; - spawnwithmagazine = 0 }, /obj/item/gun/ballistic/automatic/pistol/commander/inteq, /obj/item/gun/ballistic/automatic/pistol/commander/inteq{ diff --git a/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm b/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm index 11840b667214..7bf283492efc 100644 --- a/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm +++ b/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm @@ -4672,8 +4672,7 @@ pixel_x = 6; pixel_y = 1 }, -/obj/item/gun/ballistic/automatic/sniper_rifle/syndicate{ - spawnwithmagazine = 0; +/obj/item/gun/ballistic/automatic/sniper_rifle/syndicate/no_mag{ pixel_x = -3; pixel_y = 6 }, @@ -5609,15 +5608,13 @@ /area/ship/security) "Gm" = ( /obj/structure/rack, -/obj/item/gun/ballistic/automatic/ebr{ +/obj/item/gun/ballistic/automatic/ebr/no_mag{ pixel_x = -16; pixel_y = 7; - spawnwithmagazine = 0 }, -/obj/item/gun/ballistic/automatic/ebr{ +/obj/item/gun/ballistic/automatic/ebr/no_mag{ pixel_x = -9; pixel_y = 2; - spawnwithmagazine = 0 }, /obj/item/ammo_box/magazine/ebr{ pixel_x = 10; @@ -7502,15 +7499,13 @@ /area/ship/hallway/aft) "Rv" = ( /obj/structure/rack, -/obj/item/gun/ballistic/shotgun/bulldog{ +/obj/item/gun/ballistic/shotgun/bulldog/no_mag{ pixel_x = -7; pixel_y = 7; - spawnwithmagazine = 0 }, -/obj/item/gun/ballistic/shotgun/bulldog{ +/obj/item/gun/ballistic/shotgun/bulldog/no_mag{ pixel_y = -3; pixel_x = 2; - spawnwithmagazine = 0 }, /obj/machinery/light/directional/north, /obj/item/ammo_box/magazine/m12g{ @@ -8841,19 +8836,16 @@ /area/ship/engineering/engine) "YO" = ( /obj/structure/rack, -/obj/item/gun/ballistic/automatic/smg/c20r{ +/obj/item/gun/ballistic/automatic/smg/c20r/no_mag{ pixel_x = 2; pixel_y = 8; - spawnwithmagazine = 0 }, -/obj/item/gun/ballistic/automatic/smg/c20r{ +/obj/item/gun/ballistic/automatic/smg/c20r/no_mag{ pixel_y = 3; - spawnwithmagazine = 0 }, -/obj/item/gun/ballistic/automatic/smg/c20r{ +/obj/item/gun/ballistic/automatic/smg/c20r/no_mag{ pixel_y = -2; pixel_x = 3; - spawnwithmagazine = 0 }, /obj/item/ammo_box/magazine/smgm45, /obj/item/ammo_box/magazine/smgm45, diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 559b7daa643a..37b8ceea801c 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -1,3 +1,8 @@ +#define EMPTY_GUN_HELPER(gun_type) \ + /obj/item/gun/ballistic/##gun_type/no_mag { \ + spawnwithmagazine = FALSE; \ + } + ///Subtype for any kind of ballistic gun ///This has a shitload of vars on it, and I'm sorry for that, but it does make making new subtypes really easy /obj/item/gun/ballistic diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 094ea753af10..abc0bcbc9bcb 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -92,6 +92,8 @@ can_suppress = TRUE can_unsuppress = TRUE +EMPTY_GUN_HELPER(automatic/sniper_rifle/syndicate) + // Old Semi-Auto Rifle // /obj/item/gun/ballistic/automatic/surplus @@ -146,6 +148,8 @@ wield_slowdown = 2 spread = -4 +EMPTY_GUN_HELPER(automatic/ebr) + /obj/item/gun/ballistic/automatic/gal name = "\improper CM-GAL-S" desc = "The standard issue DMR of CLIP. Dates back to the Xenofauna War, this particular model is in a carbine configuration, and, as such, is shorter than the standard model. Chambered in .308." diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index 4c3aafad7ce3..11aad5203361 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -34,8 +34,7 @@ muzzleflash_iconstate = "muzzle_flash_light" -/obj/item/gun/ballistic/automatic/pistol/no_mag - spawnwithmagazine = FALSE +EMPTY_GUN_HELPER(automatic/pistol) /obj/item/gun/ballistic/automatic/pistol/suppressed/Initialize(mapload) . = ..() @@ -65,20 +64,18 @@ eject_empty_sound = 'sound/weapons/gun/pistol/candor_unload.ogg' recoil = -2 -/obj/item/gun/ballistic/automatic/pistol/candor/no_mag - spawnwithmagazine = FALSE +EMPTY_GUN_HELPER(automatic/pistol/candor) /obj/item/gun/ballistic/automatic/pistol/candor/factory //also give this to the srm, their candors should probably look factory fresh from how well taken care of they are desc = "A classic semi-automatic handgun, widely popular throughout the Frontier. An engraving on the slide marks it as a product of Hunter's Pride. This example has been kept in especially good shape, and may as well be fresh out of the workshop. Chambered in .45." item_state = "hp_generic_fresh" +EMPTY_GUN_HELPER(automatic/pistol/candor/factory) + /obj/item/gun/ballistic/automatic/pistol/candor/factory/update_overlays() . = ..() . += "[initial(icon_state)]_factory" -/obj/item/gun/ballistic/automatic/pistol/candor/factory/no_mag - spawnwithmagazine = FALSE - /obj/item/gun/ballistic/automatic/pistol/candor/phenex name = "\improper HP Phenex" desc = "A uniquely modified version of the Candor, famously created by Hunter's Pride. Named after the daemonic Phoenix of legend that the Ashen Huntsman had once slain, this hell-kissed weapon is more visually intimidating than its original counterpart, but mechanically acts the same. Chambered in .45." @@ -160,8 +157,7 @@ eject_sound = 'sound/weapons/gun/pistol/mag_release.ogg' eject_empty_sound = 'sound/weapons/gun/pistol/mag_release.ogg' -/obj/item/gun/ballistic/automatic/pistol/commander/no_mag - spawnwithmagazine = FALSE +EMPTY_GUN_HELPER(automatic/pistol/commander) /obj/item/gun/ballistic/automatic/pistol/commander/inteq name = "\improper Commissioner" @@ -170,8 +166,7 @@ item_state = "commander-inteq" manufacturer = MANUFACTURER_INTEQ -/obj/item/gun/ballistic/automatic/pistol/commander/inteq/no_mag - spawnwithmagazine = FALSE +EMPTY_GUN_HELPER(automatic/pistol/commander/inteq) /obj/item/gun/ballistic/automatic/pistol/commissar name = "\improper Commissar" diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 6579e3077734..73ac18d7af00 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -465,6 +465,7 @@ user.visible_message("[user] spins the [src] around their finger by the trigger. That’s pretty badass.") playsound(src, 'sound/items/handling/ammobox_pickup.ogg', 20, FALSE) return + /obj/item/gun/ballistic/revolver/detective name = "\improper HP Detective Special" desc = "A small law enforcement firearm. Originally commissioned by Nanotrasen for their Private Investigation division, it has become extremely popular among independent civilians as a cheap, compact sidearm. Uses .38 Special rounds." @@ -486,6 +487,8 @@ recoil = 0 //weaker than normal revolver, no recoil +EMPTY_GUN_HELPER(revolver/detective) + /obj/item/gun/ballistic/revolver/detective/ComponentInitialize() . = ..() AddComponent(/datum/component/ammo_hud/revolver) //note that the hud at the moment only supports 6 round revolvers, 7 or 5 isn't supported rn diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 9d257821344b..4b3d8c7687f0 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -232,6 +232,8 @@ wield_slowdown = 0.6 wield_delay = 0.65 SECONDS +EMPTY_GUN_HELPER(shotgun/bulldog) + /obj/item/gun/ballistic/shotgun/bulldog/inteq name = "\improper Mastiff Shotgun" desc = "A variation of the Bulldog, seized from Syndicate armories by deserting troopers then modified to IRMG's standards." @@ -240,6 +242,8 @@ mag_type = /obj/item/ammo_box/magazine/m12g manufacturer = MANUFACTURER_INTEQ +EMPTY_GUN_HELPER(shotgun/bulldog/inteq) + /obj/item/gun/ballistic/shotgun/bulldog/suns name = "\improper Bulldog-C Shotgun" desc = "A variation of the Bulldog manufactured by Scarborough Arms for SUNS. Its shorter barrel is intended to provide additional maneuverability in personal defense scenarios." diff --git a/code/modules/projectiles/guns/ballistic/smg.dm b/code/modules/projectiles/guns/ballistic/smg.dm index 23ec4247a5da..a6739a79776e 100644 --- a/code/modules/projectiles/guns/ballistic/smg.dm +++ b/code/modules/projectiles/guns/ballistic/smg.dm @@ -60,6 +60,8 @@ empty_indicator = TRUE manufacturer = MANUFACTURER_SCARBOROUGH +EMPTY_GUN_HELPER(automatic/smg/c20r) + /obj/item/gun/ballistic/automatic/smg/c20r/ComponentInitialize() . = ..() AddComponent(/datum/component/automatic_fire, 0.13 SECONDS) @@ -251,13 +253,12 @@ fire_sound = 'sound/weapons/gun/smg/smg_heavy.ogg' manufacturer = MANUFACTURER_MINUTEMAN +EMPTY_GUN_HELPER(automatic/smg/cm5) + /obj/item/gun/ballistic/automatic/smg/cm5/ComponentInitialize() . = ..() AddComponent(/datum/component/automatic_fire, 0.13 SECONDS) -/obj/item/gun/ballistic/automatic/smg/cm5/no_mag - spawnwithmagazine = FALSE - /obj/item/gun/ballistic/automatic/smg/cm5/compact name = "\improper CM-5c" desc = "The compact conversion of the CM-5. While not exactly restricted, it is looked down upon due to CLIP's doctrine on medium-longrange combat, however it excels at close range and is very lightweight. You feel like this gun is mildly unfinished. Chambered in 9mm."