diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 1b2befa59a0..3d66c646029 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -334,6 +334,7 @@ var/atom/interfaced_with // Currently draining power from this device. var/total_power_drained = 0 + var/drain_loc /obj/item/rig_module/power_sink/deactivate() @@ -373,6 +374,7 @@ H << "You begin draining power from [target]!" interfaced_with = target + drain_loc = interfaced_with.loc holder.spark_system.start() playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1) @@ -406,7 +408,7 @@ drain_complete(H) return - if(!interfaced_with || !interfaced_with.Adjacent(H)) + if(!interfaced_with || !interfaced_with.Adjacent(H) || !(interfaced_with.loc == drain_loc)) H << "Your power sink retracts into its casing." drain_complete(H) return @@ -427,8 +429,6 @@ holder.cell.give(target_drained * CELLRATE) total_power_drained += target_drained - - return 1 /obj/item/rig_module/power_sink/proc/drain_complete(var/mob/living/M) @@ -439,5 +439,6 @@ if(M) M << "Total power drained from [interfaced_with]: [round(total_power_drained/1000)]kJ." interfaced_with.drain_power(0,1,0) // Damage the victim. + drain_loc = null interfaced_with = null total_power_drained = 0 \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index b0ba99016e2..830e0d784ce 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -147,6 +147,14 @@ usr << "The suit is not initialized." return 0 + if(usr.lying || usr.stat || usr.stunned || usr.paralysis) + usr << "You cannot use the suit in this state." + return 0 + + if(holder.wearer && holder.wearer.lying) + usr << "The suit cannot function while the wearer is prone." + return 0 + if(holder.security_check_enabled && !holder.check_suit_access(usr)) usr << "Access denied." return diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index 12ea8e7fb25..6d572cdcb3e 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -19,6 +19,7 @@ use_power_cost = 5 active_power_cost = 1 passive_power_cost = 0 + module_cooldown = 30 activate_string = "Enable Cloak" deactivate_string = "Disable Cloak" diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index b308fda2b40..4c7735974c1 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -251,13 +251,13 @@ else helmet.flags &= ~AIRTIGHT helmet.update_light(wearer) - + //sealed pieces become airtight, protecting against diseases if (!seal_target) piece.armor["bio"] = 100 else piece.armor["bio"] = src.armor["bio"] - + else failed_to_seal = 1 @@ -515,6 +515,8 @@ return if(href_list["toggle_piece"]) + if(ishuman(usr) && (usr.stat || usr.stunned || usr.lying)) + return 0 toggle_piece(href_list["toggle_piece"], usr) else if(href_list["toggle_seals"]) toggle_seals(usr) @@ -543,7 +545,7 @@ usr.set_machine(src) src.add_fingerprint(usr) - return + return 1 /obj/item/weapon/rig/proc/notify_ai(var/message) if(!message || !installed_modules || !installed_modules.len) @@ -579,6 +581,9 @@ if(!istype(wearer) || !wearer.back == src) return + if(usr == wearer && (usr.stat||usr.paralysis||usr.stunned)) // If the usr isn't wearing the suit it's probably an AI. + return + var/obj/item/check_slot var/equip_to var/obj/item/use_obj diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index 061973c1378..c0d119b0b47 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -180,7 +180,7 @@ installed_modules -= removed update_icon() - return + return // If we've gotten this far, all we have left to do before we pass off to root procs // is check if any of the loaded modules want to use the item we've been given. diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm index 9ec6f03df7b..ce20244734a 100644 --- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm +++ b/code/modules/clothing/spacesuits/rig/rig_verbs.dm @@ -120,8 +120,8 @@ /obj/item/weapon/rig/verb/toggle_seals_verb() - set name = "Toggle Seals" - set desc = "Activates or deactivates your rig seals." + set name = "Toggle Hardsuit" + set desc = "Activates or deactivates your rig." set category = "Hardsuit" set src = usr.contents @@ -208,6 +208,8 @@ var/obj/item/rig_module/module = input("Which module do you wish to select?") as null|anything in selectable if(!istype(module)) + selected_module = null + usr << "Primary system is now: deselected." return selected_module = module diff --git a/nano/templates/hardsuit.tmpl b/nano/templates/hardsuit.tmpl index a8d3e59ac72..b32bb621c8e 100644 --- a/nano/templates/hardsuit.tmpl +++ b/nano/templates/hardsuit.tmpl @@ -78,12 +78,12 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm
{{if data.sealing == 1}} -
SEALING
+
PROCESSING
{{else}} {{if data.seals == 1}} -
OPEN
+
INACTIVE
{{else}} -
SEALED
+
ACTIVE
{{/if}} {{/if}}