mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
EMP briefly blocks switching/engaging modules
This commit is contained in:
@@ -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 << "<span class='danger'>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 << "<span class='danger'>ERROR: Hardware fault. Rebooting interface...</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/*/obj/item/weapon/rig/proc/forced_move(dir)
|
||||
if(locked_down)
|
||||
return 0
|
||||
|
||||
@@ -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 << "<span class='warning'>The suit is not active.</span>"
|
||||
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 << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user