From 909892ff72d7b5cac51a79b0af2d37d8c221fc9a Mon Sep 17 00:00:00 2001 From: Desert <0b346ce4@crystalline.email> Date: Wed, 21 Sep 2022 16:12:48 -0500 Subject: [PATCH] Updates sprite location for new Suspension Field Generator FIXES #4971 Updates the location for the sprites, including the one for when the device is on and wrenched down. Also fixes an issue where the user could open the maintenance hatch, lock the device, then close the TGUI window. This would prevent them from being able to open the TGUI window to unlock it and they would get an access denied message when trying to close the hatch. --- .../xenoarcheaology/tools/suspension_generator.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm index 902264308a..de7b862f0a 100644 --- a/code/modules/xenoarcheaology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -2,7 +2,7 @@ name = "suspension field generator" desc = "It has stubby legs bolted up against it's body for stabilising." icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "suspension2" + icon_state = "suspension" //CHOMPStation EDIT - Fixes Icon State density = TRUE req_access = list(access_research) var/obj/item/weapon/cell/cell @@ -44,6 +44,7 @@ deactivate() /obj/machinery/suspension_gen/attack_hand(var/mob/user) + tgui_interact(user) //CHOMPStation EDIT - Fixes soft locking the device if(panel_open) if(cell) to_chat(user, "You remove [cell].") @@ -51,12 +52,10 @@ cell.add_fingerprint(user) cell.update_icon() - icon_state = "suspension0" + icon_state = "suspension" //CHOMPStation EDIT - Fixes Icon State cell = null return - tgui_interact(user) - /obj/machinery/suspension_gen/tgui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -110,8 +109,10 @@ playsound(src, W.usesound, 50, 1) to_chat(user, "You wrench the stabilising legs [anchored ? "into place" : "up against the body"].") if(anchored) + icon_state = "suspension_wrenched" //CHOMPStation EDIT - Fixes Icon State desc = "It is resting securely on four stubby legs." else + icon_state = "suspension" //CHOMPStation EDIT - Fixes Icon State desc = "It has stubby legs bolted up against it's body for stabilising." else to_chat(user, "You are unable to unsecure [src] while it is active!") @@ -124,7 +125,7 @@ W.forceMove(src) cell = W to_chat(user, "You insert [cell].") - icon_state = "suspension1" + icon_state = "suspension" //CHOMPStation EDIT - Fixes Icon State else if(istype(W, /obj/item/weapon/card/emag)) return W.resolve_attackby(src, user) else @@ -151,7 +152,7 @@ suspension_field = new(T) visible_message("\icon[src][bicon(src)] [src] activates with a low hum.") - icon_state = "suspension3" + icon_state = "suspension_on" //CHOMPStation EDIT - Fixes Icon State for(var/obj/item/I in T) I.loc = suspension_field @@ -178,7 +179,7 @@ visible_message("\icon[src][bicon(src)] [src] deactivates with a gentle shudder.") qdel(suspension_field) suspension_field = null - icon_state = "suspension2" + icon_state = "suspension" //CHOMPStation EDIT - Fixes Icon State /obj/machinery/suspension_gen/Destroy() deactivate()