mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Mass-replacement of stat to machine_stat (#48758)
Living and machine stat vars are pretty different, one uses flags and other number-defines. This should make some other mass-replacements and searches a bit easier.
This commit is contained in:
@@ -936,7 +936,7 @@
|
||||
malfhacking = 0
|
||||
clear_alert("hackingapc")
|
||||
|
||||
if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN)
|
||||
if(!istype(apc) || QDELETED(apc) || apc.machine_stat & BROKEN)
|
||||
to_chat(src, "<span class='danger'>Hack aborted. The designated APC no longer exists on the power network.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, TRUE, ignore_walls = FALSE)
|
||||
else if(apc.aidisabled)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
AIarea = get_area(src)
|
||||
if(AIarea)
|
||||
for (var/obj/machinery/power/apc/APC in AIarea)
|
||||
if (!(APC.stat & BROKEN))
|
||||
if (!(APC.machine_stat & BROKEN))
|
||||
theAPC = APC
|
||||
break
|
||||
if (!theAPC)
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
return FALSE
|
||||
if(P.has_cover &&!P.raised) //Don't attack invincible turrets
|
||||
return FALSE
|
||||
if(P.stat & BROKEN) //Or turrets that are already broken
|
||||
if(P.machine_stat & BROKEN) //Or turrets that are already broken
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user