From 47a3afb5af916a81a5e4e7c21405bc5e4b7d8e2a Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Wed, 31 Dec 2014 20:15:53 +1030 Subject: [PATCH] Fixes remainder of #7287 --- code/modules/clothing/spacesuits/rig/rig.dm | 28 +++++++++---------- .../clothing/spacesuits/rig/rig_pieces.dm | 8 +++--- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index ba6096b1b4c..abbf9c38ee9 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -128,6 +128,7 @@ chest = new chest_type(src) if(allowed) chest.allowed = allowed + chest.slowdown = offline_slowdown verbs |= /obj/item/weapon/rig/proc/toggle_chest for(var/obj/item/piece in list(gloves,helmet,boots,chest)) @@ -237,12 +238,8 @@ if(!seal_target) if(flags & AIRTIGHT) helmet.flags |= AIRTIGHT - helmet.flags_inv |= (HIDEEYES|HIDEFACE|HIDEMASK) - helmet.body_parts_covered |= (FACE|EYES) else helmet.flags &= ~AIRTIGHT - helmet.flags_inv &= ~(HIDEEYES|HIDEFACE|HIDEMASK) - helmet.body_parts_covered &= ~(FACE|EYES) helmet.update_light(wearer) else failed_to_seal = 1 @@ -261,13 +258,9 @@ if(canremove) if(flags & AIRTIGHT) helmet.flags |= AIRTIGHT - helmet.flags_inv |= (HIDEEYES|HIDEFACE) - helmet.body_parts_covered |= (FACE|EYES) else if(flags & AIRTIGHT) helmet.flags &= ~AIRTIGHT - helmet.flags_inv &= ~(HIDEEYES|HIDEFACE) - helmet.body_parts_covered &= ~(FACE|EYES) update_icon(1) return 0 @@ -314,14 +307,14 @@ else if(offline) offline = 0 - slowdown = initial(slowdown) + chest.slowdown = initial(slowdown) if(offline) if(offline == 1) for(var/obj/item/rig_module/module in installed_modules) module.deactivate() offline = 2 - slowdown = offline_slowdown + chest.slowdown = offline_slowdown return if(cell && cell.charge > 0 && electrified > 0) @@ -522,6 +515,7 @@ module.charge_selected = href_list["charge_type"] else if(href_list["toggle_ai_control"]) ai_override_enabled = !ai_override_enabled + notify_ai("Synthetic suit control has been [ai_override_enabled ? "enabled" : "disabled"].") else if(href_list["toggle_suit_lock"]) locked = !locked @@ -529,6 +523,14 @@ src.add_fingerprint(usr) return +/obj/item/weapon/rig/proc/notify_ai(var/message) + if(!message || !installed_modules || !installed_modules.len) + return + for(var/obj/item/rig_module/module in installed_modules) + for(var/mob/living/silicon/ai/ai in module.contents) + if(ai && ai.client && !ai.stat) + ai << "[message]" + /obj/item/weapon/rig/equipped(mob/living/carbon/human/M) ..() @@ -549,11 +551,7 @@ /obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/living/carbon/human/H, var/deploy_mode) - if(sealing) - return - - if(!cell || !cell.charge) - H << "The suit is out of power." + if(sealing || !cell || !cell.charge) return if(!istype(wearer) || !wearer.back == src) diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index 5d8c8532ce0..314af42e07c 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -5,10 +5,10 @@ /obj/item/clothing/head/helmet/space/rig name = "helmet" flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL - flags_inv = HIDEEARS - body_parts_covered = HEAD - heat_protection = HEAD - cold_protection = HEAD + flags_inv = HIDEEARS|HIDEEYES|HIDEFACE + body_parts_covered = HEAD|FACE|EYES + heat_protection = HEAD|FACE|EYES + cold_protection = HEAD|FACE|EYES brightness_on = 4 species_restricted = null