diff --git a/code/datums/wires/suitstorage.dm b/code/datums/wires/suitstorage.dm index ec651002747..1fe306806ef 100644 --- a/code/datums/wires/suitstorage.dm +++ b/code/datums/wires/suitstorage.dm @@ -19,8 +19,6 @@ /datum/wires/suitstorage/interactable(mob/user) var/obj/machinery/suit_storage_unit/A = holder - if(iscarbon(user) && A.Adjacent(user) && A.shocked) - return A.shock(user, 100) if(A.panel_open) return TRUE return FALSE diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 270fd768d5d..2b949734390 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -26,7 +26,7 @@ var/secure = FALSE //set to true to enable ID locking var/shocked = FALSE//is it shocking anyone that touches it? req_access = list(ACCESS_EVA) //the ID needed if ID lock is enabled - var/datum/wires/suitstorage/wires + var/datum/wires/suitstorage/wires = null var/uv = FALSE var/uv_super = FALSE @@ -288,7 +288,7 @@ else if(occupant) add_overlay("human") -/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob, params) +/obj/machinery/suit_storage_unit/attackby(obj/item/I, mob/user, params) if(shocked) if(shock(user, 100)) return @@ -298,11 +298,9 @@ else to_chat(usr, "The unit is not operational.") return - if(panel_open) wires.Interact(user) return - if(state_open) if(store_item(I, user)) update_icon() @@ -314,22 +312,14 @@ return ..() /obj/machinery/suit_storage_unit/screwdriver_act(mob/user, obj/item/I) - . = TRUE - if(shocked && shock(user, 100)) - return - if(!is_operational()) - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - else - to_chat(user, "The unit is not operational.") - return if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - - panel_open = !panel_open - to_chat(user, text("You [panel_open ? "open up" : "close"] the unit's maintenance panel.")) - updateUsrDialog() - return + . = TRUE + if(shocked && !(stat & NOPOWER)) + if(shock(user, 100)) + return + if(default_deconstruction_screwdriver(user, "panel", "close", I)) + I.play_tool_sound(user, I.tool_volume) /obj/machinery/suit_storage_unit/proc/store_item(obj/item/I, mob/user) . = FALSE @@ -426,16 +416,17 @@ if(uv_super) visible_message("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.") playsound(src, 'sound/machines/airlock_alien_prying.ogg', 50, 1) - helmet = null qdel(helmet) - suit = null - qdel(suit) // Delete everything but the occupant. - mask = null qdel(mask) - magboots = null qdel(magboots) - storage = null qdel(storage) + qdel(suit) + helmet = null + suit = null + mask = null + magboots = null + storage = null + else if(!occupant) visible_message("[src]'s door slides open. The glowing yellow lights dim to a gentle green.") @@ -446,14 +437,6 @@ if(occupant) dump_contents() -/obj/machinery/suit_storage_unit/shock(mob/user, prb) - if(prob(prb)) //why was this inverted before?!? - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() - if(electrocute_mob(user, src, src, 1, TRUE)) - return TRUE - /obj/machinery/suit_storage_unit/relaymove(mob/user) if(locked) if(message_cooldown <= world.time) @@ -539,23 +522,20 @@ //////// -/obj/machinery/suit_storage_unit/attack_hand(mob/user as mob) +/obj/machinery/suit_storage_unit/attack_hand(mob/user) var/dat - if(shocked) - if(shock(usr, 100)) + if(shocked && !(stat & NOPOWER)) + if(shock(user, 100)) return - if(..()) - return if(stat & NOPOWER) return - if(!user.IsAdvancedToolUser()) - return FALSE + if(..()) + return if(panel_open) //The maintenance panel is open. Time for some shady stuff wires.Interact(user) if(uv) //The thing is running its cauterisation cycle. You have to wait. dat += "Suit storage unit" dat+= "Unit is cauterising contents with selected UV ray intensity. Please wait.
" - else if(!broken) dat+= "Welcome to the Unit control panel.
" @@ -606,7 +586,7 @@ /obj/machinery/suit_storage_unit/Topic(href, href_list) if(..()) return 1 - if(shocked) + if(shocked && !(stat & NOPOWER)) if(shock(usr, 100)) return if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) @@ -663,8 +643,7 @@ return -/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob) - +/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user) if(!panel_open) return else @@ -675,7 +654,7 @@ to_chat(user, "You crank the dial all the way up to \"15nm\".") uv_super = TRUE -/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob) +/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user) if(!panel_open) return else