From 6fceeedfa502df38721c0e339050c7788827d5de Mon Sep 17 00:00:00 2001 From: Gristlebee <56049844+Gristlebee@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:42:49 -0800 Subject: [PATCH] slot fixes --- code/game/objects/items/attachments/shoulder_sling.dm | 2 +- code/modules/projectiles/guns/ballistic/pistol.dm | 5 +++++ code/modules/projectiles/guns/energy.dm | 4 ++++ code/modules/projectiles/guns/energy/laser.dm | 10 ++++++++++ .../projectiles/guns/manufacturer/eoehoma/lasers.dm | 11 +++++++++++ .../guns/manufacturer/etherbor/energy_gunsword.dm | 5 +++++ .../guns/manufacturer/scarborough/ballistics.dm | 7 ++++++- 7 files changed, 42 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/attachments/shoulder_sling.dm b/code/game/objects/items/attachments/shoulder_sling.dm index fdf01c17a95b..99378e17cfdf 100644 --- a/code/game/objects/items/attachments/shoulder_sling.dm +++ b/code/game/objects/items/attachments/shoulder_sling.dm @@ -10,7 +10,7 @@ render_plane = BELOW_OBJ_LAYER wield_delay = 0.2 SECONDS - var/check_size = TRUE + var/check_size = FALSE /obj/item/attachment/sling/apply_attachment(obj/item/gun/gun, mob/user) . = ..() diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index 2ebc78e60f06..a346e7193c77 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -25,6 +25,11 @@ muzzleflash_iconstate = "muzzle_flash_light" light_range = 1 + refused_attachments = list( + /obj/item/attachment/gun, + /obj/item/attachment/sling + ) + /obj/item/gun/ballistic/automatic/pistol/candor name = "\improper Candor" diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index d1a3111f9831..ee8161a33be3 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -52,6 +52,10 @@ ATTACHMENT_SLOT_RAIL = list( "x" = 19, "y" = 18, + ), + ATTACHMENT_SLOT_SCOPE = list( + "x" = 21, + "y" = 24, ) ) diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index a38cb8e1818c..77c87142c2e5 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -107,6 +107,16 @@ ammo_x_offset = 3 manufacturer = MANUFACTURER_SHARPLITE + unique_attachments = list( + /obj/item/attachment/scope, + /obj/item/attachment/long_scope, + ) + slot_available = list( + ATTACHMENT_SLOT_MUZZLE = 1, + ATTACHMENT_SLOT_RAIL = 1, + ATTACHMENT_SLOT_SCOPE = 1 + ) + /obj/item/ammo_casing/energy/laser/accelerator projectile_type = /obj/projectile/beam/laser/accelerator select_name = "accelerator" diff --git a/code/modules/projectiles/guns/manufacturer/eoehoma/lasers.dm b/code/modules/projectiles/guns/manufacturer/eoehoma/lasers.dm index 9b5f9777b0b9..b26562085773 100644 --- a/code/modules/projectiles/guns/manufacturer/eoehoma/lasers.dm +++ b/code/modules/projectiles/guns/manufacturer/eoehoma/lasers.dm @@ -70,6 +70,17 @@ charge_sections = 2 slot_flags = 0 + unique_attachments = list( + /obj/item/attachment/scope, + /obj/item/attachment/long_scope, + ) + + slot_available = list( + ATTACHMENT_SLOT_MUZZLE = 1, + ATTACHMENT_SLOT_RAIL = 1, + ATTACHMENT_SLOT_SCOPE = 1 + ) + /obj/item/gun/energy/disabler/e60 name = "E-60" desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse." diff --git a/code/modules/projectiles/guns/manufacturer/etherbor/energy_gunsword.dm b/code/modules/projectiles/guns/manufacturer/etherbor/energy_gunsword.dm index 10a55857cf88..872abdb17884 100644 --- a/code/modules/projectiles/guns/manufacturer/etherbor/energy_gunsword.dm +++ b/code/modules/projectiles/guns/manufacturer/etherbor/energy_gunsword.dm @@ -104,6 +104,11 @@ load_sound = 'sound/weapons/gun/gauss/pistol_reload.ogg' + refused_attachments = list( + /obj/item/attachment/gun, + /obj/item/attachment/sling + ) + /obj/item/ammo_casing/energy/kalix/pistol fire_sound = 'sound/weapons/gun/energy/kalixpistol.ogg' e_cost = 1250 //10 shots per cell diff --git a/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm b/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm index 9a50ea5c572a..5d3f9e272052 100644 --- a/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm +++ b/code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm @@ -470,7 +470,8 @@ NO_MAG_GUN_HELPER(automatic/smg/cobra/indie) slot_available = list( ATTACHMENT_SLOT_MUZZLE = 1, ATTACHMENT_SLOT_RAIL = 1, - ATTACHMENT_SLOT_STOCK = 1 + ATTACHMENT_SLOT_STOCK = 1, + ATTACHMENT_SLOT_SCOPE = 1 ) slot_offsets = list( ATTACHMENT_SLOT_MUZZLE = list( @@ -484,6 +485,10 @@ NO_MAG_GUN_HELPER(automatic/smg/cobra/indie) ATTACHMENT_SLOT_STOCK = list( "x" = 17, "y" = 18, + ), + ATTACHMENT_SLOT_SCOPE = list( + "x" = 21, + "y" = 24, ) )