diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index c66f2a986c..5d1addd471 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -493,6 +493,8 @@ return 1 if(istype(user)) + if(malfunction_check(user)) + return 0 if(user.back != src) return 0 if(locked_dna) @@ -509,10 +511,10 @@ return 1 +//TODO: Fix Topic vulnerabilities for malfunction and AI override. /obj/item/weapon/rig/Topic(href,href_list) - if(!check_suit_access(usr)) - return + return 0 if(href_list["toggle_piece"]) if(ishuman(usr) && (usr.stat || usr.stunned || usr.lying)) @@ -545,7 +547,7 @@ usr.set_machine(src) src.add_fingerprint(usr) - return 1 + return 0 /obj/item/weapon/rig/proc/notify_ai(var/message) if(!message || !installed_modules || !installed_modules.len) @@ -724,6 +726,12 @@ wearer << "The [source] has [dam_module.damage >= 2 ? "destroyed" : "damaged"] your [dam_module.interface_name]!" dam_module.deactivate() +/obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user) + if(malfunctioning) + user << "ERROR: Hardware fault. Rebooting interface..." + return 1 + return 0 + /*/obj/item/weapon/rig/proc/forced_move(dir) if(locked_down) return 0 diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm index ce20244734..09db9b0325 100644 --- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm +++ b/code/modules/clothing/spacesuits/rig/rig_verbs.dm @@ -141,6 +141,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(!check_power_cost(usr, 0, 0, 0, 0)) return @@ -168,6 +171,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(canremove) usr << "The suit is not active." return @@ -189,6 +195,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(!check_power_cost(usr, 0, 0, 0, 0)) return @@ -222,6 +231,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(!check_power_cost(usr, 0, 0, 0, 0)) return @@ -257,6 +269,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(canremove) usr << "The suit is not active." return diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 0a18f3c640..6c89a0058b 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -75,6 +75,9 @@ ..() +/obj/item/weapon/rig/light/ninja/malfunction_check() + return 0 //even as strong as ninjas are, they may not be able to afford being blocked from switching modules for 20 seconds + /obj/item/weapon/rig/light/stealth name = "stealth suit control module" suit_type = "stealth"