push
This commit is contained in:
@@ -487,7 +487,7 @@
|
||||
|
||||
|
||||
/obj/machinery/airalarm/proc/shock(mob/user, prb)
|
||||
if((stat & (NOPOWER))) // unpowered, no shock
|
||||
if((machine_stat & (NOPOWER))) // unpowered, no shock
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE //you lucked out, no shock for you
|
||||
@@ -682,11 +682,11 @@
|
||||
))
|
||||
|
||||
/obj/machinery/airalarm/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
icon_state = "alarm0"
|
||||
return
|
||||
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "alarmx"
|
||||
return
|
||||
|
||||
@@ -729,7 +729,7 @@
|
||||
update_light()
|
||||
|
||||
/obj/machinery/airalarm/process()
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
if((machine_stat & (NOPOWER|BROKEN)) || shorted)
|
||||
return
|
||||
|
||||
var/turf/location = get_turf(src)
|
||||
@@ -790,7 +790,7 @@
|
||||
var/area/A = get_base_area(src)
|
||||
var/new_area_danger_level = 0
|
||||
for(var/obj/machinery/airalarm/AA in A)
|
||||
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
|
||||
if (!(AA.machine_stat & (NOPOWER|BROKEN)) && !AA.shorted)
|
||||
new_area_danger_level = clamp(max(new_area_danger_level, AA.danger_level), 0, 1)
|
||||
|
||||
var/did_anything_happen
|
||||
@@ -908,7 +908,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/airalarm/proc/togglelock(mob/living/user)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>It does nothing!</span>")
|
||||
else
|
||||
if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN))
|
||||
@@ -921,7 +921,7 @@
|
||||
|
||||
/obj/machinery/airalarm/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -66,9 +66,9 @@
|
||||
icon_state = "filter_[on_state ? "on" : "off"][flipped ? "_f" : ""]"
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/power_change()
|
||||
var/old_stat = stat
|
||||
var/old_stat = machine_stat
|
||||
..()
|
||||
if(stat != old_stat)
|
||||
if(machine_stat != old_stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/process_atmos()
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
icon_state = "inje_on"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/power_change()
|
||||
var/old_stat = stat
|
||||
var/old_stat = machine_stat
|
||||
..()
|
||||
if(old_stat != stat)
|
||||
if(old_stat != machine_stat)
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
icon_state = "meterX"
|
||||
return FALSE
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
icon_state = "meter0"
|
||||
return FALSE
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/meter/interact(mob/user)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
else
|
||||
to_chat(user, status())
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
air_contents.set_moles(GAS_N2, (N2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "[icon_state]-1"
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/update_overlays()
|
||||
@@ -252,7 +252,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
canister_break()
|
||||
if(disassembled)
|
||||
new /obj/item/stack/sheet/metal (loc, 10)
|
||||
@@ -280,9 +280,9 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag)
|
||||
if((stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
|
||||
if((machine_stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
|
||||
return
|
||||
stat |= BROKEN
|
||||
machine_stat |= BROKEN
|
||||
canister_break()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/canister_break()
|
||||
@@ -313,7 +313,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/process_atmos()
|
||||
..()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return PROCESS_KILL
|
||||
if(timing && valve_timer < world.time)
|
||||
valve_open = !valve_open
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/tank))
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
var/obj/item/tank/T = W
|
||||
if(!user.transferItemToLoc(T, src))
|
||||
return
|
||||
@@ -115,7 +115,7 @@
|
||||
replace_tank(user, FALSE, T)
|
||||
update_icon()
|
||||
else if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
if(connected_port)
|
||||
disconnect()
|
||||
W.play_tool_sound(src)
|
||||
@@ -147,7 +147,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user, attackchain_flags = NONE, damage_multiplier = 1)
|
||||
if(I.force < 10 && !(stat & BROKEN))
|
||||
if(I.force < 10 && !(machine_stat & BROKEN))
|
||||
take_damage(0)
|
||||
else
|
||||
investigate_log("was smacked with \a [I] by [key_name(user)].", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
. = ..()
|
||||
pump = new(src, FALSE)
|
||||
pump.on = TRUE
|
||||
pump.stat = 0
|
||||
pump.machine_stat = 0
|
||||
SSair.add_to_rebuild_queue(pump)
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/Destroy()
|
||||
|
||||
Reference in New Issue
Block a user