From b52f432cae13ec324d0f95807fdcd74538eb0d52 Mon Sep 17 00:00:00 2001 From: Sadhorizon <108196626+Sadhorizon@users.noreply.github.com> Date: Sat, 26 Oct 2024 05:01:15 +0200 Subject: [PATCH] Scarborough attachment stuff. (#3612) ## About The Pull Request - Cobra offset is fixed. - Bulldog and Mastiff can now have rail attachments. - Makes the common attachment lineup a define (requested by erika) ## Why It's Good For The Game SA is all tactical and stuff, their shotguns should prolly be allowed to have a knife on them. ## Changelog :cl: tweak: Bulldogs and Mastiffs can now have rail attachments. fix: Fixes the Cobra rail attachment offset. /:cl: --- .../manufacturer/scarborough/ballistics.dm | 102 +++++------------- 1 file changed, 26 insertions(+), 76 deletions(-) diff --git a/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm b/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm index dc599c84bb7fa..b8a388ddd97d5 100644 --- a/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm +++ b/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm @@ -1,3 +1,6 @@ +#define SCARBOROUGH_ATTACHMENTS list(/obj/item/attachment/silencer, /obj/item/attachment/laser_sight, /obj/item/attachment/rail_light, /obj/item/attachment/bayonet) +#define SCARBOROUGH_ATTACH_SLOTS list(ATTACHMENT_SLOT_MUZZLE = 1, ATTACHMENT_SLOT_SCOPE = 1, ATTACHMENT_SLOT_RAIL = 1) + //########### PISTOLS ###########// /obj/item/gun/ballistic/automatic/pistol/ringneck name = "PC-76 \"Ringneck\"" @@ -31,17 +34,8 @@ manufacturer = MANUFACTURER_SCARBOROUGH show_magazine_on_sprite = TRUE - valid_attachments = list( - /obj/item/attachment/silencer, - /obj/item/attachment/laser_sight, - /obj/item/attachment/rail_light, - /obj/item/attachment/bayonet - ) - slot_available = list( - ATTACHMENT_SLOT_MUZZLE = 1, - ATTACHMENT_SLOT_SCOPE = 1, - ATTACHMENT_SLOT_RAIL = 1 - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS + slot_available = SCARBOROUGH_ATTACH_SLOTS slot_offsets = list( ATTACHMENT_SLOT_MUZZLE = list( "x" = 27, @@ -123,17 +117,8 @@ NO_MAG_GUN_HELPER(automatic/pistol/ringneck/indie) manufacturer = MANUFACTURER_SCARBOROUGH show_magazine_on_sprite = TRUE - valid_attachments = list( - /obj/item/attachment/silencer, - /obj/item/attachment/laser_sight, - /obj/item/attachment/rail_light, - /obj/item/attachment/bayonet - ) - slot_available = list( - ATTACHMENT_SLOT_MUZZLE = 1, - ATTACHMENT_SLOT_SCOPE = 1, - ATTACHMENT_SLOT_RAIL = 1 - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS + slot_available = SCARBOROUGH_ATTACH_SLOTS slot_offsets = list( ATTACHMENT_SLOT_MUZZLE = list( "x" = 32, @@ -250,17 +235,8 @@ NO_MAG_GUN_HELPER(automatic/pistol/asp) show_magazine_on_sprite = TRUE - valid_attachments = list( - /obj/item/attachment/silencer, - /obj/item/attachment/laser_sight, - /obj/item/attachment/rail_light, - /obj/item/attachment/bayonet - ) - slot_available = list( - ATTACHMENT_SLOT_MUZZLE = 1, - ATTACHMENT_SLOT_SCOPE = 1, - ATTACHMENT_SLOT_RAIL = 1 - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS + slot_available = SCARBOROUGH_ATTACH_SLOTS slot_offsets = list( ATTACHMENT_SLOT_MUZZLE = list( "x" = 40, @@ -402,12 +378,7 @@ NO_MAG_GUN_HELPER(automatic/pistol/himehabu) show_ammo_capacity_on_magazine_sprite = TRUE manufacturer = MANUFACTURER_SCARBOROUGH - valid_attachments = list( - /obj/item/attachment/silencer, - /obj/item/attachment/laser_sight, - /obj/item/attachment/rail_light, - /obj/item/attachment/bayonet - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS slot_available = list( ATTACHMENT_SLOT_MUZZLE = 1, ATTACHMENT_SLOT_RAIL = 1 @@ -418,8 +389,8 @@ NO_MAG_GUN_HELPER(automatic/pistol/himehabu) "y" = 23, ), ATTACHMENT_SLOT_RAIL = list( - "x" = 38, - "y" = 18, + "x" = 28, + "y" = 16, ) ) @@ -571,12 +542,7 @@ NO_MAG_GUN_HELPER(automatic/smg/sidewinder) zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you. zoom_out_amt = 5 - valid_attachments = list( - /obj/item/attachment/silencer, - /obj/item/attachment/laser_sight, - /obj/item/attachment/rail_light, - /obj/item/attachment/bayonet - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS slot_available = list( ATTACHMENT_SLOT_MUZZLE = 1, ATTACHMENT_SLOT_RAIL = 1 @@ -715,17 +681,8 @@ NO_MAG_GUN_HELPER(automatic/marksman/taipan) spread_unwielded = 8 wield_slowdown = 0.4 - valid_attachments = list( - /obj/item/attachment/silencer, - /obj/item/attachment/laser_sight, - /obj/item/attachment/rail_light, - /obj/item/attachment/bayonet - ) - slot_available = list( - ATTACHMENT_SLOT_MUZZLE = 1, - ATTACHMENT_SLOT_SCOPE = 1, - ATTACHMENT_SLOT_RAIL = 1 - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS + slot_available = SCARBOROUGH_ATTACH_SLOTS slot_offsets = list( ATTACHMENT_SLOT_MUZZLE = list( "x" = 42, @@ -781,17 +738,8 @@ NO_MAG_GUN_HELPER(automatic/assault/hydra) wield_slowdown = 0.85 //better than the lmgs since it doesnt have a bipod, still not ideal wield_delay = 0.9 SECONDS //ditto - valid_attachments = list( - /obj/item/attachment/silencer, - /obj/item/attachment/laser_sight, - /obj/item/attachment/rail_light, - /obj/item/attachment/bayonet - ) - slot_available = list( - ATTACHMENT_SLOT_MUZZLE = 1, - ATTACHMENT_SLOT_SCOPE = 1, - ATTACHMENT_SLOT_RAIL = 1 - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS + slot_available = SCARBOROUGH_ATTACH_SLOTS slot_offsets = list( ATTACHMENT_SLOT_MUZZLE = list( "x" = 48, @@ -994,13 +942,8 @@ NO_MAG_GUN_HELPER(automatic/assault/hydra/dmr) wield_slowdown = 0.6 wield_delay = 0.65 SECONDS - valid_attachments = list( - /obj/item/attachment/silencer, - ) - slot_available = list( - ATTACHMENT_SLOT_MUZZLE = 1, - ATTACHMENT_SLOT_SCOPE = 1 - ) + valid_attachments = SCARBOROUGH_ATTACHMENTS + slot_available = SCARBOROUGH_ATTACH_SLOTS slot_offsets = list( ATTACHMENT_SLOT_MUZZLE = list( "x" = 44, @@ -1009,6 +952,10 @@ NO_MAG_GUN_HELPER(automatic/assault/hydra/dmr) ATTACHMENT_SLOT_SCOPE = list( "x" = 25, "y" = 24, + ), + ATTACHMENT_SLOT_RAIL = list( + "x" = 30, + "y" = 18, ) ) @@ -1110,3 +1057,6 @@ NO_MAG_GUN_HELPER(shotgun/automatic/bulldog) caliber = "70mm" icon_state = "84mm-hedp" projectile_type = /obj/projectile/bullet/a84mm + +#undef SCARBOROUGH_ATTACHMENTS +#undef SCARBOROUGH_ATTACH_SLOTS