This commit is contained in:
SandPoot
2024-08-24 21:28:55 -03:00
parent 9604090014
commit c07e94be66
218 changed files with 1001 additions and 979 deletions
+4 -4
View File
@@ -53,7 +53,7 @@
check_shield_icons()
update_shield_icons = 0
if(stat & (NOPOWER|BROKEN) || !active)//can update the icons even without power
if(machine_stat & (NOPOWER|BROKEN) || !active)//can update the icons even without power
return
if(!fueljar)//No fuel but we are on, shutdown
@@ -127,13 +127,13 @@
/obj/machinery/power/am_control_unit/power_change()
..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
if(active)
toggle_power(1)
else
use_power = NO_POWER_USE
else if(!stat && anchored)
else if(!machine_stat && anchored)
use_power = IDLE_POWER_USE
return
@@ -265,7 +265,7 @@
/obj/machinery/power/am_control_unit/ui_interact(mob/user)
. = ..()
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if((get_dist(src, user) > 1) || (machine_stat & (BROKEN|NOPOWER)))
if(!isAI(user))
user.unset_machine()
user << browse(null, "window=AMcontrol")
+31 -31
View File
@@ -254,7 +254,7 @@
opened = APC_COVER_OPENED
operating = FALSE
name = "\improper [A.name] APC"
set_machine_stat(stat | MAINT)
set_machine_stat(machine_stat | MAINT)
update_appearance()
addtimer(CALLBACK(src, PROC_REF(update)), 5)
@@ -291,7 +291,7 @@
opened = APC_COVER_OPENED
operating = FALSE
name = "\improper [get_area_name(area, TRUE)] APC"
set_machine_stat(stat | MAINT)
set_machine_stat(machine_stat | MAINT)
update_appearance()
addtimer(CALLBACK(src, PROC_REF(update)), 5)
register_context()
@@ -337,7 +337,7 @@
/obj/machinery/power/apc/examine(mob/user)
. = ..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(opened)
if(has_electronics && terminal)
@@ -349,7 +349,7 @@
. += "<span class='warning'>[src]'s innards have been replaced by strange brass machinery!</span>"
else
if (stat & MAINT)
if (machine_stat & MAINT)
. += "The cover is closed. Something is wrong with it. It doesn't work."
else if (malfhack)
. += "The cover is broken. It may be hard to force it open."
@@ -419,7 +419,7 @@
/obj/machinery/power/apc/update_overlays()
. = ..()
if((stat & (BROKEN|MAINT)) || update_state)
if((machine_stat & (BROKEN|MAINT)) || update_state)
return
. += mutable_appearance(icon, "apcox-[locked]")
@@ -443,9 +443,9 @@
// Handle icon status:
var/new_update_state = NONE
if(stat & BROKEN)
if(machine_stat & BROKEN)
new_update_state |= UPSTATE_BROKE
if(stat & MAINT)
if(machine_stat & MAINT)
new_update_state |= UPSTATE_MAINT
if(opened)
@@ -504,7 +504,7 @@
if(W.use_tool(src, user, 50))
if (has_electronics == APC_ELECTRONICS_INSTALLED)
has_electronics = APC_ELECTRONICS_MISSING
if (stat & BROKEN)
if (machine_stat & BROKEN)
user.visible_message(\
"[user.name] has broken the power control board inside [src.name]!",\
"<span class='notice'>You break the charred power control board and remove the remains.</span>",
@@ -544,8 +544,8 @@
coverlocked = TRUE //closing cover relocks it
update_appearance()
return
else if (!(stat & BROKEN))
if(coverlocked && !(stat & MAINT)) // locked...
else if (!(machine_stat & BROKEN))
if(coverlocked && !(machine_stat & MAINT)) // locked...
to_chat(user, "<span class='warning'>The cover is locked and cannot be opened!</span>")
return
else if (panel_open)
@@ -575,12 +575,12 @@
switch (has_electronics)
if (APC_ELECTRONICS_INSTALLED)
has_electronics = APC_ELECTRONICS_SECURED
stat &= ~MAINT
machine_stat &= ~MAINT
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw the circuit electronics into place.</span>")
if (APC_ELECTRONICS_SECURED)
has_electronics = APC_ELECTRONICS_INSTALLED
set_machine_stat(stat | MAINT)
set_machine_stat(machine_stat | MAINT)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the electronics.</span>")
else
@@ -611,7 +611,7 @@
"<span class='notice'>You start welding the APC frame...</span>", \
"<span class='italics'>You hear welding.</span>")
if(W.use_tool(src, user, 50, volume=50, amount=3))
if ((stat & BROKEN) || opened==APC_COVER_REMOVED)
if ((machine_stat & BROKEN) || opened==APC_COVER_REMOVED)
new /obj/item/stack/sheet/metal(loc)
user.visible_message(\
"[user.name] has cut [src] apart with [W].",\
@@ -634,7 +634,7 @@
to_chat(user, "<span class='warning'>There is a power cell already installed!</span>")
return
else
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There is no connector for your power cell!</span>")
return
if(!user.transferItemToLoc(W, src))
@@ -685,7 +685,7 @@
if (has_electronics)
to_chat(user, "<span class='warning'>There is already a board inside the [src]!</span>")
return
else if (stat & BROKEN)
else if (machine_stat & BROKEN)
to_chat(user, "<span class='warning'>You cannot put the board inside, the frame is damaged!</span>")
return
@@ -701,7 +701,7 @@
else if(istype(W, /obj/item/electroadaptive_pseudocircuit) && opened)
var/obj/item/electroadaptive_pseudocircuit/P = W
if(!has_electronics)
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
return
if(!P.adapt_circuit(user, 50))
@@ -711,7 +711,7 @@
has_electronics = APC_ELECTRONICS_INSTALLED
locked = FALSE
else if(!cell)
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
return
if(!P.adapt_circuit(user, 500))
@@ -727,10 +727,10 @@
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
return
else if (istype(W, /obj/item/wallframe/apc) && opened)
if (!(stat & BROKEN || opened==APC_COVER_REMOVED || obj_integrity < max_integrity)) // There is nothing to repair
if (!(machine_stat & BROKEN || opened==APC_COVER_REMOVED || obj_integrity < max_integrity)) // There is nothing to repair
to_chat(user, "<span class='warning'>You found no reason for repairing this APC</span>")
return
if (!(stat & BROKEN) && opened==APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
if (!(machine_stat & BROKEN) && opened==APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
user.visible_message("[user.name] replaces missing APC's cover.",\
"<span class='notice'>You begin to replace APC's cover...</span>")
if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame
@@ -747,7 +747,7 @@
if(do_after(user, 50, target = src))
to_chat(user, "<span class='notice'>You replace the damaged APC frame with a new one.</span>")
qdel(W)
stat &= ~BROKEN
machine_stat &= ~BROKEN
obj_integrity = max_integrity
if (opened==APC_COVER_REMOVED)
opened = APC_COVER_OPENED
@@ -787,12 +787,12 @@
/obj/machinery/power/apc/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if(the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS)
if(!has_electronics)
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
return FALSE
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
else if(!cell)
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
return FALSE
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 50, "cost" = 10) //16 for a wall
@@ -805,7 +805,7 @@
switch(passed_mode)
if(RCD_UPGRADE_SIMPLE_CIRCUITS)
if(!has_electronics)
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
return
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
@@ -814,7 +814,7 @@
locked = TRUE
return TRUE
else if(!cell)
if(stat & MAINT)
if(machine_stat & MAINT)
to_chat(user, span_warning("There's no connector for a power cell."))
return FALSE
var/obj/item/stock_parts/cell/crap/empty/C = new(src)
@@ -844,7 +844,7 @@
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
else if(panel_open)
to_chat(user, "<span class='warning'>You must close the panel!</span>")
else if(stat & (BROKEN|MAINT))
else if(machine_stat & (BROKEN|MAINT))
to_chat(user, "<span class='warning'>Nothing happens!</span>")
else
if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack)
@@ -863,7 +863,7 @@
set_nightshift(!nightshift_lights)
/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == MELEE && damage_amount < 10 && (!(stat & BROKEN) || malfai))
if(damage_flag == MELEE && damage_amount < 10 && (!(machine_stat & BROKEN) || malfai))
return FALSE
. = ..()
@@ -875,7 +875,7 @@
/obj/machinery/power/apc/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
set_broken()
if(opened != APC_COVER_REMOVED)
opened = APC_COVER_REMOVED
@@ -891,7 +891,7 @@
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
else if(panel_open)
to_chat(user, "<span class='warning'>You must close the panel first!</span>")
else if(stat & (BROKEN|MAINT))
else if(machine_stat & (BROKEN|MAINT))
to_chat(user, "<span class='warning'>Nothing happens!</span>")
else
flick("apc-spark", src)
@@ -954,7 +954,7 @@
charging = APC_NOT_CHARGING
src.update_appearance()
return
if((stat & MAINT) && !opened) //no board; no interface
if((machine_stat & MAINT) && !opened) //no board; no interface
return
/obj/machinery/power/apc/ui_interact(mob/user, datum/tgui/ui)
@@ -1090,7 +1090,7 @@
switch(action)
if("lock")
if(area.hasSiliconAccessInArea(usr))
if((obj_flags & EMAGGED) || (stat & (BROKEN|MAINT)))
if((obj_flags & EMAGGED) || (machine_stat & (BROKEN|MAINT)))
to_chat(usr, "<span class='warning'>The APC does not respond to the command!</span>")
else
locked = !locked
@@ -1362,7 +1362,7 @@
/obj/machinery/power/apc/process()
if(icon_update_needed)
update_appearance()
if(stat & (BROKEN|MAINT))
if(machine_stat & (BROKEN|MAINT))
return
if(!area || !area.requires_power)
return
+1 -1
View File
@@ -34,7 +34,7 @@
/obj/machinery/power/generator/update_overlays()
. = ..()
if(!(stat & (NOPOWER|BROKEN)))
if(!(machine_stat & (NOPOWER|BROKEN)))
var/L = min(round(lastgenlev/100000),11)
if(L != 0)
. += image('icons/obj/power.dmi', "teg-op[L]")
+9 -9
View File
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
obj_break()
/obj/machinery/gravity_generator/proc/set_fix()
stat &= ~BROKEN
machine_stat &= ~BROKEN
/obj/machinery/gravity_generator/part/Destroy()
if(main_part)
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/part/set_broken()
..()
if(main_part && !(main_part.stat & BROKEN))
if(main_part && !(main_part.machine_stat & BROKEN))
main_part.set_broken()
/// Used to eat args
@@ -169,7 +169,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/set_broken()
..()
for(var/obj/machinery/gravity_generator/M in parts)
if(!(M.stat & BROKEN))
if(!(M.machine_stat & BROKEN))
M.set_broken()
middle.cut_overlays()
charge_count = 0
@@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/set_fix()
..()
for(var/obj/machinery/gravity_generator/M in parts)
if(M.stat & BROKEN)
if(M.machine_stat & BROKEN)
M.set_fix()
broken_state = FALSE
update_appearance()
@@ -239,7 +239,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
data["charge_count"] = charge_count
data["charging_state"] = charging_state
data["on"] = on
data["operational"] = (stat & BROKEN) ? FALSE : TRUE
data["operational"] = (machine_stat & BROKEN) ? FALSE : TRUE
return data
@@ -259,18 +259,18 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/power_change()
. = ..()
investigate_log("has [stat & NOPOWER ? "lost" : "regained"] power.", INVESTIGATE_GRAVITY)
investigate_log("has [machine_stat & NOPOWER ? "lost" : "regained"] power.", INVESTIGATE_GRAVITY)
set_power()
/obj/machinery/gravity_generator/main/get_status()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return "fix[min(broken_state, 3)]"
return on || charging_state != POWER_IDLE ? "on" : "off"
// Set the charging state based on power/breaker.
/obj/machinery/gravity_generator/main/proc/set_power()
var/new_state = FALSE
if(stat & (NOPOWER|BROKEN) || !breaker)
if(machine_stat & (NOPOWER|BROKEN) || !breaker)
new_state = FALSE
else if(breaker)
new_state = TRUE
@@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
// Charge/Discharge and turn on/off gravity when you reach 0/100 percent.
// Also emit radiation and handle the overlays.
/obj/machinery/gravity_generator/main/process()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(charging_state != POWER_IDLE)
if(charging_state == POWER_UP && charge_count >= 100)
+5 -5
View File
@@ -108,18 +108,18 @@
SHOULD_NOT_SLEEP(TRUE)
//SHOULD_CALL_PARENT(TRUE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(powered(power_channel))
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_RESTORED)
. = TRUE
set_machine_stat(stat & ~NOPOWER)
set_machine_stat(machine_stat & ~NOPOWER)
else
if(!(stat & NOPOWER))
if(!(machine_stat & NOPOWER))
SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_LOST)
. = TRUE
set_machine_stat(stat | NOPOWER)
set_machine_stat(machine_stat | NOPOWER)
update_appearance()
// connect the machine to a powernet if a node cable is present on the turf
+3 -3
View File
@@ -192,9 +192,9 @@
. += "<span class='notice'><b>[src]'s display displays the words:</b> \"Research point production mode. Please insert <b>Tritium</b> and <b>Oxygen</b>. Use a multitool to change production modes.\"</span>"
/obj/machinery/power/rad_collector/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
eject()
stat |= BROKEN
machine_stat |= BROKEN
/obj/machinery/power/rad_collector/proc/eject()
locked = FALSE
@@ -219,7 +219,7 @@
. = ..()
if(loaded_tank)
. += "ptank"
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(active)
. += "on"
+1 -1
View File
@@ -158,7 +158,7 @@
step(src, get_dir(M, src))
/obj/machinery/power/emitter/process()
if(stat & (BROKEN))
if(machine_stat & (BROKEN))
return
if(state != EMITTER_WELDED || (!powernet && active_power_usage))
active = FALSE
@@ -101,10 +101,10 @@
/obj/machinery/particle_accelerator/control_box/power_change()
. = ..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
active = FALSE
use_power = NO_POWER_USE
else if(!stat && construction_state == PA_CONSTRUCTION_COMPLETE)
else if(!machine_stat && construction_state == PA_CONSTRUCTION_COMPLETE)
use_power = IDLE_POWER_USE
/obj/machinery/particle_accelerator/control_box/process()
+5 -5
View File
@@ -94,7 +94,7 @@
if(!terminal)
to_chat(user, "<span class='alert'>No power terminal found.</span>")
return
stat &= ~BROKEN
machine_stat &= ~BROKEN
update_icon()
return
@@ -189,7 +189,7 @@
terminal = new/obj/machinery/power/terminal(T)
terminal.setDir(get_dir(T,src))
terminal.master = src
stat &= ~BROKEN
machine_stat &= ~BROKEN
/obj/machinery/power/smes/disconnect_terminal()
if(terminal)
@@ -200,7 +200,7 @@
/obj/machinery/power/smes/update_overlays()
. = ..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(panel_open)
@@ -225,7 +225,7 @@
return clamp(round(5.5*charge/capacity),0,5)
/obj/machinery/power/smes/process()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
//store machine state to see if we need to update the icon overlays
@@ -289,7 +289,7 @@
// called after all power processes are finished
// restores charge level to smes if there was excess this ptick
/obj/machinery/power/smes/proc/restore()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(!outputting)
+8 -8
View File
@@ -78,7 +78,7 @@
/obj/machinery/power/solar/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 60, TRUE)
else
playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE)
@@ -97,7 +97,7 @@
if(disassembled)
if(assembly)
assembly.forceMove(loc)
assembly.give_glass(stat & BROKEN)
assembly.give_glass(machine_stat & BROKEN)
else
playsound(src, "shatter", 70, TRUE)
var/shard = assembly?.glass_type ? assembly.glass_type.shard_type : /obj/item/shard
@@ -110,7 +110,7 @@
var/matrix/turner = matrix()
turner.Turn(azimuth_current)
panel.transform = turner
panel.icon_state = "solar_panel[(stat & BROKEN) ? "-b" : null]"
panel.icon_state = "solar_panel[(machine_stat & BROKEN) ? "-b" : null]"
/obj/machinery/power/solar/proc/queue_turn(azimuth)
needs_to_turn = TRUE
@@ -155,7 +155,7 @@
total_flux += cur_pow
/obj/machinery/power/solar/process()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(control && (!powernet || control.powernet != powernet))
unset_control()
@@ -331,12 +331,12 @@
/obj/machinery/power/solar_control/update_overlays()
. = ..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
. += mutable_appearance(icon, "[icon_keyboard]_off")
return
. += mutable_appearance(icon, icon_keyboard)
if(stat & BROKEN)
if(machine_stat & BROKEN)
. += mutable_appearance(icon, "[icon_state]_broken")
return
. += mutable_appearance(icon, icon_screen)
@@ -398,7 +398,7 @@
/obj/machinery/power/solar_control/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(I.use_tool(src, user, 20, volume=50))
if (src.stat & BROKEN)
if (src.machine_stat & BROKEN)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
new /obj/item/shard( src.loc )
@@ -429,7 +429,7 @@
/obj/machinery/power/solar_control/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
else
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE)
+2 -2
View File
@@ -67,7 +67,7 @@
return TRUE
/obj/machinery/power/tracker/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
unset_control()
@@ -76,7 +76,7 @@
if(disassembled)
if(assembly)
assembly.forceMove(loc)
assembly.give_glass(stat & BROKEN)
assembly.give_glass(machine_stat & BROKEN)
else
playsound(src, "shatter", 70, TRUE)
var/shard = assembly?.glass_type ? assembly.glass_type.shard_type : /obj/item/shard
+11 -11
View File
@@ -109,7 +109,7 @@
locate_machinery()
if(turbine)
to_chat(user, "<span class='notice'>Turbine connected.</span>")
stat &= ~BROKEN
machine_stat &= ~BROKEN
else
to_chat(user, "<span class='alert'>Turbine not connected.</span>")
obj_break()
@@ -120,9 +120,9 @@
/obj/machinery/power/compressor/process()
if(!starter)
return
if(!turbine || (turbine.stat & BROKEN))
if(!turbine || (turbine.machine_stat & BROKEN))
starter = FALSE
if(stat & BROKEN || panel_open)
if(machine_stat & BROKEN || panel_open)
starter = FALSE
return
cut_overlays()
@@ -138,7 +138,7 @@
rpm = min(rpm, (COMPFRICTION*efficiency)/2)
rpm = max(0, rpm - (rpm*rpm)/(COMPFRICTION*efficiency))
if(starter && !(stat & NOPOWER))
if(starter && !(machine_stat & NOPOWER))
use_power(2800)
if(rpm<1000)
rpmtarget = 1000
@@ -192,9 +192,9 @@
/obj/machinery/power/turbine/process()
if(!compressor)
stat = BROKEN
machine_stat = BROKEN
if((stat & BROKEN) || panel_open)
if((machine_stat & BROKEN) || panel_open)
return
if(!compressor.starter)
return
@@ -235,7 +235,7 @@
locate_machinery()
if(compressor)
to_chat(user, "<span class='notice'>Compressor connected.</span>")
stat &= ~BROKEN
machine_stat &= ~BROKEN
else
to_chat(user, "<span class='alert'>Compressor not connected.</span>")
obj_break()
@@ -252,9 +252,9 @@
/obj/machinery/power/turbine/ui_data(mob/user)
var/list/data = list()
data["compressor"] = compressor ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.stat & BROKEN)) ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.machine_stat & BROKEN)) ? TRUE : FALSE
data["turbine"] = compressor?.turbine ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.stat & BROKEN)) ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.machine_stat & BROKEN)) ? TRUE : FALSE
data["online"] = compressor?.starter
data["power"] = DisplayPower(compressor?.turbine?.lastgen)
data["rpm"] = compressor?.rpm
@@ -313,9 +313,9 @@
/obj/machinery/computer/turbine_computer/ui_data(mob/user)
var/list/data = list()
data["compressor"] = compressor ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.stat & BROKEN)) ? TRUE : FALSE
data["compressor_broke"] = (!compressor || (compressor.machine_stat & BROKEN)) ? TRUE : FALSE
data["turbine"] = compressor?.turbine ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.stat & BROKEN)) ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.machine_stat & BROKEN)) ? TRUE : FALSE
data["online"] = compressor?.starter
data["power"] = DisplayPower(compressor?.turbine?.lastgen)
data["rpm"] = compressor?.rpm