diff --git a/code/datums/wires/suitstorage.dm b/code/datums/wires/suitstorage.dm index 57a567ce431..b519b449c86 100644 --- a/code/datums/wires/suitstorage.dm +++ b/code/datums/wires/suitstorage.dm @@ -1,6 +1,6 @@ /datum/wires/suitstorage holder_type = /obj/machinery/suit_storage_unit - wire_count = 6 + wire_count = 8 var/const/SSU_WIRE_ID = 1 var/const/SSU_WIRE_SHOCK = 2 @@ -23,10 +23,10 @@ var/const/SSU_WIRE_UV = 8 /datum/wires/suitstorage/get_status() . = ..() var/obj/machinery/suit_storage_unit/A = holder - . += "The blue light is [A.secure ? "off" : "on"]." + . += "The blue light is [A.secure ? "on" : "off"]." . += "The red light is [A.safeties ? "off" : "blinking"]." . += "The green light is [A.shocked ? "on" : "off"]." - . += "The UV display shows [A.uv_super ? "185 nm" : "15 nm"]." + . += "The UV display shows [A.uv_super ? "15 nm" : "185 nm"]." datum/wires/suitstorage/CanUse() var/obj/machinery/suit_storage_unit/A = holder @@ -43,7 +43,7 @@ datum/wires/suitstorage/CanUse() A.safeties = mended if(SSU_WIRE_SHOCK) A.shocked = !mended - A.shock(usr, 50) + A.shock(usr, 50) if(SSU_WIRE_UV) A.uv_super = !mended ..() @@ -60,7 +60,10 @@ datum/wires/suitstorage/UpdatePulsed(index) if(SSU_WIRE_SHOCK) A.shocked = !A.shocked if(A.shocked) - A.shock(usr, 50) + A.shock(usr, 100) + spawn(50) + if(A && !IsIndexCut(index)) + A.shocked = FALSE if(SSU_WIRE_UV) A.uv_super = !A.uv_super ..() \ No newline at end of file diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 4595b265b79..428df0068bd 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -22,9 +22,9 @@ var/safeties = TRUE var/broken = FALSE var/secure = FALSE //set to true to enable ID locking - var/shocked = FALSE + 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/asd + var/datum/wires/suitstorage/wires var/uv = FALSE var/uv_super = FALSE @@ -43,50 +43,90 @@ helmet_type = /obj/item/clothing/head/helmet/space/eva mask_type = /obj/item/clothing/mask/breath +/obj/machinery/suit_storage_unit/standard_unit/secure + secure = TRUE //start with ID lock enabled + /obj/machinery/suit_storage_unit/captain suit_type = /obj/item/clothing/suit/space/captain helmet_type = /obj/item/clothing/head/helmet/space/capspace mask_type = /obj/item/clothing/mask/gas storage_type = /obj/item/tank/jetpack/oxygen/captain + req_access = list(access_captain) + +/obj/machinery/suit_storage_unit/captain/secure + secure = TRUE /obj/machinery/suit_storage_unit/engine suit_type = /obj/item/clothing/suit/space/hardsuit/engineering helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/engineering mask_type = /obj/item/clothing/mask/breath storage_type = /obj/item/clothing/shoes/magboots + req_access = list(access_engine_equip) + +/obj/machinery/suit_storage_unit/engine/secure + secure = TRUE /obj/machinery/suit_storage_unit/ce suit_type = /obj/item/clothing/suit/space/hardsuit/elite helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/elite mask_type = /obj/item/clothing/mask/gas storage_type = /obj/item/clothing/shoes/magboots/advance + req_access = list(access_ce) + +/obj/machinery/suit_storage_unit/ce/secure + secure = TRUE /obj/machinery/suit_storage_unit/security suit_type = /obj/item/clothing/suit/space/hardsuit/security helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/security mask_type = /obj/item/clothing/mask/gas/sechailer + req_access = list(access_security) + +/obj/machinery/suit_storage_unit/security/secure + secure = TRUE /obj/machinery/suit_storage_unit/atmos suit_type = /obj/item/clothing/suit/space/hardsuit/atmos helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/atmos mask_type = /obj/item/clothing/mask/gas storage_type = /obj/item/clothing/shoes/magboots + req_access = list(access_atmospherics) + +/obj/machinery/suit_storage_unit/atmos/secure + secure = TRUE /obj/machinery/suit_storage_unit/mining suit_type = /obj/item/clothing/suit/space/hardsuit/mining helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/mining mask_type = /obj/item/clothing/mask/breath + req_access = list(access_mining_station) + +/obj/machinery/suit_storage_unit/mining/secure + secure = TRUE /obj/machinery/suit_storage_unit/cmo suit_type = /obj/item/clothing/suit/space/hardsuit/medical helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/medical mask_type = /obj/item/clothing/mask/breath + req_access = list(access_cmo) + +/obj/machinery/suit_storage_unit/cmo/secure + secure = TRUE /obj/machinery/suit_storage_unit/syndicate suit_type = /obj/item/clothing/suit/space/hardsuit/syndi helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/syndi mask_type = /obj/item/clothing/mask/gas/syndicate storage_type = /obj/item/tank/jetpack/oxygen/harness + req_access = list(access_syndicate) + safeties = FALSE //in a syndicate base, everything can be used as a murder weapon at a moment's notice. + uv_super = TRUE //so efficient + +/obj/machinery/suit_storage_unit/syndicate/secure + secure = TRUE + +/obj/machinery/suit_storage_unit/ert + req_access = list(access_cent_general) /obj/machinery/suit_storage_unit/ert/command suit_type = /obj/item/clothing/suit/space/hardsuit/ert/commander @@ -94,27 +134,39 @@ mask_type = /obj/item/clothing/mask/breath storage_type = /obj/item/tank/emergency_oxygen/double +/obj/machinery/suit_storage_unit/ert/command/secure + secure = TRUE + /obj/machinery/suit_storage_unit/ert/security suit_type = /obj/item/clothing/suit/space/hardsuit/ert/security helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/security mask_type = /obj/item/clothing/mask/breath storage_type = /obj/item/tank/emergency_oxygen/double +/obj/machinery/suit_storage_unit/ert/security/secure + secure = TRUE + /obj/machinery/suit_storage_unit/ert/engineer suit_type = /obj/item/clothing/suit/space/hardsuit/ert/engineer helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/engineer mask_type = /obj/item/clothing/mask/breath storage_type = /obj/item/tank/emergency_oxygen/double +/obj/machinery/suit_storage_unit/ert/engineer/secure + secure = TRUE + /obj/machinery/suit_storage_unit/ert/medical suit_type = /obj/item/clothing/suit/space/hardsuit/ert/medical helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/medical mask_type = /obj/item/clothing/mask/breath storage_type = /obj/item/tank/emergency_oxygen/double +/obj/machinery/suit_storage_unit/ert/medical/secure + secure = TRUE + /obj/machinery/suit_storage_unit/New() ..() - asd = new(src) + wires = new(src) /obj/machinery/suit_storage_unit/Initialize() . = ..() @@ -137,6 +189,7 @@ QDEL_NULL(helmet) QDEL_NULL(mask) QDEL_NULL(storage) + QDEL_NULL(wires) return ..() /obj/machinery/suit_storage_unit/update_icon() @@ -164,6 +217,9 @@ add_overlay("human") /obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob, params) + if(shocked) + if(shock(user, 100)) + return if(!is_operational()) if(panel_open) to_chat(usr, "Close the maintenance panel first.") @@ -176,6 +232,9 @@ to_chat(user, text("You [panel_open ? "open up" : "close"] the unit's maintenance panel.")) updateUsrDialog() return + if(panel_open) + wires.Interact(user) + if(state_open) if(store_item(I, user)) update_icon() @@ -295,11 +354,11 @@ dump_contents() /obj/machinery/suit_storage_unit/shock(mob/user, prb) - if(!prob(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)) + if(electrocute_mob(user, get_area(src), src, 1)) return 1 /obj/machinery/suit_storage_unit/relaymove(mob/user) @@ -389,6 +448,9 @@ /obj/machinery/suit_storage_unit/attack_hand(mob/user as mob) var/dat + if(shocked) + if(shock(usr, 100)) + return if(..()) return if(stat & NOPOWER) @@ -396,13 +458,8 @@ if(!user.IsAdvancedToolUser()) return FALSE if(panel_open) //The maintenance panel is open. Time for some shady stuff - dat+= "