From ebf25acd9e3386635d8845fc7191f844918d6e5a Mon Sep 17 00:00:00 2001 From: Sealed101 Date: Fri, 1 Nov 2024 15:14:11 +0300 Subject: [PATCH] Restores Derelict's vault doors hacking immunity (#87604) ## About The Pull Request Title; it was handled by `attackby()` and became deprecated at some point, something something attack chain Also gave it feedback because might as well ## Why It's Good For The Game Fixes #79926 ## Changelog :cl: fix: the Derelict vault doors are once again unhackable qol: the Derelict vault doors provide chat feedback when you try to hack them so you can stop poking them with your tools /:cl: --- code/game/machinery/doors/airlock.dm | 11 ++++------- code/game/machinery/doors/door.dm | 5 ++++- .../mapfluff/ruins/spaceruin_code/TheDerelict.dm | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 7d9286384e4..04f67cee1c1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -119,7 +119,6 @@ var/obj/item/note /// The seal on the airlock var/obj/item/seal - var/detonated = FALSE var/abandoned = FALSE /// Controls if the door closes quickly or not. FALSE = the door autocloses in 1.5 seconds, TRUE = 8 seconds - see autoclose_in() var/normalspeed = TRUE @@ -701,8 +700,9 @@ switch (held_item?.tool_behaviour) if (TOOL_SCREWDRIVER) - context[SCREENTIP_CONTEXT_LMB] = panel_open ? "Close panel" : "Open panel" - return CONTEXTUAL_SCREENTIP_SET + if(has_access_panel) + context[SCREENTIP_CONTEXT_LMB] = panel_open ? "Close panel" : "Open panel" + return CONTEXTUAL_SCREENTIP_SET if (TOOL_CROWBAR) if (panel_open) if (security_level == AIRLOCK_SECURITY_PLASTEEL_O_S || security_level == AIRLOCK_SECURITY_PLASTEEL_I_S) @@ -746,9 +746,6 @@ if(obj_flags & EMAGGED) to_chat(user, span_warning("Unable to interface: Airlock is unresponsive.")) return - if(detonated) - to_chat(user, span_warning("Unable to interface. Airlock control panel damaged.")) - return ui_interact(user) @@ -858,7 +855,7 @@ set_electrified(MACHINE_ELECTRIFIED_PERMANENT) /obj/machinery/door/airlock/screwdriver_act(mob/living/user, obj/item/tool) - if(panel_open && detonated) + if(!has_access_panel) to_chat(user, span_warning("[src] has no maintenance panel!")) return ITEM_INTERACT_SUCCESS toggle_panel_open() diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 5449f7f7cee..67605ac1446 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -34,6 +34,8 @@ /// A filler object used to fill the space of multi-tile airlocks var/obj/structure/fluff/airlock_filler/filler var/welded = FALSE + ///Whether this door has a panel or not; FALSE also stops the examine blurb about the panel from showing up + var/has_access_panel = TRUE /// For rglass-windowed airlocks and firedoors var/heat_proof = FALSE /// Emergency access override @@ -122,7 +124,8 @@ . += span_notice("Due to a security threat, its access requirements have been lifted!") else . += span_notice("In the event of a red alert, its access requirements will automatically lift.") - . += span_notice("Its maintenance panel is [panel_open ? "open" : "screwed in place"].") + if(has_access_panel) + . += span_notice("Its maintenance panel is [panel_open ? "open" : "screwed in place"].") /obj/machinery/door/add_context(atom/source, list/context, obj/item/held_item, mob/user) . = ..() diff --git a/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm b/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm index 8be91920719..9a5d3a3db86 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/TheDerelict.dm @@ -162,12 +162,12 @@ use_power = NO_POWER_USE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF id_tag = "derelictvault" + has_access_panel = FALSE -///Overrides screwdriver attack to prevent all deconstruction and hacking. -/obj/machinery/door/airlock/vault/derelict/attackby(obj/item/C, mob/user, params) - if(C.tool_behaviour == TOOL_SCREWDRIVER) - return - ..() +///Overrides screwdriver act to prevent all deconstruction and hacking. Override for extra tuff fluff +/obj/machinery/door/airlock/vault/derelict/screwdriver_act(mob/living/user, obj/item/tool) + to_chat(user, span_danger("The robust make of [src] makes it impossible to access the panel in any way!")) + return ITEM_INTERACT_SUCCESS /obj/structure/fluff/oldturret name = "broken turret"