mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +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:
@@ -196,5 +196,11 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"MOB_EPIC" = MOB_EPIC,
|
||||
"MOB_REPTILE" = MOB_REPTILE,
|
||||
"MOB_SPIRIT" = MOB_SPIRIT
|
||||
),
|
||||
"machine_stat" = list (
|
||||
"BROKEN" = BROKEN,
|
||||
"NOPOWER" = NOPOWER,
|
||||
"MAINT" = MAINT,
|
||||
"EMPED" = EMPED
|
||||
)
|
||||
))
|
||||
|
||||
@@ -30,7 +30,7 @@ SUBSYSTEM_DEF(communications)
|
||||
|
||||
/datum/controller/subsystem/communications/proc/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
if(!(C.stat & (BROKEN|NOPOWER)) && is_station_level(C.z))
|
||||
if(!(C.machine_stat & (BROKEN|NOPOWER)) && is_station_level(C.z))
|
||||
if(unique)
|
||||
C.add_message(sending)
|
||||
else //We copy the message for each console, answers and deletions won't be shared
|
||||
|
||||
@@ -9,7 +9,7 @@ PROCESSING_SUBSYSTEM_DEF(nanites)
|
||||
var/neural_network_count = 0
|
||||
|
||||
/datum/controller/subsystem/processing/nanites/proc/check_hardware(datum/nanite_cloud_backup/backup)
|
||||
if(QDELETED(backup.storage) || (backup.storage.stat & (NOPOWER|BROKEN)))
|
||||
if(QDELETED(backup.storage) || (backup.storage.machine_stat & (NOPOWER|BROKEN)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
continue
|
||||
else if(istype(thing, /obj/machinery/computer/communications))
|
||||
var/obj/machinery/computer/communications/C = thing
|
||||
if(C.stat & BROKEN)
|
||||
if(C.machine_stat & BROKEN)
|
||||
continue
|
||||
|
||||
var/turf/T = get_turf(thing)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
if(!istype(L))
|
||||
return
|
||||
var/obj/machinery/recycler/eater = parent
|
||||
if(eater.safety_mode || (eater.stat & (BROKEN|NOPOWER))) //I'm so sorry.
|
||||
if(eater.safety_mode || (eater.machine_stat & (BROKEN|NOPOWER))) //I'm so sorry.
|
||||
return
|
||||
if(L.stat == DEAD && (L.butcher_results || L.guaranteed_butcher_results))
|
||||
Butcher(parent, L)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/datum/wires/roulette/interactable(mob/user)
|
||||
. = FALSE
|
||||
var/obj/machinery/roulette/R = holder
|
||||
if(R.stat & MAINT)
|
||||
if(R.machine_stat & MAINT)
|
||||
. = TRUE
|
||||
|
||||
/datum/wires/roulette/get_status()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/list/colorlist = list()
|
||||
|
||||
/obj/machinery/pdapainter/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/machinery/pdapainter/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
|
||||
if(storedpda)
|
||||
@@ -65,7 +65,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/pdapainter/attackby(obj/item/O, mob/user, params)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
|
||||
if(!O.tool_start_check(user, amount=0))
|
||||
return
|
||||
@@ -73,10 +73,10 @@
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='hear'>You hear welding.</span>")
|
||||
if(O.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
return
|
||||
|
||||
if(storedpda)
|
||||
if(stat & BROKEN) //otherwise the PDA is stuck until repaired
|
||||
if(machine_stat & BROKEN) //otherwise the PDA is stuck until repaired
|
||||
ejectpda()
|
||||
to_chat(user, "<span class='info'>You manage to eject the loaded PDA.</span>")
|
||||
else
|
||||
|
||||
@@ -96,7 +96,7 @@ Class Procs:
|
||||
anchored = TRUE
|
||||
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
|
||||
|
||||
var/stat = 0
|
||||
var/machine_stat = 0
|
||||
var/use_power = IDLE_POWER_USE
|
||||
//0 = dont run the auto
|
||||
//1 = run auto, use idle
|
||||
@@ -176,7 +176,7 @@ Class Procs:
|
||||
|
||||
/obj/machinery/emp_act(severity)
|
||||
. = ..()
|
||||
if(use_power && !stat && !(. & EMP_PROTECT_SELF))
|
||||
if(use_power && !machine_stat && !(. & EMP_PROTECT_SELF))
|
||||
use_power(7500/severity)
|
||||
new /obj/effect/temp_visual/emp(loc)
|
||||
|
||||
@@ -235,11 +235,11 @@ Class Procs:
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/is_operational()
|
||||
return !(stat & (NOPOWER|BROKEN|MAINT))
|
||||
return !(machine_stat & (NOPOWER|BROKEN|MAINT))
|
||||
|
||||
/obj/machinery/can_interact(mob/user)
|
||||
var/silicon = issiliconoradminghost(user)
|
||||
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE))
|
||||
if((machine_stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE))
|
||||
return FALSE
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
|
||||
if(!silicon || !(interaction_flags_machine & INTERACT_MACHINE_OPEN_SILICON))
|
||||
@@ -380,8 +380,8 @@ Class Procs:
|
||||
/obj/machinery/obj_break(damage_flag)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
. = ..()
|
||||
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
|
||||
stat |= BROKEN
|
||||
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
|
||||
machine_stat |= BROKEN
|
||||
SEND_SIGNAL(src, COMSIG_MACHINERY_BROKEN, damage_flag)
|
||||
update_icon()
|
||||
return TRUE
|
||||
@@ -504,7 +504,7 @@ Class Procs:
|
||||
|
||||
/obj/machinery/examine(mob/user)
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
. += "<span class='notice'>It looks broken and non-functional.</span>"
|
||||
if(!(resistance_flags & INDESTRUCTIBLE))
|
||||
if(resistance_flags & ON_FIRE)
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
. += "<span class='notice'>It has <b>[uses]</b> uses of foam remaining.</span>"
|
||||
|
||||
/obj/machinery/ai_slipper/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
if((stat & NOPOWER) || cooldown_time > world.time || !uses)
|
||||
if((machine_stat & NOPOWER) || cooldown_time > world.time || !uses)
|
||||
icon_state = "ai-slipper0"
|
||||
else
|
||||
icon_state = "ai-slipper1"
|
||||
|
||||
@@ -46,7 +46,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
if(newheadToggle)
|
||||
. += pinklight
|
||||
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
. += errorlight
|
||||
|
||||
/obj/machinery/announcement_system/Destroy()
|
||||
@@ -62,9 +62,9 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
update_icon()
|
||||
else if(default_deconstruction_crowbar(P))
|
||||
return
|
||||
else if(P.tool_behaviour == TOOL_MULTITOOL && panel_open && (stat & BROKEN))
|
||||
else if(P.tool_behaviour == TOOL_MULTITOOL && panel_open && (machine_stat & BROKEN))
|
||||
to_chat(user, "<span class='notice'>You reset [src]'s firmware.</span>")
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
@@ -99,7 +99,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='hear'>You hear a faint buzz.</span>")
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, TRUE)
|
||||
return
|
||||
@@ -117,7 +117,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
return
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='hear'>You hear a faint buzz.</span>")
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, TRUE)
|
||||
return
|
||||
@@ -151,7 +151,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
/obj/machinery/announcement_system/attack_ai(mob/user)
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s firmware appears to be malfunctioning!</span>")
|
||||
return
|
||||
interact(user)
|
||||
@@ -165,7 +165,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
|
||||
/obj/machinery/announcement_system/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(stat & (NOPOWER|BROKEN)) && !(. & EMP_PROTECT_SELF))
|
||||
if(!(machine_stat & (NOPOWER|BROKEN)) && !(. & EMP_PROTECT_SELF))
|
||||
act_up()
|
||||
|
||||
/obj/machinery/announcement_system/emag_act()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/aug_manipulator/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "[initial_icon_state]-broken"
|
||||
return
|
||||
|
||||
@@ -83,10 +83,10 @@
|
||||
"<span class='hear'>You hear welding.</span>")
|
||||
|
||||
if(O.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
obj_integrity = max(obj_integrity, max_integrity)
|
||||
update_icon()
|
||||
else
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(!is_operational())
|
||||
return
|
||||
|
||||
if(shocked && !(stat & NOPOWER))
|
||||
if(shocked && !(machine_stat & NOPOWER))
|
||||
shock(user,50)
|
||||
|
||||
var/dat
|
||||
@@ -120,7 +120,7 @@
|
||||
if(user.a_intent == INTENT_HARM) //so we can hit the machine
|
||||
return ..()
|
||||
|
||||
if(stat)
|
||||
if(machine_stat)
|
||||
return TRUE
|
||||
|
||||
if(istype(O, /obj/item/disk/design_disk))
|
||||
@@ -417,7 +417,7 @@
|
||||
disabled = FALSE
|
||||
|
||||
/obj/machinery/autolathe/proc/shock(mob/user, prb)
|
||||
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
||||
if(machine_stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/obj/machinery/computer/bank_machine/process()
|
||||
..()
|
||||
if(siphoning)
|
||||
if (stat & (BROKEN|NOPOWER))
|
||||
if (machine_stat & (BROKEN|NOPOWER))
|
||||
say("Insufficient power. Halting siphon.")
|
||||
end_syphon()
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/obj/machinery/button/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "button-open"
|
||||
else if(stat & (NOPOWER|BROKEN))
|
||||
else if(machine_stat & (NOPOWER|BROKEN))
|
||||
icon_state = "[skin]-p"
|
||||
else
|
||||
icon_state = skin
|
||||
@@ -160,7 +160,7 @@
|
||||
to_chat(user, "<span class='notice'>You change the button frame's front panel.</span>")
|
||||
return
|
||||
|
||||
if((stat & (NOPOWER|BROKEN)))
|
||||
if((machine_stat & (NOPOWER|BROKEN)))
|
||||
return
|
||||
|
||||
if(device && device.next_activate > world.time)
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
update_icon()
|
||||
network = list()
|
||||
GLOB.cameranet.removeCamera(src)
|
||||
stat |= EMPED
|
||||
machine_stat |= EMPED
|
||||
set_light(0)
|
||||
emped = emped+1 //Increase the number of consecutive EMP's
|
||||
update_icon()
|
||||
@@ -159,7 +159,7 @@
|
||||
if(emped != thisemp) //Only fix it if the camera hasn't been EMP'd again
|
||||
return
|
||||
network = previous_network
|
||||
stat &= ~EMPED
|
||||
machine_stat &= ~EMPED
|
||||
update_icon()
|
||||
if(can_use())
|
||||
GLOB.cameranet.addCamera(src)
|
||||
@@ -230,7 +230,7 @@
|
||||
return
|
||||
toggle_cam(user, 1)
|
||||
obj_integrity = max_integrity //this is a pretty simplistic way to heal the camera, but there's no reason for this to be complex.
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
I.play_tool_sound(src)
|
||||
return TRUE
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
|
||||
|
||||
/obj/machinery/camera/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return damage_amount
|
||||
. = ..()
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
xray_module = "xray"
|
||||
if(!status)
|
||||
icon_state = "[xray_module][default_camera_icon]_off"
|
||||
else if (stat & EMPED)
|
||||
else if (machine_stat & EMPED)
|
||||
icon_state = "[xray_module][default_camera_icon]_emp"
|
||||
else
|
||||
icon_state = "[xray_module][default_camera_icon][in_use_lights ? "_in_use" : ""]"
|
||||
@@ -440,7 +440,7 @@
|
||||
/obj/machinery/camera/proc/can_use()
|
||||
if(!status)
|
||||
return FALSE
|
||||
if(stat & EMPED)
|
||||
if(machine_stat & EMPED)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(!isMotion())
|
||||
. = PROCESS_KILL
|
||||
return
|
||||
if(stat & EMPED)
|
||||
if(machine_stat & EMPED)
|
||||
return
|
||||
if (detectTime > 0)
|
||||
var/elapsed = world.time - detectTime
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
if(!charging)
|
||||
return
|
||||
|
||||
|
||||
. += image(charging.icon, charging.icon_state)
|
||||
. += "ccharger-on"
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
if(!(machine_stat & (BROKEN|NOPOWER)))
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
. += "ccharger-o[newlevel]"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stock_parts/cell) && !panel_open)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src] is broken!</span>")
|
||||
return
|
||||
if(!anchored)
|
||||
@@ -108,7 +108,7 @@
|
||||
/obj/machinery/cell_charger/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
if(stat & (BROKEN|NOPOWER) || . & EMP_PROTECT_CONTENTS)
|
||||
if(machine_stat & (BROKEN|NOPOWER) || . & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
|
||||
if(charging)
|
||||
@@ -120,7 +120,7 @@
|
||||
charge_rate *= C.rating
|
||||
|
||||
/obj/machinery/cell_charger/process()
|
||||
if(!charging || !anchored || (stat & (BROKEN|NOPOWER)))
|
||||
if(!charging || !anchored || (machine_stat & (BROKEN|NOPOWER)))
|
||||
return
|
||||
|
||||
if(charging.percent() >= 100)
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/update_overlays()
|
||||
. = ..()
|
||||
|
||||
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
. += "[icon_keyboard]_off"
|
||||
return
|
||||
. += icon_keyboard
|
||||
@@ -44,14 +44,14 @@
|
||||
// This whole block lets screens ignore lighting and be visible even in the darkest room
|
||||
// We can't do this for many things that emit light unfortunately because it layers over things that would be on top of it
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
overlay_state = "[icon_state]_broken"
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
|
||||
/obj/machinery/computer/power_change()
|
||||
. = ..()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(brightness_on)
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/machinery/computer/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)
|
||||
@@ -102,7 +102,7 @@
|
||||
A.setDir(dir)
|
||||
A.circuit = circuit
|
||||
A.setAnchored(TRUE)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
|
||||
else
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/machinery/computer/aifixer/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(occupier)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge and it emits a warning beep.</span>")
|
||||
@@ -111,9 +111,9 @@
|
||||
|
||||
/obj/machinery/computer/aifixer/update_overlays()
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
|
||||
if(active)
|
||||
. += "ai-fixer-on"
|
||||
if (occupier)
|
||||
@@ -130,7 +130,7 @@
|
||||
return
|
||||
//Downloading AI from card to terminal.
|
||||
if(interaction == AI_TRANS_FROM_CARD)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='alert'>[src] is offline and cannot take an AI at this time.</span>")
|
||||
return
|
||||
AI.forceMove(src)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
result_filters = list("Name" = null, "Charge Above" = null, "Charge Below" = null, "Responsive" = null)
|
||||
|
||||
/obj/machinery/computer/apc_control/process()
|
||||
if(operator && (!operator.Adjacent(src) || stat))
|
||||
if(operator && (!operator.Adjacent(src) || machine_stat))
|
||||
operator = null
|
||||
if(active_apc)
|
||||
if(!active_apc.locked)
|
||||
@@ -37,7 +37,7 @@
|
||||
..(user)
|
||||
|
||||
/obj/machinery/computer/apc_control/proc/check_apc(obj/machinery/power/apc/APC)
|
||||
return APC.z == z && !APC.malfhack && !APC.aidisabled && !(APC.obj_flags & EMAGGED) && !APC.stat && !istype(APC.area, /area/ai_monitored) && !APC.area.outdoors
|
||||
return APC.z == z && !APC.malfhack && !APC.aidisabled && !(APC.obj_flags & EMAGGED) && !APC.machine_stat && !istype(APC.area, /area/ai_monitored) && !APC.area.outdoors
|
||||
|
||||
/obj/machinery/computer/apc_control/ui_interact(mob/living/user)
|
||||
. = ..()
|
||||
@@ -89,7 +89,7 @@
|
||||
/obj/machinery/computer/apc_control/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!usr || !usr.canUseTopic(src, !issilicon(usr)) || stat || QDELETED(src))
|
||||
if(!usr || !usr.canUseTopic(src, !issilicon(usr)) || machine_stat || QDELETED(src))
|
||||
return
|
||||
if(href_list["authenticate"])
|
||||
var/obj/item/card/id/ID = usr.get_idcard(TRUE)
|
||||
@@ -140,7 +140,7 @@
|
||||
if(href_list["name_filter"])
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
||||
var/new_filter = stripped_input(usr, "What name are you looking for?", name)
|
||||
if(!src || !usr || !usr.canUseTopic(src, !issilicon(usr)) || stat || QDELETED(src))
|
||||
if(!src || !usr || !usr.canUseTopic(src, !issilicon(usr)) || machine_stat || QDELETED(src))
|
||||
return
|
||||
log_activity("changed name filter to \"[new_filter]\"")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
@@ -148,7 +148,7 @@
|
||||
if(href_list["above_filter"])
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
||||
var/new_filter = input(usr, "Enter a percentage from 1-100 to sort by (greater than).", name) as null|num
|
||||
if(!src || !usr || !usr.canUseTopic(src, !issilicon(usr)) || stat || QDELETED(src))
|
||||
if(!src || !usr || !usr.canUseTopic(src, !issilicon(usr)) || machine_stat || QDELETED(src))
|
||||
return
|
||||
log_activity("changed greater than charge filter to \"[new_filter]\"")
|
||||
if(new_filter)
|
||||
@@ -158,7 +158,7 @@
|
||||
if(href_list["below_filter"])
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
||||
var/new_filter = input(usr, "Enter a percentage from 1-100 to sort by (lesser than).", name) as null|num
|
||||
if(!src || !usr || !usr.canUseTopic(src, !issilicon(usr)) || stat || QDELETED(src))
|
||||
if(!src || !usr || !usr.canUseTopic(src, !issilicon(usr)) || machine_stat || QDELETED(src))
|
||||
return
|
||||
log_activity("changed lesser than charge filter to \"[new_filter]\"")
|
||||
if(new_filter)
|
||||
@@ -201,6 +201,6 @@
|
||||
|
||||
/mob/proc/using_power_flow_console()
|
||||
for(var/obj/machinery/computer/apc_control/A in range(1, src))
|
||||
if(A.operator && A.operator == src && !A.stat)
|
||||
if(A.operator && A.operator == src && !A.machine_stat)
|
||||
return TRUE
|
||||
return
|
||||
|
||||
@@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
|
||||
if(prize_override)
|
||||
override = TRUE
|
||||
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
if(machine_stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
|
||||
var/empprize = null
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_overlays()
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(priority_alarms.len)
|
||||
. += "alert:2"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
network += "[idnum][i]"
|
||||
|
||||
/obj/machinery/computer/security/check_eye(mob/user)
|
||||
if( (stat & (NOPOWER|BROKEN)) || user.incapacitated() || user.eye_blind )
|
||||
if( (machine_stat & (NOPOWER|BROKEN)) || user.incapacitated() || user.eye_blind )
|
||||
user.unset_machine()
|
||||
return
|
||||
if(!(user in watchers))
|
||||
@@ -56,7 +56,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/security/interact(mob/user)
|
||||
if (stat)
|
||||
if (machine_stat)
|
||||
return
|
||||
if (ismob(user) && !isliving(user)) // ghosts don't need cameras
|
||||
return
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
/obj/machinery/computer/security/telescreen/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state += "b"
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 25, FALSE)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || user.eye_blind || user.incapacitated() )
|
||||
if( (machine_stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || user.eye_blind || user.incapacitated() )
|
||||
user.unset_machine()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/Destroy()
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/list/this_pad = list()
|
||||
this_pad["name"] = pad.display_name
|
||||
this_pad["id"] = i
|
||||
if(pad.stat & NOPOWER)
|
||||
if(pad.machine_stat & NOPOWER)
|
||||
this_pad["inactive"] = TRUE
|
||||
pad_list += list(this_pad)
|
||||
else
|
||||
@@ -82,7 +82,7 @@
|
||||
data["pad_name"] = current_pad.display_name
|
||||
data["range"] = current_pad.range
|
||||
data["selected_pad"] = current_pad
|
||||
if(QDELETED(current_pad) || (current_pad.stat & NOPOWER))
|
||||
if(QDELETED(current_pad) || (current_pad.machine_stat & NOPOWER))
|
||||
data["pad_active"] = FALSE
|
||||
return data
|
||||
data["pad_active"] = TRUE
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/machinery/computer/upload/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/aiModule))
|
||||
var/obj/item/aiModule/M = O
|
||||
if(stat & (NOPOWER|BROKEN|MAINT))
|
||||
if(machine_stat & (NOPOWER|BROKEN|MAINT))
|
||||
return
|
||||
if(!current)
|
||||
to_chat(user, "<span class='alert'>You haven't selected anything to transmit laws to!</span>")
|
||||
|
||||
@@ -535,7 +535,7 @@
|
||||
|
||||
/obj/machinery/computer/med_data/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && !(. & EMP_PROTECT_SELF))
|
||||
if(!(machine_stat & (BROKEN|NOPOWER)) && !(. & EMP_PROTECT_SELF))
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
if(prob(10/severity))
|
||||
switch(rand(1,6))
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/proc/alarm()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(!connected)
|
||||
|
||||
@@ -873,7 +873,7 @@ What a mess.*/
|
||||
/obj/machinery/computer/secure_data/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
if(stat & (BROKEN|NOPOWER) || . & EMP_PROTECT_SELF)
|
||||
if(machine_stat & (BROKEN|NOPOWER) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
data["alarms"][class] = list()
|
||||
for(var/area in alarms[class])
|
||||
data["alarms"][class] += area
|
||||
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/station_alert/proc/triggerAlarm(class, area/A, O, obj/source)
|
||||
if(source.z != z)
|
||||
return
|
||||
if(stat & (BROKEN))
|
||||
if(machine_stat & (BROKEN))
|
||||
return
|
||||
|
||||
var/list/L = alarms[class]
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/station_alert/proc/cancelAlarm(class, area/A, obj/origin)
|
||||
if(stat & (BROKEN))
|
||||
if(machine_stat & (BROKEN))
|
||||
return
|
||||
var/list/L = alarms[class]
|
||||
var/cleared = 0
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/machinery/computer/station_alert/update_overlays()
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/active_alarms = FALSE
|
||||
for(var/cat in alarms)
|
||||
|
||||
@@ -159,12 +159,12 @@
|
||||
log_game("[key_name(user)] has set the teleporter target to [target_station] at [AREACOORD(T)]")
|
||||
target = target_station.teleporter_hub
|
||||
target_station.linked_stations |= power_station
|
||||
target_station.stat &= ~NOPOWER
|
||||
target_station.machine_stat &= ~NOPOWER
|
||||
if(target_station.teleporter_hub)
|
||||
target_station.teleporter_hub.stat &= ~NOPOWER
|
||||
target_station.teleporter_hub.machine_stat &= ~NOPOWER
|
||||
target_station.teleporter_hub.update_icon()
|
||||
if(target_station.teleporter_console)
|
||||
target_station.teleporter_console.stat &= ~NOPOWER
|
||||
target_station.teleporter_console.machine_stat &= ~NOPOWER
|
||||
target_station.teleporter_console.update_icon()
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/is_eligible(atom/movable/AM)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
step_towards(I, src)
|
||||
|
||||
/obj/machinery/dish_drive/attack_ai(mob/living/user)
|
||||
if(stat)
|
||||
if(machine_stat)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You send a disposal transmission signal to [src].</span>")
|
||||
do_the_dishes(TRUE)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
|
||||
/obj/machinery/dna_scannernew/update_icon_state()
|
||||
//no power or maintenance
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
icon_state = initial(icon_state)+ (state_open ? "_open" : "") + "_unpowered"
|
||||
return
|
||||
|
||||
if((stat & MAINT) || panel_open)
|
||||
if((machine_stat & MAINT) || panel_open)
|
||||
icon_state = initial(icon_state)+ (state_open ? "_open" : "") + "_maintenance"
|
||||
return
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
return ((aiControlDisabled==1) && (!hackProof) && (!isAllPowerCut()));
|
||||
|
||||
/obj/machinery/door/airlock/hasPower()
|
||||
return ((!secondsMainPowerLost || !secondsBackupPowerLost) && !(stat & NOPOWER))
|
||||
return ((!secondsMainPowerLost || !secondsBackupPowerLost) && !(machine_stat & NOPOWER))
|
||||
|
||||
/obj/machinery/door/airlock/requiresID()
|
||||
return !(wires.is_cut(WIRE_IDSCAN) || aiDisabledIdScanner)
|
||||
@@ -612,7 +612,7 @@
|
||||
if("closing")
|
||||
update_icon(AIRLOCK_CLOSING)
|
||||
if("deny")
|
||||
if(!stat)
|
||||
if(!machine_stat)
|
||||
update_icon(AIRLOCK_DENY)
|
||||
playsound(src,doorDeni,50,FALSE,3)
|
||||
sleep(6)
|
||||
@@ -651,7 +651,7 @@
|
||||
else
|
||||
. += "It looks very robust."
|
||||
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
if(issilicon(user) && (!machine_stat & BROKEN))
|
||||
. += "<span class='notice'>Shift-click [src] to [ density ? "open" : "close"] it.</span>"
|
||||
. += "<span class='notice'>Ctrl-click [src] to [ locked ? "raise" : "drop"] its bolts.</span>"
|
||||
. += "<span class='notice'>Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it.</span>"
|
||||
@@ -970,7 +970,7 @@
|
||||
"<span class='hear'>You hear welding.</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
user.visible_message("<span class='notice'>[user.name] has repaired [src].</span>", \
|
||||
"<span class='notice'>You finish repairing the airlock.</span>")
|
||||
update_icon()
|
||||
@@ -1248,7 +1248,7 @@
|
||||
|
||||
/obj/machinery/door/airlock/hostile_lockdown(mob/origin)
|
||||
// Must be powered and have working AI wire.
|
||||
if(canAIControl(src) && !stat)
|
||||
if(canAIControl(src) && !machine_stat)
|
||||
locked = FALSE //For airlocks that were bolted open.
|
||||
safe = FALSE //DOOR CRUSH
|
||||
close()
|
||||
@@ -1260,7 +1260,7 @@
|
||||
|
||||
/obj/machinery/door/airlock/disable_lockdown()
|
||||
// Must be powered and have working AI wire.
|
||||
if(canAIControl(src) && !stat)
|
||||
if(canAIControl(src) && !machine_stat)
|
||||
unbolt()
|
||||
set_electrified(MACHINE_NOT_ELECTRIFIED)
|
||||
open()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/receive_signal(datum/signal/signal)
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
var/alarm_area = signal.data["zone"]
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
maptext_width = 32
|
||||
maptext_y = -1
|
||||
ui_x = 300
|
||||
ui_y = 138
|
||||
ui_y = 138
|
||||
|
||||
/obj/machinery/door_timer/Initialize()
|
||||
. = ..()
|
||||
@@ -70,7 +70,7 @@
|
||||
// if it's less than 0, open door, reset timer
|
||||
// update the door_timer window and the icon
|
||||
/obj/machinery/door_timer/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(timing)
|
||||
@@ -81,7 +81,7 @@
|
||||
// open/closedoor checks if door_timer has power, if so it checks if the
|
||||
// linked door is open/closed (by density) then opens it/closes it.
|
||||
/obj/machinery/door_timer/proc/timer_start()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
|
||||
activation_time = world.time
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
/obj/machinery/door_timer/proc/timer_end(forced = FALSE)
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
|
||||
if(!forced)
|
||||
@@ -154,11 +154,11 @@
|
||||
// if BROKEN, display blue screen of death icon AI uses
|
||||
// if timing=true, run update display function
|
||||
/obj/machinery/door_timer/update_icon()
|
||||
if(stat & (NOPOWER))
|
||||
if(machine_stat & (NOPOWER))
|
||||
icon_state = "frame"
|
||||
return
|
||||
|
||||
if(stat & (BROKEN))
|
||||
if(machine_stat & (BROKEN))
|
||||
set_picture("ai_bsod")
|
||||
return
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
else
|
||||
flick("doorc1", src)
|
||||
if("deny")
|
||||
if(!stat)
|
||||
if(!machine_stat)
|
||||
flick("door_deny", src)
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/hasPower()
|
||||
return !(stat & NOPOWER)
|
||||
return !(machine_stat & NOPOWER)
|
||||
|
||||
/obj/machinery/door/proc/update_freelook_sight()
|
||||
if(!glass && GLOB.cameranet)
|
||||
@@ -399,11 +399,11 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/hostile_lockdown(mob/origin)
|
||||
if(!stat) //So that only powered doors are closed.
|
||||
if(!machine_stat) //So that only powered doors are closed.
|
||||
close() //Close ALL the doors!
|
||||
|
||||
/obj/machinery/door/proc/disable_lockdown()
|
||||
if(!stat) //Opens only powered doors.
|
||||
if(!machine_stat) //Opens only powered doors.
|
||||
open() //Open everything!
|
||||
|
||||
/obj/machinery/door/ex_act(severity, target)
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
/obj/machinery/door/firedoor/attack_ai(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(welded || operating || stat & NOPOWER)
|
||||
if(welded || operating || machine_stat & NOPOWER)
|
||||
return TRUE
|
||||
if(density)
|
||||
open()
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor/proc/latetoggle()
|
||||
if(operating || stat & NOPOWER || !nextstate)
|
||||
if(operating || machine_stat & NOPOWER || !nextstate)
|
||||
return
|
||||
switch(nextstate)
|
||||
if(FIREDOOR_OPEN)
|
||||
|
||||
@@ -92,5 +92,5 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/poddoor/try_to_crowbar(obj/item/I, mob/user)
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
open(1)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/machinery/doppler_array/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if(stat)
|
||||
if(machine_stat)
|
||||
return FALSE
|
||||
|
||||
var/list/dat = list()
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/obj/machinery/doppler_array/proc/sense_explosion(datum/source, turf/epicenter, devastation_range, heavy_impact_range, light_impact_range,
|
||||
took, orig_dev_range, orig_heavy_range, orig_light_range)
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
return FALSE
|
||||
var/turf/zone = get_turf(src)
|
||||
if(zone.z != epicenter.z)
|
||||
@@ -103,7 +103,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/doppler_array/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
@@ -141,12 +141,12 @@
|
||||
|
||||
/obj/machinery/droneDispenser/examine(mob/user)
|
||||
. = ..()
|
||||
if((mode == DRONE_RECHARGING) && !stat && recharging_text)
|
||||
if((mode == DRONE_RECHARGING) && !machine_stat && recharging_text)
|
||||
. += "<span class='warning'>[recharging_text]</span>"
|
||||
|
||||
/obj/machinery/droneDispenser/process()
|
||||
..()
|
||||
if((stat & (NOPOWER|BROKEN)) || !anchored)
|
||||
if((machine_stat & (NOPOWER|BROKEN)) || !anchored)
|
||||
return
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
@@ -203,7 +203,7 @@
|
||||
.++
|
||||
|
||||
/obj/machinery/droneDispenser/update_icon_state()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
icon_state = icon_off
|
||||
else if(mode == DRONE_RECHARGING)
|
||||
icon_state = icon_recharging
|
||||
@@ -220,7 +220,7 @@
|
||||
to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>")
|
||||
|
||||
else if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
to_chat(user, "<span class='warning'>[src] doesn't need repairs.</span>")
|
||||
return
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
"<span class='notice'>[user] fixes [src]!</span>",
|
||||
"<span class='notice'>You restore [src] to operation.</span>")
|
||||
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
else
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
if(controller && !controller.busy && door)
|
||||
if(controller.stat & NOPOWER)
|
||||
if(controller.machine_stat & NOPOWER)
|
||||
return
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
@@ -83,7 +83,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/doorButtons/access_button/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
icon_state = "access_button_off"
|
||||
else
|
||||
if(busy)
|
||||
@@ -162,7 +162,7 @@
|
||||
A.safe = FALSE //Door crushies, manual door after all. Set every time in case someone changed it, safe doors can end up waiting forever.
|
||||
A.unbolt()
|
||||
if(A.close())
|
||||
if(stat & NOPOWER || lostPower || !A || QDELETED(A))
|
||||
if(machine_stat & NOPOWER || lostPower || !A || QDELETED(A))
|
||||
goIdle(TRUE)
|
||||
return FALSE
|
||||
A.bolt()
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
/obj/machinery/doorButtons/airlock_controller/proc/do_openDoor(obj/machinery/door/airlock/A)
|
||||
if(A && A.open())
|
||||
if(stat | (NOPOWER) && !lostPower && A && !QDELETED(A))
|
||||
if(machine_stat | (NOPOWER) && !lostPower && A && !QDELETED(A))
|
||||
A.bolt()
|
||||
goIdle(TRUE)
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/doorButtons/airlock_controller/process()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
return
|
||||
if(busy == CYCLE_EXTERIOR)
|
||||
cycleOpen(exteriorAirlock)
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
/obj/machinery/doorButtons/airlock_controller/power_change()
|
||||
. = ..()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
lostPower = TRUE
|
||||
else
|
||||
if(!busy)
|
||||
@@ -244,7 +244,7 @@
|
||||
exteriorAirlock = A
|
||||
|
||||
/obj/machinery/doorButtons/airlock_controller/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
icon_state = "access_control_off"
|
||||
return
|
||||
if(busy || lostPower)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
icon_state = "fire_b[buildstage]"
|
||||
return
|
||||
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "firex"
|
||||
return
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
return
|
||||
|
||||
. += "fire_overlay"
|
||||
@@ -111,7 +111,7 @@
|
||||
playsound(src, "sparks", 50, TRUE)
|
||||
|
||||
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && (last_alarm+FIREALARM_COOLDOWN < world.time) && !(obj_flags & EMAGGED) && detecting && !stat)
|
||||
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && (last_alarm+FIREALARM_COOLDOWN < world.time) && !(obj_flags & EMAGGED) && detecting && !machine_stat)
|
||||
alarm()
|
||||
..()
|
||||
|
||||
@@ -216,9 +216,9 @@
|
||||
"<span class='notice'>You start prying out the circuit...</span>")
|
||||
if(W.use_tool(src, user, 20, volume=50))
|
||||
if(buildstage == 1)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed circuit.</span>")
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You pry out the circuit.</span>")
|
||||
new /obj/item/electronics/firealarm(user.loc)
|
||||
@@ -272,7 +272,7 @@
|
||||
/obj/machinery/firealarm/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(.) //damage received
|
||||
if(obj_integrity > 0 && !(stat & BROKEN) && buildstage != 0)
|
||||
if(obj_integrity > 0 && !(machine_stat & BROKEN) && buildstage != 0)
|
||||
if(prob(33))
|
||||
alarm()
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
/obj/machinery/firealarm/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
new /obj/item/stack/sheet/metal(loc, 1)
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
var/obj/item/I = new /obj/item/electronics/firealarm(loc)
|
||||
if(!disassembled)
|
||||
I.obj_integrity = I.max_integrity * 0.5
|
||||
@@ -319,7 +319,7 @@
|
||||
var/static/party_overlay
|
||||
|
||||
/obj/machinery/firealarm/partyalarm/reset()
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
if (machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
if (!A || !A.party)
|
||||
@@ -328,7 +328,7 @@
|
||||
A.cut_overlay(party_overlay)
|
||||
|
||||
/obj/machinery/firealarm/partyalarm/alarm()
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
if (machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
if (!A || A.party || A.name == "Space")
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/obj/machinery/flasher/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && !(. & EMP_PROTECT_SELF))
|
||||
if(!(machine_stat & (BROKEN|NOPOWER)) && !(. & EMP_PROTECT_SELF))
|
||||
if(bulb && prob(75/severity))
|
||||
flash()
|
||||
bulb.burn_out()
|
||||
|
||||
@@ -67,13 +67,13 @@ The console is located at computer/gulag_teleporter.dm
|
||||
/obj/machinery/gulag_teleporter/update_icon_state()
|
||||
icon_state = initial(icon_state) + (state_open ? "_open" : "")
|
||||
//no power or maintenance
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
icon_state += "_unpowered"
|
||||
if((stat & MAINT) || panel_open)
|
||||
if((machine_stat & MAINT) || panel_open)
|
||||
icon_state += "_maintenance"
|
||||
return
|
||||
|
||||
if((stat & MAINT) || panel_open)
|
||||
if((machine_stat & MAINT) || panel_open)
|
||||
icon_state += "_maintenance"
|
||||
return
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
/obj/machinery/harvester/examine(mob/user)
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
if(state_open)
|
||||
. += "<span class='notice'>[src] must be closed before harvesting.</span>"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/igniter/process() //ugh why is this even in process()?
|
||||
if (src.on && !(stat & NOPOWER) )
|
||||
if (src.on && !(machine_stat & NOPOWER) )
|
||||
var/turf/location = src.loc
|
||||
if (isturf(location))
|
||||
location.hotspot_expose(1000,500,1)
|
||||
@@ -48,7 +48,7 @@
|
||||
icon_state = "igniter[on]"
|
||||
|
||||
/obj/machinery/igniter/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
icon_state = "igniter0"
|
||||
else
|
||||
icon_state = "igniter[on]"
|
||||
@@ -134,5 +134,5 @@
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
if(!(machine_stat & (BROKEN|NOPOWER)))
|
||||
ignite()
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
ghost.forceMove(target)
|
||||
|
||||
/obj/machinery/launchpad/proc/isAvailable()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
return FALSE
|
||||
if(panel_open)
|
||||
return FALSE
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/light_switch/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
icon_state = "light-p"
|
||||
else
|
||||
if(area.lightswitch)
|
||||
@@ -56,5 +56,5 @@
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
if(!(machine_stat & (BROKEN|NOPOWER)))
|
||||
power_change()
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
|
||||
/obj/machinery/magnetic_module/process()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
on = FALSE
|
||||
|
||||
// Sanity checks:
|
||||
@@ -326,7 +326,7 @@
|
||||
|
||||
while(moving && rpath.len >= 1)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
break
|
||||
|
||||
looping = 1
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
id = "[idnum][id]"
|
||||
|
||||
/obj/machinery/mass_driver/proc/drive(amount)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
use_power(500)
|
||||
var/O_limit
|
||||
@@ -37,6 +37,6 @@
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
drive()
|
||||
|
||||
@@ -225,7 +225,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/newscaster/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
icon_state = "newscaster_off"
|
||||
else
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
@@ -236,7 +236,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
/obj/machinery/newscaster/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN)) && !GLOB.news_network.wanted_issue.active && alert)
|
||||
if(!(machine_stat & (NOPOWER|BROKEN)) && !GLOB.news_network.wanted_issue.active && alert)
|
||||
. += "newscaster_alert"
|
||||
|
||||
var/hp_percent = obj_integrity * 100 /max_integrity
|
||||
@@ -713,7 +713,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>The broken remains of [src] fall on the ground.</span>")
|
||||
new /obj/item/stack/sheet/metal(loc, 5)
|
||||
new /obj/item/shard(loc)
|
||||
@@ -723,18 +723,18 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
new /obj/item/wallframe/newscaster(loc)
|
||||
qdel(src)
|
||||
else if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] is repairing [src].</span>", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='hear'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
@@ -744,7 +744,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
/obj/machinery/newscaster/play_attack_sound(damage, 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', 100, TRUE)
|
||||
else
|
||||
playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
|
||||
var/turret_flags = TURRET_FLAG_SHOOT_CRIMINALS | TURRET_FLAG_SHOOT_ANOMALOUS
|
||||
|
||||
|
||||
var/on = TRUE //determines if the turret is on
|
||||
|
||||
var/list/faction = list("turret" ) // Same faction mobs will never be shot at, no matter the other settings
|
||||
@@ -103,7 +103,7 @@
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "[base_icon_state]_broken"
|
||||
else
|
||||
if(powered())
|
||||
@@ -223,12 +223,12 @@
|
||||
|
||||
/obj/machinery/porta_turret/power_change()
|
||||
. = ..()
|
||||
if(!anchored || (stat & BROKEN) || !powered())
|
||||
if(!anchored || (machine_stat & BROKEN) || !powered())
|
||||
update_icon()
|
||||
remove_control()
|
||||
|
||||
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
//If the turret is destroyed, you can remove it with a crowbar to
|
||||
//try and salvage its components
|
||||
@@ -344,14 +344,14 @@
|
||||
/obj/machinery/porta_turret/process()
|
||||
//the main machinery process
|
||||
if(cover == null && anchored) //if it has no cover and is anchored
|
||||
if(stat & BROKEN) //if the turret is borked
|
||||
if(machine_stat & BROKEN) //if the turret is borked
|
||||
qdel(cover) //delete its cover, assuming it has one. Workaround for a pesky little bug
|
||||
else
|
||||
if(has_cover)
|
||||
cover = new /obj/machinery/porta_turret_cover(loc) //if the turret has no cover and is anchored, give it a cover
|
||||
cover.parent_turret = src //assign the cover its parent_turret, which would be this (src)
|
||||
|
||||
if(!on || (stat & (NOPOWER|BROKEN)) || manual_control)
|
||||
if(!on || (machine_stat & (NOPOWER|BROKEN)) || manual_control)
|
||||
return
|
||||
|
||||
var/list/targets = list()
|
||||
@@ -432,7 +432,7 @@
|
||||
return
|
||||
if(raising || raised)
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
invisibility = 0
|
||||
raising = 1
|
||||
@@ -448,7 +448,7 @@
|
||||
/obj/machinery/porta_turret/proc/popDown() //pops the turret down
|
||||
if(raising || !raised)
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
layer = OBJ_LAYER
|
||||
raising = 1
|
||||
@@ -496,7 +496,7 @@
|
||||
// If we aren't shooting heads then return a threatcount of 0
|
||||
if (!(turret_flags & TURRET_FLAG_SHOOT_HEADS) && (perp.get_assignment() in GLOB.command_positions))
|
||||
return 0
|
||||
|
||||
|
||||
return threatcount
|
||||
|
||||
/obj/machinery/porta_turret/proc/in_faction(mob/target)
|
||||
@@ -829,12 +829,12 @@
|
||||
|
||||
/obj/machinery/turretid/examine(mob/user)
|
||||
. += ..()
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
if(issilicon(user) && (!machine_stat & BROKEN))
|
||||
. += {"<span class='notice'>Ctrl-click [src] to [ enabled ? "disable" : "enable"] turrets.</span>
|
||||
<span class='notice'>Alt-click [src] to set turrets to [ lethal ? "stun" : "kill"].</span>"}
|
||||
|
||||
/obj/machinery/turretid/attackby(obj/item/I, mob/user, params)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
@@ -943,7 +943,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/turretid/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
icon_state = "control_off"
|
||||
else if (enabled)
|
||||
if (lethal)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
to_chat(user, "<span class='warning'>Target pad is busy. Please wait.</span>")
|
||||
return
|
||||
|
||||
if(target_pad.stat & NOPOWER)
|
||||
if(target_pad.machine_stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>Target pad is not responding to ping.</span>")
|
||||
return
|
||||
add_fingerprint(user)
|
||||
@@ -141,11 +141,11 @@
|
||||
if(!src || QDELETED(src))
|
||||
teleporting = FALSE
|
||||
return
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>[src] is unpowered!</span>")
|
||||
teleporting = FALSE
|
||||
return
|
||||
if(!target_pad || QDELETED(target_pad) || target_pad.stat & NOPOWER)
|
||||
if(!target_pad || QDELETED(target_pad) || target_pad.machine_stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>Linked pad is not responding to ping. Teleport aborted.</span>")
|
||||
teleporting = FALSE
|
||||
return
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
. += {"<span class='notice'>\The [src] contains:</span>
|
||||
<span class='notice'>- \A [charging].</span>"}
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
if(!(machine_stat & (NOPOWER|BROKEN)))
|
||||
. += "<span class='notice'>The status display reads:</span>"
|
||||
. += "<span class='notice'>- Recharging <b>[recharge_coeff*10]%</b> cell charge per cycle.</span>"
|
||||
if(charging)
|
||||
@@ -119,7 +119,7 @@
|
||||
setCharging(null)
|
||||
|
||||
/obj/machinery/recharger/process()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
if(machine_stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return PROCESS_KILL
|
||||
|
||||
using_power = FALSE
|
||||
@@ -147,7 +147,7 @@
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
if(!(stat & (NOPOWER|BROKEN)) && anchored)
|
||||
if(!(machine_stat & (NOPOWER|BROKEN)) && anchored)
|
||||
if(istype(charging, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = charging
|
||||
if(E.cell)
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
|
||||
/obj/machinery/recharger/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
if(machine_stat & (NOPOWER|BROKEN) || !anchored)
|
||||
icon_state = "rechargeroff"
|
||||
else if(panel_open)
|
||||
icon_state = "rechargeropen"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/obj/machinery/recharge_station/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
if(!(machine_stat & (BROKEN|NOPOWER)))
|
||||
if(occupant && !(. & EMP_PROTECT_CONTENTS))
|
||||
occupant.emp_act(severity)
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/obj/machinery/recycler/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Reclaiming <b>[amount_produced]%</b> of materials salvaged.</span>"
|
||||
. += {"The power light is [(stat & NOPOWER) ? "off" : "on"].
|
||||
. += {"The power light is [(machine_stat & NOPOWER) ? "off" : "on"].
|
||||
The safety-mode light is [safety_mode ? "on" : "off"].
|
||||
The safety-sensors status light is [obj_flags & EMAGGED ? "off" : "on"]."}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/obj/machinery/recycler/update_icon_state()
|
||||
..()
|
||||
var/is_powered = !(stat & (BROKEN|NOPOWER))
|
||||
var/is_powered = !(machine_stat & (BROKEN|NOPOWER))
|
||||
if(safety_mode)
|
||||
is_powered = FALSE
|
||||
icon_state = icon_name + "[is_powered]" + "[(blood ? "bld" : "")]" // add the blood tag at the end
|
||||
@@ -91,7 +91,7 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/recycler/proc/eat(atom/AM0, sound=TRUE)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(safety_mode)
|
||||
return
|
||||
|
||||
@@ -70,7 +70,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
|
||||
armor = list("melee" = 70, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
|
||||
|
||||
/obj/machinery/requests_console/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1.4,0.7,"#34D352")//green light
|
||||
@@ -79,7 +79,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
|
||||
icon_state="req_comp_open"
|
||||
else
|
||||
icon_state="req_comp_rewired"
|
||||
else if(stat & NOPOWER)
|
||||
else if(machine_stat & NOPOWER)
|
||||
if(icon_state != "req_comp_off")
|
||||
icon_state = "req_comp_off"
|
||||
else
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/roulette/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
if(stat & MAINT)
|
||||
if(machine_stat & MAINT)
|
||||
return
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
///Handles setting ownership and the betting itself.
|
||||
/obj/machinery/roulette/attackby(obj/item/W, mob/user, params)
|
||||
if(stat & MAINT && is_wire_tool(W))
|
||||
if(machine_stat & MAINT && is_wire_tool(W))
|
||||
wires.interact(user)
|
||||
return
|
||||
if(playing)
|
||||
@@ -112,7 +112,7 @@
|
||||
if(istype(W, /obj/item/card/id))
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50, TRUE)
|
||||
|
||||
if(stat & MAINT || !on || locked)
|
||||
if(machine_stat & MAINT || !on || locked)
|
||||
to_chat(user, "<span class='notice'>The machine appears to be disabled.</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
/obj/machinery/roulette/update_icon(payout, color, rolled_number, is_winner = FALSE)
|
||||
cut_overlays()
|
||||
|
||||
if(stat & MAINT)
|
||||
if(machine_stat & MAINT)
|
||||
return
|
||||
|
||||
if(playing)
|
||||
@@ -366,17 +366,17 @@
|
||||
|
||||
/obj/machinery/roulette/welder_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(stat & MAINT)
|
||||
if(machine_stat & MAINT)
|
||||
to_chat(user, "<span class='notice'>You start re-attaching the top section of [src]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
to_chat(user, "<span class='notice'>You re-attach the top section of [src].</span>")
|
||||
stat &= ~MAINT
|
||||
machine_stat &= ~MAINT
|
||||
icon_state = "idle"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start welding the top section from [src]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
to_chat(user, "<span class='notice'>You removed the top section of [src].</span>")
|
||||
stat |= MAINT
|
||||
machine_stat |= MAINT
|
||||
icon_state = "open"
|
||||
|
||||
/obj/machinery/roulette/proc/shock(mob/user, prb)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/obj/machinery/scanner_gate/Crossed(atom/movable/AM)
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && isliving(AM))
|
||||
if(!(machine_stat & (BROKEN|NOPOWER)) && isliving(AM))
|
||||
perform_scan(AM)
|
||||
|
||||
/obj/machinery/scanner_gate/proc/set_scanline(type, duration)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
for(var/turf/target_tile in range(shield_range, src))
|
||||
if(isspaceturf(target_tile) && !(locate(/obj/structure/emergency_shield) in target_tile))
|
||||
if(!(stat & BROKEN) || prob(33))
|
||||
if(!(machine_stat & BROKEN) || prob(33))
|
||||
deployed_shields += new /obj/structure/emergency_shield(target_tile)
|
||||
|
||||
/obj/machinery/shieldgen/proc/shields_down()
|
||||
@@ -108,7 +108,7 @@
|
||||
QDEL_LIST(deployed_shields)
|
||||
|
||||
/obj/machinery/shieldgen/process()
|
||||
if((stat & BROKEN) && active)
|
||||
if((machine_stat & BROKEN) && active)
|
||||
if(deployed_shields.len && prob(5))
|
||||
qdel(pick(deployed_shields))
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
to_chat(user, "<span class='notice'>You open the panel and expose the wiring.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You close the panel.</span>")
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && (stat & BROKEN) && panel_open)
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && (machine_stat & BROKEN) && panel_open)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if (coil.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one length of cable to repair [src]!</span>")
|
||||
@@ -162,7 +162,7 @@
|
||||
return
|
||||
coil.use(1)
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
machine_stat &= ~BROKEN
|
||||
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
@@ -205,9 +205,9 @@
|
||||
|
||||
/obj/machinery/shieldgen/update_icon_state()
|
||||
if(active)
|
||||
icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon"
|
||||
icon_state = (machine_stat & BROKEN) ? "shieldonbr":"shieldon"
|
||||
else
|
||||
icon_state = (stat & BROKEN) ? "shieldoffbr":"shieldoff"
|
||||
icon_state = (machine_stat & BROKEN) ? "shieldoffbr":"shieldoff"
|
||||
|
||||
#define ACTIVE_SETUPFIELDS 1
|
||||
#define ACTIVE_HASFIELDS 2
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
money++ //SPESSH MAJICKS
|
||||
|
||||
/obj/machinery/computer/slot_machine/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
icon_state = "slots0"
|
||||
|
||||
else if(stat & BROKEN)
|
||||
else if(machine_stat & BROKEN)
|
||||
icon_state = "slotsb"
|
||||
|
||||
else if(working)
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
/obj/machinery/computer/slot_machine/emp_act(severity)
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
if(machine_stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(15 * severity))
|
||||
return
|
||||
@@ -227,9 +227,9 @@
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/slot_machine/proc/can_spin(mob/user)
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>The slot machine has no power!</span>")
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>The slot machine is broken!</span>")
|
||||
if(working)
|
||||
to_chat(user, "<span class='warning'>You need to wait until the machine stops spinning before you can play again!</span>")
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/obj/machinery/space_heater/update_overlays()
|
||||
. = ..()
|
||||
|
||||
|
||||
if(panel_open)
|
||||
. += "sheater-open"
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
/obj/machinery/space_heater/emp_act(severity)
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_CONTENTS)
|
||||
if(machine_stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
if(cell)
|
||||
cell.emp_act(severity)
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
return stasis_enabled && is_operational()
|
||||
|
||||
/obj/machinery/stasis/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "stasis_broken"
|
||||
return
|
||||
if(panel_open || stat & MAINT)
|
||||
if(panel_open || machine_stat & MAINT)
|
||||
icon_state = "stasis_maintenance"
|
||||
return
|
||||
icon_state = "stasis"
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
// Timed process - performs default marquee action if so needed.
|
||||
/obj/machinery/status_display/process()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
// No power, no processing.
|
||||
remove_display()
|
||||
return PROCESS_KILL
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/obj/machinery/status_display/emp_act(severity)
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
if(machine_stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
set_picture("ai_bsod")
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/status_display/evac/process()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
// No power, no processing.
|
||||
remove_display()
|
||||
return PROCESS_KILL
|
||||
@@ -226,7 +226,7 @@
|
||||
name = "supply display"
|
||||
|
||||
/obj/machinery/status_display/supply/process()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
// No power, no processing.
|
||||
remove_display()
|
||||
return PROCESS_KILL
|
||||
@@ -270,7 +270,7 @@
|
||||
var/shuttle_id
|
||||
|
||||
/obj/machinery/status_display/shuttle/process()
|
||||
if(!shuttle_id || (stat & NOPOWER))
|
||||
if(!shuttle_id || (machine_stat & NOPOWER))
|
||||
// No power, no processing.
|
||||
remove_display()
|
||||
return PROCESS_KILL
|
||||
@@ -319,7 +319,7 @@
|
||||
user.ai_statuschange()
|
||||
|
||||
/obj/machinery/status_display/ai/process()
|
||||
if(mode == SD_BLANK || (stat & NOPOWER))
|
||||
if(mode == SD_BLANK || (machine_stat & NOPOWER))
|
||||
remove_display()
|
||||
return PROCESS_KILL
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
else
|
||||
. += "uv"
|
||||
else if(state_open)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
. += "broken"
|
||||
else
|
||||
. += "open"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS
|
||||
stat = 0
|
||||
machine_stat = 0
|
||||
verb_say = "states"
|
||||
var/cooldown = 0
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Lets you read PDA and request console messages.
|
||||
*/
|
||||
|
||||
#define LINKED_SERVER_NONRESPONSIVE (!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
|
||||
#define LINKED_SERVER_NONRESPONSIVE (!linkedServer || (linkedServer.machine_stat & (NOPOWER|BROKEN)))
|
||||
|
||||
#define MSG_MON_SCREEN_MAIN 0
|
||||
#define MSG_MON_SCREEN_LOGS 1
|
||||
|
||||
@@ -125,7 +125,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
/obj/machinery/telecomms/proc/update_power()
|
||||
|
||||
if(toggled)
|
||||
if(stat & (BROKEN|NOPOWER|EMPED)) // if powered, on. if not powered, off. if too damaged, off
|
||||
if(machine_stat & (BROKEN|NOPOWER|EMPED)) // if powered, on. if not powered, off. if too damaged, off
|
||||
on = FALSE
|
||||
else
|
||||
on = TRUE
|
||||
@@ -145,10 +145,10 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(100/severity) && !(stat & EMPED))
|
||||
stat |= EMPED
|
||||
if(prob(100/severity) && !(machine_stat & EMPED))
|
||||
machine_stat |= EMPED
|
||||
var/duration = (300 * 10)/severity
|
||||
addtimer(CALLBACK(src, .proc/de_emp), rand(duration - 20, duration + 20))
|
||||
|
||||
/obj/machinery/telecomms/proc/de_emp()
|
||||
stat &= ~EMPED
|
||||
machine_stat &= ~EMPED
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
icon_state = "tele0"
|
||||
|
||||
/obj/machinery/teleport/hub/proc/is_ready()
|
||||
. = !panel_open && !(stat & (BROKEN|NOPOWER)) && power_station && power_station.engaged && !(power_station.stat & (BROKEN|NOPOWER))
|
||||
. = !panel_open && !(machine_stat & (BROKEN|NOPOWER)) && power_station && power_station.engaged && !(power_station.machine_stat & (BROKEN|NOPOWER))
|
||||
|
||||
/obj/machinery/teleport/hub/syndicate/Initialize()
|
||||
. = ..()
|
||||
@@ -195,10 +195,10 @@
|
||||
toggle(user)
|
||||
|
||||
/obj/machinery/teleport/station/proc/toggle(mob/user)
|
||||
if(stat & (BROKEN|NOPOWER) || !teleporter_hub || !teleporter_console )
|
||||
if(machine_stat & (BROKEN|NOPOWER) || !teleporter_hub || !teleporter_console )
|
||||
return
|
||||
if (teleporter_console.target)
|
||||
if(teleporter_hub.panel_open || teleporter_hub.stat & (BROKEN|NOPOWER))
|
||||
if(teleporter_hub.panel_open || teleporter_hub.machine_stat & (BROKEN|NOPOWER))
|
||||
to_chat(user, "<span class='alert'>The teleporter hub isn't responding.</span>")
|
||||
else
|
||||
engaged = !engaged
|
||||
@@ -218,7 +218,7 @@
|
||||
/obj/machinery/teleport/station/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "controller-o"
|
||||
else if(stat & (BROKEN|NOPOWER))
|
||||
else if(machine_stat & (BROKEN|NOPOWER))
|
||||
icon_state = "controller-p"
|
||||
else if(teleporter_console && teleporter_console.calibrating)
|
||||
icon_state = "controller-c"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/transformer/update_icon_state()
|
||||
if(stat & (BROKEN|NOPOWER) || cooldown == 1)
|
||||
if(machine_stat & (BROKEN|NOPOWER) || cooldown == 1)
|
||||
icon_state = "separator-AO0"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
@@ -68,7 +68,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/transformer/proc/do_transform(mob/living/carbon/human/H)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(cooldown == 1)
|
||||
return
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
. += "<span class='notice'>The status display reads: Base recharge rate at <b>[max_charge]J</b> per cycle.</span>"
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/process()
|
||||
if(stat & NOPOWER || !recharge_console)
|
||||
if(machine_stat & NOPOWER || !recharge_console)
|
||||
return
|
||||
if(!recharging_mech)
|
||||
recharging_mech = locate(/obj/mecha) in recharging_turf
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/update_overlays()
|
||||
. = ..()
|
||||
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN))
|
||||
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
. += "recharge_comp_on"
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
return
|
||||
temp = null
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
if(machine_stat&(NOPOWER|BROKEN))
|
||||
return FALSE
|
||||
if(build_part(D))
|
||||
remove_from_queue(1)
|
||||
@@ -399,11 +399,11 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/do_process_queue()
|
||||
if(processing_queue || being_built)
|
||||
return FALSE
|
||||
/obj/machinery/mecha_part_fabricator/proc/do_process_queue()
|
||||
if(processing_queue || being_built)
|
||||
return FALSE
|
||||
processing_queue = 1
|
||||
process_queue()
|
||||
process_queue()
|
||||
processing_queue = 0
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/eject_sheets(eject_sheet, eject_amt)
|
||||
|
||||
@@ -263,7 +263,7 @@ Code:
|
||||
|
||||
var/turf/pda_turf = get_turf(src)
|
||||
for(var/obj/machinery/computer/monitor/pMon in GLOB.machines)
|
||||
if(pMon.stat & (NOPOWER | BROKEN)) //check to make sure the computer is functional
|
||||
if(pMon.machine_stat & (NOPOWER | BROKEN)) //check to make sure the computer is functional
|
||||
continue
|
||||
if(pda_turf.z != pMon.z) //and that we're on the same zlevel as the computer (lore: limited signal strength)
|
||||
continue
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
if( world.time > (last_net_update + 100))
|
||||
bugged_cameras = list()
|
||||
for(var/obj/machinery/camera/camera in GLOB.cameranet.cameras)
|
||||
if(camera.stat || !camera.can_use())
|
||||
if(camera.machine_stat || !camera.can_use())
|
||||
continue
|
||||
if(length(list("ss13","mine", "rd", "labor", "toxins", "minisat")&camera.network))
|
||||
bugged_cameras[camera.c_tag] = camera
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
if(mode == "draw")
|
||||
if(is_type_in_list(target, charge_machines))
|
||||
var/obj/machinery/M = target
|
||||
if((M.stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
if((M.machine_stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
to_chat(user, "<span class='warning'>[M] is unpowered!</span>")
|
||||
return
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
if(!user || !user.cell || mode != "draw")
|
||||
return
|
||||
|
||||
if((M.stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
if((M.machine_stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
break
|
||||
|
||||
if(!user.cell.give(150))
|
||||
@@ -877,7 +877,7 @@
|
||||
/obj/item/borg/apparatus/beaker/extra
|
||||
name = "secondary beaker storage apparatus"
|
||||
desc = "A supplementary beaker storage apparatus."
|
||||
|
||||
|
||||
/obj/item/borg/apparatus/beaker/service
|
||||
name = "beverage storage apparatus"
|
||||
desc = "A special apparatus for carrying drinks without spilling the contents. Alt-Z or right-click to drop the beaker."
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
// TODO: Implement more logic here. For now it's only a placeholder.
|
||||
/obj/machinery/ntnet_relay/is_operational()
|
||||
if(stat & (BROKEN | NOPOWER | EMPED))
|
||||
if(machine_stat & (BROKEN | NOPOWER | EMPED))
|
||||
return FALSE
|
||||
if(dos_failure)
|
||||
return FALSE
|
||||
|
||||
@@ -445,7 +445,7 @@
|
||||
|
||||
|
||||
/obj/machinery/airalarm/proc/shock(mob/user, prb)
|
||||
if((stat & (NOPOWER))) // unpowered, no shock
|
||||
if((machine_stat & (NOPOWER))) // unpowered, no shock
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0 //you lucked out, no shock for you
|
||||
@@ -621,7 +621,7 @@
|
||||
icon_state = "alarm_b1"
|
||||
return
|
||||
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
if((machine_stat & (NOPOWER|BROKEN)) || shorted)
|
||||
icon_state = "alarmp"
|
||||
return
|
||||
|
||||
@@ -635,7 +635,7 @@
|
||||
icon_state = "alarm1"
|
||||
|
||||
/obj/machinery/airalarm/process()
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
if((machine_stat & (NOPOWER|BROKEN)) || shorted)
|
||||
return
|
||||
|
||||
var/turf/location = get_turf(src)
|
||||
@@ -698,7 +698,7 @@
|
||||
|
||||
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 = max(new_area_danger_level,AA.danger_level)
|
||||
if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state
|
||||
post_alert(new_area_danger_level)
|
||||
@@ -812,7 +812,7 @@
|
||||
togglelock(user)
|
||||
|
||||
/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))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
icon_state = "meterX"
|
||||
return 0
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
icon_state = "meter0"
|
||||
return 0
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/meter/interact(mob/user)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
else
|
||||
to_chat(user, status())
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
create_gas()
|
||||
pump = new(src, FALSE)
|
||||
pump.on = TRUE
|
||||
pump.stat = 0
|
||||
pump.machine_stat = 0
|
||||
pump.build_network()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/Destroy()
|
||||
@@ -225,9 +225,9 @@
|
||||
air_contents.gases[/datum/gas/nitrogen][MOLES] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.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()
|
||||
. = ..()
|
||||
if(holding)
|
||||
@@ -251,7 +251,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)
|
||||
@@ -264,7 +264,7 @@
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return FALSE
|
||||
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
|
||||
@@ -309,7 +309,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
|
||||
|
||||
@@ -119,7 +119,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
|
||||
@@ -128,7 +128,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)
|
||||
investigate_log("was disconnected from [connected_port] by [key_name(user)].<br>", INVESTIGATE_ATMOS)
|
||||
disconnect()
|
||||
@@ -158,7 +158,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user)
|
||||
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)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
. = ..()
|
||||
pump = new(src, FALSE)
|
||||
pump.on = TRUE
|
||||
pump.stat = 0
|
||||
pump.machine_stat = 0
|
||||
pump.build_network()
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/Destroy()
|
||||
|
||||
@@ -107,7 +107,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation)
|
||||
icon_state = "offcenter"
|
||||
|
||||
/obj/machinery/gateway/centerstation/process()
|
||||
if((stat & (NOPOWER)) && use_power)
|
||||
if((machine_stat & (NOPOWER)) && use_power)
|
||||
if(active)
|
||||
toggleoff()
|
||||
return
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
queue += purchase
|
||||
|
||||
/obj/machinery/ltsrbt/process()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(recharge_cooldown)
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
//interrupt_research
|
||||
/obj/machinery/shuttle_scrambler/proc/interrupt_research()
|
||||
for(var/obj/machinery/rnd/server/S in GLOB.machines)
|
||||
if(S.stat & (NOPOWER|BROKEN))
|
||||
if(S.machine_stat & (NOPOWER|BROKEN))
|
||||
continue
|
||||
S.emp_act(1)
|
||||
new /obj/effect/temp_visual/emp(get_turf(S))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
. = ..()
|
||||
if (dirty)
|
||||
. +="grbloody"
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if (!occupant)
|
||||
. += "grjam"
|
||||
@@ -64,7 +64,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(operating)
|
||||
to_chat(user, "<span class='danger'>It's locked and running.</span>")
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
else
|
||||
. += "<span class='notice'>\The [src] is empty.</span>"
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
if(!(machine_stat & (NOPOWER|BROKEN)))
|
||||
. += "<span class='notice'>The status display reads:</span>\n"+\
|
||||
"<span class='notice'>- Capacity: <b>[max_n_of_items]</b> items.</span>\n"+\
|
||||
"<span class='notice'>- Cook time reduced by <b>[(efficiency - 1) * 25]%</b>.</span>"
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(isAI(user) && (stat & NOPOWER))
|
||||
if(isAI(user) && (machine_stat & NOPOWER))
|
||||
return
|
||||
|
||||
if(!length(ingredients))
|
||||
@@ -211,7 +211,7 @@
|
||||
// post choice verification
|
||||
if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(isAI(user) && (stat & NOPOWER))
|
||||
if(isAI(user) && (machine_stat & NOPOWER))
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
@@ -230,7 +230,7 @@
|
||||
ingredients.Cut()
|
||||
|
||||
/obj/machinery/microwave/proc/cook()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(operating || broken > 0 || panel_open || !anchored || dirty == 100)
|
||||
return
|
||||
@@ -286,7 +286,7 @@
|
||||
loop(MICROWAVE_MUCK, 4)
|
||||
|
||||
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
if(type == MICROWAVE_PRE)
|
||||
pre_fail()
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers)
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
if(stat) //NOPOWER etc
|
||||
if(machine_stat) //NOPOWER etc
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
. += "<span class='notice'>The status display reads: This unit can hold a maximum of <b>[max_n_of_items]</b> items.</span>"
|
||||
|
||||
/obj/machinery/smartfridge/update_icon_state()
|
||||
if(!stat)
|
||||
if(!machine_stat)
|
||||
if (visible_contents)
|
||||
switch(contents.len)
|
||||
if(0)
|
||||
@@ -83,7 +83,7 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(!stat)
|
||||
if(!machine_stat)
|
||||
|
||||
if(contents.len >= max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
/obj/machinery/computer/holodeck/power_change()
|
||||
. = ..()
|
||||
toggle_power(!stat)
|
||||
toggle_power(!machine_stat)
|
||||
|
||||
/obj/machinery/computer/holodeck/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
@@ -286,7 +286,7 @@
|
||||
|
||||
/obj/machinery/computer/holodeck/proc/derez(obj/O, silent = TRUE, forced = FALSE)
|
||||
// Emagging a machine creates an anomaly in the derez systems.
|
||||
if(O && (obj_flags & EMAGGED) && !stat && !forced)
|
||||
if(O && (obj_flags & EMAGGED) && !machine_stat && !forced)
|
||||
if((ismob(O) || ismob(O.loc)) && prob(50))
|
||||
addtimer(CALLBACK(src, .proc/derez, O, silent), 50) // may last a disturbingly long time
|
||||
return
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
if(user.stat || machine_stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>This device is not powered!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
to_chat(user, "<span class='warning'>You cannot put this in [src.name]!</span>")
|
||||
|
||||
/obj/machinery/biogenerator/ui_interact(mob/user)
|
||||
if(stat & BROKEN || panel_open)
|
||||
if(machine_stat & BROKEN || panel_open)
|
||||
return
|
||||
. = ..()
|
||||
var/dat
|
||||
@@ -211,7 +211,7 @@
|
||||
/obj/machinery/biogenerator/proc/activate()
|
||||
if (usr.stat != CONSCIOUS)
|
||||
return
|
||||
if (src.stat != NONE) //NOPOWER etc
|
||||
if (src.machine_stat != NONE) //NOPOWER etc
|
||||
return
|
||||
if(processing)
|
||||
to_chat(usr, "<span class='warning'>The biogenerator is in the process of working.</span>")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
min_wrate = 0
|
||||
|
||||
/obj/machinery/plantgenes/update_icon_state()
|
||||
if((stat & (BROKEN|NOPOWER)))
|
||||
if((machine_stat & (BROKEN|NOPOWER)))
|
||||
icon_state = "dnamod-off"
|
||||
else
|
||||
icon_state = "dnamod"
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
/obj/machinery/seed_extractor/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if (stat)
|
||||
if (machine_stat)
|
||||
return FALSE
|
||||
|
||||
var/dat = "<b>Stored seeds:</b><br>"
|
||||
|
||||
@@ -573,7 +573,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
return ..()
|
||||
|
||||
/obj/machinery/bookbinder/proc/bind_book(mob/user, obj/item/paper/P)
|
||||
if(stat)
|
||||
if(machine_stat)
|
||||
return
|
||||
if(busy)
|
||||
to_chat(user, "<span class='warning'>The book binder is busy. Please wait for completion of previous operation.</span>")
|
||||
@@ -586,7 +586,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
sleep(rand(200,400))
|
||||
busy = FALSE
|
||||
if(P)
|
||||
if(!stat)
|
||||
if(!machine_stat)
|
||||
visible_message("<span class='notice'>[src] whirs as it prints and binds a new book.</span>")
|
||||
var/obj/item/book/B = new(src.loc)
|
||||
B.dat = P.info
|
||||
|
||||
@@ -53,7 +53,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
var/obj/machinery/porta_turret/aux_base/T = PDT
|
||||
var/integrity = max((T.obj_integrity-T.integrity_failure * T.max_integrity)/(T.max_integrity-T.integrity_failure * max_integrity)*100, 0)
|
||||
var/status
|
||||
if(T.stat & BROKEN)
|
||||
if(T.machine_stat & BROKEN)
|
||||
status = "<span class='bad'>ERROR</span>"
|
||||
else if(!T.on)
|
||||
status = "Disabled"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
icon_state = icon_state_powered
|
||||
|
||||
if(!cpu || !cpu.enabled)
|
||||
if (!(stat & NOPOWER) && (cpu && cpu.use_power()))
|
||||
if (!(machine_stat & NOPOWER) && (cpu && cpu.use_power()))
|
||||
add_overlay(screen_icon_screensaver)
|
||||
else
|
||||
icon_state = icon_state_unpowered
|
||||
@@ -121,13 +121,13 @@
|
||||
visible_message("<span class='danger'>\The [src]'s screen flickers [battery_module ? "\"BATTERY [malfunction ? "MALFUNCTION" : "CRITICAL"]\"" : "\"EXTERNAL POWER LOSS\""] warning as it shuts down unexpectedly.</span>")
|
||||
if(cpu)
|
||||
cpu.shutdown_computer(0)
|
||||
stat |= NOPOWER
|
||||
machine_stat |= NOPOWER
|
||||
update_icon()
|
||||
|
||||
// Modular computers can have battery in them, we handle power in previous proc, so prevent this from messing it up for us.
|
||||
/obj/machinery/modular_computer/power_change()
|
||||
if(cpu && cpu.use_power()) // If MC_CPU still has a power source, PC wouldn't go offline.
|
||||
stat &= ~NOPOWER
|
||||
machine_stat &= ~NOPOWER
|
||||
update_icon()
|
||||
return
|
||||
. = ..()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user