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
+7
View File
@@ -253,6 +253,13 @@ DEFINE_BITFIELD(item_flags, list(
"SLOWS_WHILE_IN_HAND" = SLOWS_WHILE_IN_HAND,
))
DEFINE_BITFIELD(machine_stat, list(
"BROKEN" = BROKEN,
"EMPED" = EMPED,
"MAINT" = MAINT,
"NOPOWER" = NOPOWER,
))
DEFINE_BITFIELD(material_flags, list(
"MATERIAL_ADD_PREFIX" = MATERIAL_ADD_PREFIX,
"MATERIAL_AFFECT_STATISTICS" = MATERIAL_AFFECT_STATISTICS,
+1 -1
View File
@@ -64,7 +64,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
+9 -9
View File
@@ -176,13 +176,13 @@ SUBSYSTEM_DEF(shuttle)
/datum/controller/subsystem/shuttle/proc/getShuttle(id)
for(var/obj/docking_port/mobile/M in mobile)
if(M.id == id)
if(M.shuttle_id == id)
return M
WARNING("couldn't find shuttle with id: [id]")
/datum/controller/subsystem/shuttle/proc/getDock(id)
for(var/obj/docking_port/stationary/S in stationary)
if(S.id == id)
if(S.shuttle_id == id)
return S
WARNING("couldn't find dock with id: [id]")
@@ -330,7 +330,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)
@@ -403,7 +403,7 @@ SUBSYSTEM_DEF(shuttle)
return TRUE
var/obj/docking_port/stationary/dockedAt = M.get_docked()
var/destination = dockHome
if(dockedAt && dockedAt.id == dockHome)
if(dockedAt && dockedAt.shuttle_id == dockHome)
destination = dockAway
if(timed)
if(M.request(getDock(destination)))
@@ -519,7 +519,7 @@ SUBSYSTEM_DEF(shuttle)
A.contents = proposal.reserved_turfs
var/obj/docking_port/stationary/transit/new_transit_dock = new(midpoint)
new_transit_dock.reserved_area = proposal
new_transit_dock.name = "Transit for [M.id]/[M.name]"
new_transit_dock.name = "Transit for [M.shuttle_id]/[M.name]"
new_transit_dock.owner = M
new_transit_dock.assigned_area = A
@@ -836,7 +836,7 @@ SUBSYSTEM_DEF(shuttle)
var/timeleft = M.timeLeft(1)
var/list/L = list()
L["name"] = M.name
L["id"] = M.id
L["shuttle_id"] = M.shuttle_id
L["timer"] = M.timer
L["timeleft"] = M.getTimerStr()
if (timeleft > 1 HOURS)
@@ -878,7 +878,7 @@ SUBSYSTEM_DEF(shuttle)
if(params["type"] == "mobile")
for(var/i in mobile)
var/obj/docking_port/mobile/M = i
if(M.id == params["id"])
if(M.shuttle_id == params["shuttle_id"])
user.forceMove(get_turf(M))
. = TRUE
break
@@ -886,7 +886,7 @@ SUBSYSTEM_DEF(shuttle)
if("fly")
for(var/i in mobile)
var/obj/docking_port/mobile/M = i
if(M.id == params["id"])
if(M.shuttle_id == params["shuttle_id"])
. = TRUE
M.admin_fly_shuttle(user)
break
@@ -894,7 +894,7 @@ SUBSYSTEM_DEF(shuttle)
if("fast_travel")
for(var/i in mobile)
var/obj/docking_port/mobile/M = i
if(M.id == params["id"] && M.timer && M.timeLeft(1) >= 50)
if(M.shuttle_id == params["shuttle_id"] && M.timer && M.timeLeft(1) >= 50)
M.setTimer(50)
. = TRUE
message_admins("[key_name_admin(usr)] fast travelled [M]")
+1 -1
View File
@@ -129,7 +129,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)
+7 -7
View File
@@ -11,7 +11,7 @@
/obj/machinery/pdapainter/update_icon_state()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
return
@@ -25,7 +25,7 @@
/obj/machinery/pdapainter/update_overlays()
. = ..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
if(storedpda)
@@ -83,17 +83,17 @@
update_icon()
else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
if(stat & BROKEN)
if(machine_stat & BROKEN)
if(!O.tool_start_check(user, amount=0))
return
user.visible_message("[user] is repairing [src].", \
"<span class='notice'>You begin repairing [src]...</span>", \
"<span class='italics'>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()
else
@@ -103,8 +103,8 @@
/obj/machinery/pdapainter/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
stat |= BROKEN
if(!(machine_stat & BROKEN))
machine_stat |= BROKEN
update_icon()
/obj/machinery/pdapainter/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+11 -11
View File
@@ -108,7 +108,7 @@ Class Procs:
vocal_pitch = 0.6
vocal_volume = 40
var/stat = 0
var/machine_stat = 0
var/use_power = IDLE_POWER_USE
//0 = dont run the auto
//1 = run auto, use idle
@@ -191,18 +191,18 @@ Class Procs:
///Called when we want to change the value of the stat variable. Holds bitflags.
/obj/machinery/proc/set_machine_stat(new_value)
if(new_value == stat)
if(new_value == machine_stat)
return
. = stat
stat = new_value
on_machine_stat_update(stat)
. = machine_stat
machine_stat = new_value
on_machine_stat_update(machine_stat)
/obj/machinery/proc/on_machine_stat_update(stat)
return
/obj/machinery/emp_act(severity)
. = ..()
if(use_power && !stat && !(. & EMP_PROTECT_SELF))
if(use_power && !machine_stat && !(. & EMP_PROTECT_SELF))
use_power(1000 + severity*65)
new /obj/effect/temp_visual/emp(loc)
@@ -264,10 +264,10 @@ Class Procs:
return TRUE
/obj/machinery/proc/is_operational()
return !(stat & (NOPOWER|BROKEN|MAINT))
return !(machine_stat & (NOPOWER|BROKEN|MAINT))
/obj/machinery/can_interact(mob/user)
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE)) // Check if the machine is broken, and if we can still interact with it if so
if((machine_stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE)) // Check if the machine is broken, and if we can still interact with it if so
return FALSE
if(IsAdminGhost(user))
@@ -471,8 +471,8 @@ Class Procs:
/obj/machinery/obj_break(damage_flag)
. = ..()
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_appearance()
return TRUE
@@ -601,7 +601,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)
+4 -4
View File
@@ -28,14 +28,14 @@
. += "<span class='notice'>It has <b>[uses]</b> uses of foam remaining.</span>"
/obj/machinery/ai_slipper/power_change()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
else
if(powered())
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
else
stat |= NOPOWER
if((stat & (NOPOWER|BROKEN)) || cooldown_time > world.time || !uses)
machine_stat |= NOPOWER
if((machine_stat & (NOPOWER|BROKEN)) || cooldown_time > world.time || !uses)
icon_state = "ai-slipper0"
else
icon_state = "ai-slipper1"
+6 -6
View File
@@ -47,7 +47,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
if(newheadToggle)
. += pinklight
if(stat & BROKEN)
if(machine_stat & BROKEN)
. += errorlight
/obj/machinery/announcement_system/Destroy()
@@ -63,9 +63,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 ..()
@@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
return
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(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
@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
/obj/machinery/announcement_system/attack_ai(mob/user)
if(!user.canUseTopic(src, !hasSiliconAccessInArea(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)
@@ -163,7 +163,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
/obj/machinery/announcement_system/emp_act(severity)
. = ..()
if(!(stat & (NOPOWER|BROKEN)) && !(. & EMP_PROTECT_SELF) && severity >= 30)
if(!(machine_stat & (NOPOWER|BROKEN)) && !(. & EMP_PROTECT_SELF) && severity >= 30)
act_up()
/obj/machinery/announcement_system/emag_act()
+5 -5
View File
@@ -32,7 +32,7 @@
return ..()
/obj/machinery/aug_manipulator/update_icon_state()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[initial_icon_state]-broken"
return
@@ -95,10 +95,10 @@
"<span class='italics'>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
@@ -108,8 +108,8 @@
/obj/machinery/aug_manipulator/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
stat |= BROKEN
if(!(machine_stat & BROKEN))
machine_stat |= BROKEN
update_icon()
/obj/machinery/aug_manipulator/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+3 -3
View File
@@ -67,7 +67,7 @@
ui = new(user, src, "Autolathe", capitalize(src.name))
ui.open()
if(shocked && !(stat & NOPOWER))
if(shocked && !(machine_stat & NOPOWER))
if(shock(user,50))
ui.close() //close the window if they got zapped successfully as to prevent them from getting zapped infinitely.
@@ -242,7 +242,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))
@@ -404,7 +404,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
+2 -2
View File
@@ -43,7 +43,7 @@
return ..()
/obj/machinery/autoloom/update_icon_state()
var/is_powered = !(stat & (BROKEN|NOPOWER))
var/is_powered = !(machine_stat & (BROKEN|NOPOWER))
icon_state = icon_name + "[is_powered]" // add the blood tag at the end
/obj/machinery/autoloom/CanPass(atom/movable/AM)
@@ -60,7 +60,7 @@
. = ..()
/obj/machinery/autoloom/proc/eat(atom/movable/AM0, sound=TRUE)
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
return
if(!isturf(AM0.loc))
return //I don't know how you called Crossed() but stop it.
+1 -1
View File
@@ -45,7 +45,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)
+2 -2
View File
@@ -50,7 +50,7 @@
. = ..()
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
@@ -166,7 +166,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)
+5 -5
View File
@@ -107,7 +107,7 @@
var/list/previous_network = network
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()
@@ -117,7 +117,7 @@
triggerCameraAlarm() //camera alarm triggers even if multiple EMPs are in effect.
if(emped == thisemp) //Only fix it if the camera hasn't been EMP'd again
network = previous_network
stat &= ~EMPED
machine_stat &= ~EMPED
update_icon()
if(can_use())
GLOB.cameranet.addCamera(src)
@@ -278,7 +278,7 @@
return ..()
/obj/machinery/camera/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == MELEE && damage_amount < 12 && !(stat & BROKEN))
if(damage_flag == MELEE && damage_amount < 12 && !(machine_stat & BROKEN))
return FALSE
. = ..()
@@ -305,7 +305,7 @@
/obj/machinery/camera/update_icon_state()
if(!status)
icon_state = "[initial(icon_state)]1"
else if (stat & EMPED)
else if (machine_stat & EMPED)
icon_state = "[initial(icon_state)]emp"
else
icon_state = "[initial(icon_state)][in_use_lights ? "_in_use" : ""]"
@@ -361,7 +361,7 @@
/obj/machinery/camera/proc/can_use()
if(!status)
return FALSE
if(stat & EMPED)
if(machine_stat & EMPED)
return FALSE
return TRUE
+1 -1
View File
@@ -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
+4 -4
View File
@@ -20,7 +20,7 @@
. += mutable_appearance(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]"
@@ -35,7 +35,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)
@@ -116,7 +116,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)
@@ -127,7 +127,7 @@
recharge_coeff = C.rating
/obj/machinery/cell_charger/process()
if(!charging || !anchored || (stat & (BROKEN|NOPOWER)))
if(!charging || !anchored || (machine_stat & (BROKEN|NOPOWER)))
return
if(charging)
+10 -10
View File
@@ -20,7 +20,7 @@
power_change()
/obj/machinery/computer/process()
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return FALSE
return TRUE
@@ -44,16 +44,16 @@
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(icon_keyboard)
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
. += "[icon_keyboard]_off"
else
. += icon_keyboard
if(stat & BROKEN)
if(machine_stat & BROKEN)
. += mutable_appearance(icon, "[icon_state]_broken")
return // If we don't do this broken computers glow in the dark.
if(stat & NOPOWER) // Your screen can't be on if you've got no damn charge
if(machine_stat & NOPOWER) // Your screen can't be on if you've got no damn charge
return
// This lets screens ignore lighting and be visible even in the darkest room
@@ -63,7 +63,7 @@
/obj/machinery/computer/power_change()
..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
set_light(0)
else
set_light(brightness_on)
@@ -83,7 +83,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)
@@ -94,8 +94,8 @@
if(!circuit) //no circuit, no breaking
return
. = ..()
if(. && !(stat & BROKEN))
stat |= BROKEN
if(. && !(machine_stat & BROKEN))
machine_stat |= BROKEN
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
set_light(0)
update_icon()
@@ -124,7 +124,7 @@
circuit = null
component_parts -= circuit
A.set_anchored(TRUE)
if(stat & BROKEN)
if(machine_stat & BROKEN)
if(user)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
else
@@ -144,5 +144,5 @@
/obj/machinery/computer/AltClick(mob/user)
. = ..()
if(!user.canUseTopic(src, !issilicon(user)) || !(stat & (NOPOWER|BROKEN)))
if(!user.canUseTopic(src, !issilicon(user)) || !(machine_stat & (NOPOWER|BROKEN)))
return
+3 -3
View File
@@ -12,7 +12,7 @@
/obj/machinery/computer/aifixer/attackby(obj/item/I, mob/user, params)
if(occupier && I.tool_behaviour == TOOL_SCREWDRIVER)
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>")
@@ -83,7 +83,7 @@
/obj/machinery/computer/aifixer/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(active)
. += "ai-fixer-on"
@@ -101,7 +101,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, "[src] is offline and cannot take an AI at this time!")
return
AI.forceMove(src)
+3 -3
View File
@@ -18,7 +18,7 @@
logs = list()
/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 @@
..()
/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/user, datum/tgui/ui)
operator = user
@@ -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
+1 -1
View File
@@ -123,7 +123,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
+1 -1
View File
@@ -81,7 +81,7 @@
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
. |= "[icon_keyboard]_off"
return
. |= icon_keyboard
+1 -1
View File
@@ -261,7 +261,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
@@ -83,7 +83,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) && hasSiliconAccessInArea(user)) || user.eye_blind || user.incapacitated() )
if( (machine_stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && hasSiliconAccessInArea(user)) || user.eye_blind || user.incapacitated() )
user.unset_machine()
/obj/machinery/computer/camera_advanced/Destroy()
@@ -91,6 +91,7 @@
current_user.unset_machine()
QDEL_NULL(eyeobj)
QDEL_LIST(actions)
current_user = null
return ..()
/obj/machinery/computer/camera_advanced/on_unset_machine(mob/M)
@@ -67,7 +67,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
@@ -81,7 +81,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
+1 -1
View File
@@ -7,7 +7,7 @@
/obj/machinery/computer/upload/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/ai_module))
var/obj/item/ai_module/M = O
if(src.stat & (NOPOWER|BROKEN|MAINT))
if(src.machine_stat & (NOPOWER|BROKEN|MAINT))
return
if(!current)
to_chat(user, "<span class='caution'>You haven't selected anything to transmit laws to!</span>")
+1 -1
View File
@@ -539,7 +539,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(severity/10))
switch(rand(1,6))
+1 -1
View File
@@ -35,7 +35,7 @@
*/
/obj/machinery/computer/pod/proc/alarm()
set waitfor = FALSE
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(!connected)
+1 -1
View File
@@ -767,7 +767,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)
@@ -29,7 +29,7 @@
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
. |= "[icon_keyboard]_off"
return
. |= icon_keyboard
+3 -3
View File
@@ -177,12 +177,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/untarget_implant() //untargets from mob the racker was once implanted in to prevent issues.
+2 -2
View File
@@ -47,14 +47,14 @@ GLOBAL_LIST_EMPTY(cryopod_computers)
return ..()
/obj/machinery/computer/cryopod/update_icon_state()
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
icon_state = "cellconsole"
return ..()
icon_state = "cellconsole_1"
return ..()
/obj/machinery/computer/cryopod/ui_interact(mob/user, datum/tgui/ui)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
add_fingerprint(user)
+1 -1
View File
@@ -91,7 +91,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)
+2 -2
View File
@@ -37,11 +37,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
+7 -7
View File
@@ -361,7 +361,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)
@@ -648,7 +648,7 @@
if("closing")
update_icon(AIRLOCK_CLOSING)
if("deny")
if(!stat)
if(!machine_stat)
update_icon(AIRLOCK_DENY)
playsound(src,doorDeni,50,0,3)
sleep(6)
@@ -691,7 +691,7 @@
else
. += "It looks very robust."
if(hasSiliconAccessInArea(user) && !(stat & BROKEN))
if(hasSiliconAccessInArea(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>"
@@ -1056,7 +1056,7 @@
"<span class='italics'>You hear welding.</span>")
if(W.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, PROC_REF(weld_checks), W, user)))
obj_integrity = max_integrity
stat &= ~BROKEN
machine_stat &= ~BROKEN
user.visible_message("[user.name] has repaired [src].", \
"<span class='notice'>You finish repairing the airlock.</span>")
update_icon()
@@ -1343,7 +1343,7 @@
/obj/machinery/door/airlock/hostile_lockdown(mob/origin, aicontrolneeded = TRUE)
// Must be powered and have working AI wire.
if((aicontrolneeded && canAIControl(src) && !stat) || !aicontrolneeded)
if((aicontrolneeded && canAIControl(src) && !machine_stat) || !aicontrolneeded)
locked = FALSE //For airlocks that were bolted open.
safe = FALSE //DOOR CRUSH
close()
@@ -1355,7 +1355,7 @@
/obj/machinery/door/airlock/disable_lockdown(aicontrolneeded = TRUE)
// Must be powered and have working AI wire.
if((aicontrolneeded && canAIControl(src) && !stat) || !aicontrolneeded)
if((aicontrolneeded && canAIControl(src) && !machine_stat) || !aicontrolneeded)
unbolt()
set_electrified(NOT_ELECTRIFIED)
open()
@@ -1364,7 +1364,7 @@
/obj/machinery/door/airlock/obj_break(damage_flag)
if(!(flags_1 & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
stat |= BROKEN
machine_stat |= BROKEN
if(!panel_open)
panel_open = TRUE
wires.cut_all()
+1 -1
View File
@@ -494,7 +494,7 @@
/obj/machinery/door/airlock/cult/obj_break(damage_flag)
if(!(flags_1 & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
stat |= BROKEN
machine_stat |= BROKEN
if(!panel_open)
panel_open = TRUE
update_icon()
+1 -1
View File
@@ -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"]
+6 -6
View File
@@ -56,7 +56,7 @@
targets += C
if(!targets.len)
stat |= BROKEN
machine_stat |= BROKEN
update_icon()
@@ -64,7 +64,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)
@@ -80,7 +80,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 FALSE
activation_time = REALTIMEOFDAY
@@ -102,7 +102,7 @@
/obj/machinery/door_timer/proc/timer_end(forced = FALSE)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return FALSE
if(!forced)
@@ -152,11 +152,11 @@
// 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
+4 -4
View File
@@ -278,7 +278,7 @@
else
flick("doorc1", src)
if("deny")
if(!stat)
if(!machine_stat)
flick("door_deny", src)
@@ -383,7 +383,7 @@
return TRUE
/obj/machinery/door/proc/hasPower()
return !(stat & NOPOWER)
return !(machine_stat & NOPOWER)
/obj/machinery/door/proc/update_freelook_sight()
if(!glass && GLOB.cameranet)
@@ -407,11 +407,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, origin)
+4 -4
View File
@@ -127,10 +127,10 @@
/obj/machinery/door/firedoor/power_change()
if(powered(power_channel))
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
INVOKE_ASYNC(src, PROC_REF(latetoggle))
else
stat |= NOPOWER
machine_stat |= NOPOWER
/obj/machinery/door/firedoor/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(operating || !density)
@@ -211,7 +211,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()
@@ -323,7 +323,7 @@
/obj/machinery/door/firedoor/proc/latetoggle()
if(operating || stat & NOPOWER || !nextstate)
if(operating || machine_stat & NOPOWER || !nextstate)
return
switch(nextstate)
if(FIREDOOR_OPEN)
+1 -1
View File
@@ -93,5 +93,5 @@
return
/obj/machinery/door/poddoor/try_to_crowbar(obj/item/I, mob/user)
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
open(1)
+6 -6
View File
@@ -28,7 +28,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
/obj/machinery/doppler_array/ui_interact(mob/user)
. = ..()
if(stat)
if(machine_stat)
return FALSE
var/list/dat = list()
@@ -73,7 +73,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
/obj/machinery/doppler_array/proc/sense_explosion(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)
@@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
return TRUE
/obj/machinery/doppler_array/proc/sense_wave_explosion(turf/epicenter, power, speed)
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return FALSE
var/turf/zone = get_turf(src)
if(zone.z != epicenter.z)
@@ -160,15 +160,15 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
return PROCESS_KILL
/obj/machinery/doppler_array/power_change()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
else
if(powered() && anchored)
icon_state = initial(icon_state)
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
else
icon_state = "[initial(icon_state)]-off"
stat |= NOPOWER
machine_stat |= NOPOWER
//Portable version, built into EOD equipment. It simply provides an explosion's three damage levels.
/obj/machinery/doppler_array/integrated
+9 -9
View File
@@ -130,20 +130,20 @@
/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/power_change()
..()
if(powered())
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
else
stat |= NOPOWER
machine_stat |= NOPOWER
update_icon()
/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)
@@ -200,7 +200,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
@@ -217,7 +217,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
@@ -235,7 +235,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
@@ -243,12 +243,12 @@
/obj/machinery/droneDispenser/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
if(break_message)
audible_message("<span class='warning'>[src] [break_message]</span>")
if(break_sound)
playsound(src, break_sound, 50, 1)
stat |= BROKEN
machine_stat |= BROKEN
update_icon()
/obj/machinery/droneDispenser/deconstruct(disassembled = TRUE)
@@ -66,7 +66,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()
@@ -85,7 +85,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)
@@ -169,7 +169,7 @@
A.unbolt()
. = 1
if(A && A.close())
if(stat & NOPOWER || lostPower || !A || QDELETED(A))
if(machine_stat & NOPOWER || lostPower || !A || QDELETED(A))
goIdle(1)
return
A.bolt()
@@ -214,7 +214,7 @@
A.unbolt()
spawn()
if(A && A.open())
if(stat | (NOPOWER) && !lostPower && A && !QDELETED(A))
if(machine_stat | (NOPOWER) && !lostPower && A && !QDELETED(A))
A.bolt()
goIdle(1)
@@ -226,7 +226,7 @@
updateUsrDialog()
/obj/machinery/doorButtons/airlock_controller/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(busy == CYCLE_EXTERIOR)
cycleOpen(exteriorAirlock)
@@ -235,7 +235,7 @@
/obj/machinery/doorButtons/airlock_controller/power_change()
..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
lostPower = 1
else
if(!busy)
@@ -250,7 +250,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)
+11 -11
View File
@@ -75,13 +75,13 @@
icon_state = "fire_b[buildstage]"
return
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "firex"
return
icon_state = "fire0"
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
/obj/machinery/firealarm/update_overlays()
@@ -142,7 +142,7 @@
return TRUE
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && COOLDOWN_FINISHED(src, last_alarm) && !(obj_flags & EMAGGED) && detecting && !stat)
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && COOLDOWN_FINISHED(src, last_alarm) && !(obj_flags & EMAGGED) && detecting && !machine_stat)
alarm()
return ..()
@@ -243,9 +243,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)
@@ -298,7 +298,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()
@@ -308,15 +308,15 @@
..()
/obj/machinery/firealarm/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1) && buildstage != 0) //can't break the electronics if there isn't any inside.
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1) && buildstage != 0) //can't break the electronics if there isn't any inside.
LAZYREMOVE(myarea.firealarms, src)
stat |= BROKEN
machine_stat |= BROKEN
update_icon()
/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
@@ -344,7 +344,7 @@
var/static/party_overlay
/obj/machinery/firealarm/partyalarm/reset()
if (stat & (NOPOWER|BROKEN))
if (machine_stat & (NOPOWER|BROKEN))
return
var/area/A = get_base_area(src)
if (!A || !A.party)
@@ -353,7 +353,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_base_area(src)
if (!A || A.party || A.name == "Space")
+5 -5
View File
@@ -45,13 +45,13 @@
/obj/machinery/flasher/power_change()
if (powered() && anchored && bulb)
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
if(bulb.crit_fail)
icon_state = "[base_state]1-p"
else
icon_state = "[base_state]1"
else
stat |= NOPOWER
machine_stat |= NOPOWER
icon_state = "[base_state]1-p"
//Don't want to render prison breaks impossible
@@ -131,7 +131,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()
@@ -139,8 +139,8 @@
/obj/machinery/flasher/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
stat |= BROKEN
if(!(machine_stat & BROKEN))
machine_stat |= BROKEN
if(bulb)
bulb.burn_out()
power_change()
+3 -3
View File
@@ -71,13 +71,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
+1 -1
View File
@@ -195,7 +195,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>"
+5 -5
View File
@@ -34,7 +34,7 @@
icon_state = "igniter[on]"
/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(700,10,1)
@@ -45,7 +45,7 @@
icon_state = "igniter[on]"
/obj/machinery/igniter/power_change()
if(!( stat & NOPOWER) )
if(!( machine_stat & NOPOWER) )
icon_state = "igniter[src.on]"
else
icon_state = "igniter0"
@@ -82,11 +82,11 @@
/obj/machinery/sparker/power_change()
if ( powered() && disable == 0 )
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
icon_state = "[base_state]"
// src.sd_SetLuminosity(2)
else
stat |= ~NOPOWER
machine_stat |= ~NOPOWER
icon_state = "[base_state]-p"
// src.sd_SetLuminosity(0)
@@ -133,5 +133,5 @@
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(!(stat & (BROKEN|NOPOWER)))
if(!(machine_stat & (BROKEN|NOPOWER)))
ignite()
+1 -1
View File
@@ -78,7 +78,7 @@
ghost.forceMove(target)
/obj/machinery/launchpad/proc/isAvailable(silent = FALSE)
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return FALSE
if(panel_open)
return FALSE
+6 -6
View File
@@ -40,10 +40,10 @@
/obj/machinery/light_switch/update_appearance(updates=ALL)
. = ..()
luminosity = (stat & NOPOWER) ? 0 : 1
luminosity = (machine_stat & NOPOWER) ? 0 : 1
/obj/machinery/light_switch/update_icon_state()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
icon_state = "[base_icon_state]-p"
return ..()
icon_state = "[base_icon_state][area.lightswitch ? 1 : 0]"
@@ -51,7 +51,7 @@
/obj/machinery/light_switch/update_overlays()
. = ..()
if(!(stat & NOPOWER))
if(!(machine_stat & NOPOWER))
. += emissive_appearance(icon, "[base_icon_state]-glow", alpha = src.alpha)
/obj/machinery/light_switch/examine(mob/user)
@@ -72,9 +72,9 @@
if(!otherarea)
if(powered(LIGHT))
stat &= ~NOPOWER
machine_stat &= ~NOPOWER
else
stat |= NOPOWER
machine_stat |= NOPOWER
update_appearance()
@@ -82,5 +82,5 @@
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(!(stat & (BROKEN|NOPOWER)))
if(!(machine_stat & (BROKEN|NOPOWER)))
power_change()
+2 -2
View File
@@ -134,7 +134,7 @@
/obj/machinery/magnetic_module/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
on = FALSE
// Sanity checks:
@@ -327,7 +327,7 @@
while(moving && length(rpath) >= 1)
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
break
looping = 1
+3 -3
View File
@@ -28,10 +28,10 @@
// return ..()
/obj/machinery/mass_driver/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
id = "[port.id]_[id]"
id = "[port.shuttle_id]_[id]"
/obj/machinery/mass_driver/proc/drive(amount)
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
return
use_power(500)
var/O_limit
@@ -52,7 +52,7 @@
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
return
drive()
@@ -142,11 +142,11 @@ DEFINE_BITFIELD(turret_flags, list(
/obj/machinery/porta_turret/proc/check_should_process()
if (datum_flags & DF_ISPROCESSING)
if (!on || !anchored || (stat & BROKEN) || !powered())
if (!on || !anchored || (machine_stat & BROKEN) || !powered())
//end_processing()
STOP_PROCESSING(SSmachines, src)
else
if (on && anchored && !(stat & BROKEN) && powered())
if (on && anchored && !(machine_stat & BROKEN) && powered())
START_PROCESSING(SSmachines, src)
//begin_processing()
@@ -154,7 +154,7 @@ DEFINE_BITFIELD(turret_flags, list(
if(!anchored)
icon_state = "turretCover"
return
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[base_icon_state]_broken"
else
if(powered())
@@ -287,13 +287,13 @@ DEFINE_BITFIELD(turret_flags, list(
/obj/machinery/porta_turret/power_change()
. = ..()
if(!anchored || (stat & BROKEN) || !powered())
if(!anchored || (machine_stat & BROKEN) || !powered())
update_icon()
remove_control()
check_should_process()
/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 something
//that acts like a crowbar to try and salvage its components
@@ -427,14 +427,14 @@ DEFINE_BITFIELD(turret_flags, list(
/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 PROCESS_KILL
var/list/targets = list()
@@ -521,7 +521,7 @@ DEFINE_BITFIELD(turret_flags, list(
return
if(raising || raised)
return
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
invisibility = 0
raising = 1
@@ -538,7 +538,7 @@ DEFINE_BITFIELD(turret_flags, list(
set waitfor = FALSE
if(raising || !raised)
return
if(stat & BROKEN)
if(machine_stat & BROKEN)
return
layer = OBJ_LAYER
raising = 1
@@ -934,7 +934,7 @@ DEFINE_BITFIELD(turret_flags, list(
/obj/machinery/turretid/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if(issilicon(user) && !(stat & BROKEN))
if(issilicon(user) && !(machine_stat & BROKEN))
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, enabled ? "Disable" : "Enable")
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, lethal ? "Set to stun" : "Set to kill")
return CONTEXTUAL_SCREENTIP_SET
@@ -962,12 +962,12 @@ DEFINE_BITFIELD(turret_flags, list(
/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)
@@ -1029,7 +1029,7 @@ DEFINE_BITFIELD(turret_flags, list(
if("lock")
if(!hasSiliconAccessInArea(usr) || IsAdminGhost(usr))
return
if((obj_flags & EMAGGED) || (stat & BROKEN))
if((obj_flags & EMAGGED) || (machine_stat & BROKEN))
to_chat(usr, "<span class='warning'>The turret control is unresponsive!</span>")
return
locked = !locked
@@ -1068,7 +1068,7 @@ DEFINE_BITFIELD(turret_flags, list(
update_icon()
/obj/machinery/turretid/update_icon_state()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
icon_state = "control_off"
else if (enabled)
if (lethal)
@@ -12,7 +12,7 @@
anchored = FALSE
density = FALSE
CanAtmosPass = ATMOS_PASS_YES
stat = 1
machine_stat = 1
var/buildstacktype = /obj/item/stack/sheet/plasteel
var/buildstackamount = 5
/*
@@ -22,14 +22,14 @@
*/
/obj/machinery/fan_assembly/attackby(obj/item/W, mob/living/user, params)
switch(stat)
switch(machine_stat)
if(1)
// Stat 1
if(W.tool_behaviour == TOOL_WELDER)
if(weld(W, user))
to_chat(user, "<span class='notice'>You weld the fan assembly securely into place.</span>")
setAnchored(TRUE)
stat = 2
machine_stat = 2
update_icon_state()
return
if(2)
@@ -41,7 +41,7 @@
to_chat(user, "<span class='notice'>You start to add wires to the assembly...</span>")
if(W.use_tool(src, user, 30, volume=50, amount=2))
to_chat(user, "<span class='notice'>You add wires to the fan assembly.</span>")
stat = 3
machine_stat = 3
var/obj/machinery/poweredfans/F = new(loc, src)
forceMove(F)
F.setDir(src.dir)
@@ -49,14 +49,14 @@
else if(W.tool_behaviour == TOOL_WELDER)
if(weld(W, user))
to_chat(user, "<span class='notice'>You unweld the fan assembly from its place.</span>")
stat = 1
machine_stat = 1
update_icon_state()
setAnchored(FALSE)
return
return ..()
/obj/machinery/fan_assembly/wrench_act(mob/user, obj/item/I)
if(stat != 1)
if(machine_stat != 1)
return FALSE
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
"<span class='notice'>You start to disassemble [src]...</span>", "You hear wrenching noises.")
@@ -69,7 +69,7 @@
return
if(!W.tool_start_check(user, amount=0))
return FALSE
switch(stat)
switch(machine_stat)
if(1)
to_chat(user, "<span class='notice'>You start to weld \the [src]...</span>")
if(2)
@@ -85,7 +85,7 @@
/obj/machinery/fan_assembly/examine(mob/user)
. = ..()
switch(stat)
switch(machine_stat)
if(1)
to_chat(user, "<span class='notice'>The fan assembly seems to be <b>unwelded</b> and loose.</span>")
if(2)
@@ -95,7 +95,7 @@
/obj/machinery/fan_assembly/update_icon_state()
. = ..()
switch(stat)
switch(machine_stat)
if(1)
icon_state = "mfan_assembly"
if(2)
@@ -19,7 +19,7 @@
if(!assembly)
assembly = new()
assembly.forceMove(drop_location())
assembly.stat = 2
assembly.machine_stat = 2
assembly.setAnchored(TRUE)
assembly.setDir(dir)
assembly = null
@@ -39,7 +39,7 @@
assembly = FA
else
assembly = new(src)
assembly.stat = 3
assembly.machine_stat = 3
air_update_turf(1)
/obj/machinery/poweredfans/power_change()
+3 -3
View File
@@ -106,7 +106,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)
@@ -135,11 +135,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
+5 -5
View File
@@ -39,7 +39,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)
@@ -126,7 +126,7 @@
charging.forceMove(drop_location())
/obj/machinery/recharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
if(machine_stat & (NOPOWER|BROKEN) || !anchored)
return PROCESS_KILL
using_power = FALSE
@@ -186,7 +186,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)
@@ -199,14 +199,14 @@
/obj/machinery/recharger/update_appearance(updates)
. = ..()
if((stat & (NOPOWER|BROKEN)) || panel_open || !anchored)
if((machine_stat & (NOPOWER|BROKEN)) || panel_open || !anchored)
luminosity = 0
return
luminosity = 1
/obj/machinery/recharger/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN) || !anchored)
if(machine_stat & (NOPOWER|BROKEN) || !anchored)
return
if(panel_open)
. += mutable_appearance(icon, "[base_icon_state]-open", alpha = src.alpha)
+1 -1
View File
@@ -72,7 +72,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))
+3 -3
View File
@@ -46,7 +46,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"]."}
@@ -82,7 +82,7 @@
return TRUE
/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
@@ -101,7 +101,7 @@
. = ..()
/obj/machinery/recycler/proc/eat(atom/movable/AM0, sound=TRUE)
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
return
if(safety_mode)
return
+2 -2
View File
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
update_icon()
/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
@@ -72,7 +72,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
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
+1 -1
View File
@@ -17,7 +17,7 @@
/obj/machinery/sheetifier/update_overlays()
. = ..()
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
return
var/mutable_appearance/on_overlay = mutable_appearance(icon, "buttons_on")
. += on_overlay
+8 -8
View File
@@ -97,7 +97,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()
@@ -107,15 +107,15 @@
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))
/obj/machinery/shieldgen/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat && BROKEN))
stat |= BROKEN
if(!(machine_stat && BROKEN))
machine_stat |= BROKEN
locked = pick(0,1)
update_icon()
@@ -153,7 +153,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>")
@@ -161,7 +161,7 @@
to_chat(user, "<span class='notice'>You begin to replace the wires...</span>")
if(W.use_tool(src, user, 30, 1))
obj_integrity = max_integrity
stat &= ~BROKEN
machine_stat &= ~BROKEN
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
update_icon()
@@ -206,9 +206,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
+5 -5
View File
@@ -62,10 +62,10 @@
money += round(delta_time / 2) //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)
@@ -173,7 +173,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
@@ -223,10 +223,10 @@
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>")
return FALSE
if(stat & BROKEN)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>The slot machine is broken!</span>")
return FALSE
if(working)
+1 -1
View File
@@ -144,7 +144,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)
+2 -2
View File
@@ -59,10 +59,10 @@
return stasis_enabled && is_operational()
/obj/machinery/stasis/update_icon_state()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[base_icon_state]_broken"
return ..()
if(panel_open || stat & MAINT)
if(panel_open || machine_stat & MAINT)
icon_state = "[base_icon_state]_maintenance"
return ..()
icon_state = base_icon_state
+10 -10
View File
@@ -65,7 +65,7 @@
return TRUE
balloon_alert(user, "repaired")
obj_integrity = max_integrity
set_machine_stat(stat & ~BROKEN)
set_machine_stat(machine_stat & ~BROKEN)
update_appearance()
return TRUE
@@ -138,7 +138,7 @@
/obj/machinery/status_display/update_appearance(updates=ALL)
. = ..()
if( \
(stat & (NOPOWER|BROKEN)) || \
(machine_stat & (NOPOWER|BROKEN)) || \
(current_mode == SD_BLANK) || \
(current_mode != SD_PICTURE && message1 == "" && message2 == "") \
)
@@ -149,7 +149,7 @@
/obj/machinery/status_display/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
remove_messages()
return
@@ -181,7 +181,7 @@
// Timed process - performs nothing in the base class
/obj/machinery/status_display/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
// No power, no processing.
update_appearance()
@@ -198,7 +198,7 @@
/obj/machinery/status_display/emp_act(severity)
. = ..()
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
if(machine_stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
return
current_mode = SD_PICTURE
set_picture("ai_bsod")
@@ -323,7 +323,7 @@
return ..()
/obj/machinery/status_display/evac/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
// No power, no processing.
update_appearance()
return PROCESS_KILL
@@ -380,7 +380,7 @@
current_mode = SD_MESSAGE
/obj/machinery/status_display/supply/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
// No power, no processing.
update_appearance()
return PROCESS_KILL
@@ -428,7 +428,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.
update_appearance()
return PROCESS_KILL
@@ -452,7 +452,7 @@
/obj/machinery/status_display/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override)
if(port && (shuttle_id == initial(shuttle_id) || override))
shuttle_id = port.id
shuttle_id = port.shuttle_id
update()
@@ -547,7 +547,7 @@
master.relay_speech(message, speaker, message_language, raw_message, radio_freq, spans, message_mods)
/obj/machinery/status_display/ai/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
update_appearance()
return PROCESS_KILL
+1 -1
View File
@@ -217,7 +217,7 @@
else
. += "uv"
else if(state_open)
if(stat & BROKEN)
if(machine_stat & BROKEN)
. += "broken"
else
. += "open"
+1 -1
View File
@@ -14,7 +14,7 @@ GLOBAL_VAR_INIT(singularity_counter, 0)
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
var/active = FALSE
@@ -113,7 +113,7 @@
return newKey
/obj/machinery/telecomms/message_server/process()
if(toggled && (stat & (BROKEN|NOPOWER)))
if(toggled && (machine_stat & (BROKEN|NOPOWER)))
toggled = FALSE
update_icon()
@@ -132,7 +132,7 @@
relay_information(signal, /obj/machinery/telecomms/broadcaster)
/obj/machinery/telecomms/message_server/update_icon_state()
if((stat & (BROKEN|NOPOWER)))
if((machine_stat & (BROKEN|NOPOWER)))
icon_state = "server-nopower"
else if (!toggled)
icon_state = "server-off"
@@ -119,7 +119,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/proc/update_power()
if(toggled)
// if powered, on. if not powered, off. if too damaged, off
if(stat &(BROKEN | NOPOWER | EMPED))
if(machine_stat &(BROKEN | NOPOWER | EMPED))
on = FALSE
else
on = TRUE
@@ -140,8 +140,8 @@ GLOBAL_LIST_EMPTY(telecomms_list)
if((. & EMP_PROTECT_SELF))
return
if(prob(severity))
if(!(stat & EMPED))
stat |= EMPED
if(!(machine_stat & EMPED))
machine_stat |= EMPED
var/duration = severity * 35
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
stat &= ~(EMPED)
machine_stat &= ~(EMPED)
+4 -4
View File
@@ -98,7 +98,7 @@
update_icon()
/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(mapload)
. = ..()
@@ -196,10 +196,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
@@ -220,7 +220,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"
+2 -2
View File
@@ -39,7 +39,7 @@
update_icon()
/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)
@@ -72,7 +72,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
+1 -1
View File
@@ -274,7 +274,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
+2 -2
View File
@@ -169,7 +169,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
@@ -178,7 +178,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))
+1 -1
View File
@@ -25,7 +25,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
+1 -1
View File
@@ -95,7 +95,7 @@
/obj/effect/station_crash/New()
for(var/S in SSshuttle.stationary)
var/obj/docking_port/stationary/SM = S
if(SM.id == "emergency_home")
if(SM.shuttle_id == "emergency_home")
var/new_dir = turn(SM.dir, 180)
SM.forceMove(get_ranged_target_turf(SM, new_dir, rand(3,15)))
break
+5 -5
View File
@@ -17,14 +17,14 @@
continue // please don't do this
var/obj/docking_port/stationary/S = port
if (canDock(S) == SHUTTLE_CAN_DOCK)
options[S.name || S.id] = S
options[S.name || S.shuttle_id] = S
options += "--------"
options += "Infinite Transit"
options += "Delete Shuttle"
options += "Into The Sunset (delete & greentext 'escape')"
var/selection = input(user, "Select where to fly [name || id]:", "Fly Shuttle") as null|anything in options
var/selection = input(user, "Select where to fly [name || shuttle_id]:", "Fly Shuttle") as null|anything in options
if(!selection)
return
@@ -35,12 +35,12 @@
setTimer(ignitionTime)
if("Delete Shuttle")
if(alert(user, "Really delete [name || id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
if(alert(user, "Really delete [name || shuttle_id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
return
jumpToNullSpace()
if("Into The Sunset (delete & greentext 'escape')")
if(alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
if(alert(user, "Really delete [name || shuttle_id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
return
intoTheSunset()
@@ -65,7 +65,7 @@
continue // please don't do this
var/obj/docking_port/stationary/S = port
if (canDock(S) == SHUTTLE_CAN_DOCK)
options[S.name || S.id] = S
options[S.name || S.shuttle_id] = S
var/selection = input(user, "Select the new arrivals destination:", "Fly Shuttle") as null|anything in options
if(!selection)
@@ -2,12 +2,12 @@
name = "Human Observation Console"
var/team_number = 0
networks = list("ss13", "abductor")
var/datum/action/innate/teleport_in/tele_in_action = new
var/datum/action/innate/teleport_out/tele_out_action = new
var/datum/action/innate/teleport_self/tele_self_action = new
var/datum/action/innate/vest_mode_swap/vest_mode_action = new
var/datum/action/innate/vest_disguise_swap/vest_disguise_action = new
var/datum/action/innate/set_droppoint/set_droppoint_action = new
var/datum/action/innate/teleport_in/tele_in_action = /datum/action/innate/teleport_in
var/datum/action/innate/teleport_out/tele_out_action = /datum/action/innate/teleport_out
var/datum/action/innate/teleport_self/tele_self_action = /datum/action/innate/teleport_self
var/datum/action/innate/vest_mode_swap/vest_mode_action = /datum/action/innate/vest_mode_swap
var/datum/action/innate/vest_disguise_swap/vest_disguise_action = /datum/action/innate/vest_disguise_swap
var/datum/action/innate/set_droppoint/set_droppoint_action = /datum/action/innate/set_droppoint
var/obj/machinery/abductor/console/console
lock_override = TRUE
@@ -22,38 +22,21 @@
eyeobj.icon = 'icons/mob/cameramob.dmi'
eyeobj.icon_state = "generic_camera"
/obj/machinery/computer/camera_advanced/abductor/GrantActions(mob/living/carbon/user)
..()
/obj/machinery/computer/camera_advanced/abductor/Initialize(mapload)
. = ..()
if(tele_in_action)
tele_in_action.target = console.pad
tele_in_action.Grant(user)
actions += tele_in_action
actions += new tele_in_action(src)
if(tele_out_action)
tele_out_action.target = console
tele_out_action.Grant(user)
actions += tele_out_action
actions += new tele_out_action(src)
if(tele_self_action)
tele_self_action.target = console.pad
tele_self_action.Grant(user)
actions += tele_self_action
actions += new tele_self_action(src)
if(vest_mode_action)
vest_mode_action.target = console
vest_mode_action.Grant(user)
actions += vest_mode_action
actions += new vest_mode_action(src)
if(vest_disguise_action)
vest_disguise_action.target = console
vest_disguise_action.Grant(user)
actions += vest_disguise_action
actions += new vest_disguise_action(src)
if(set_droppoint_action)
set_droppoint_action.target = console
set_droppoint_action.Grant(user)
actions += set_droppoint_action
actions += new set_droppoint_action(src)
/obj/machinery/computer/camera_advanced/abductor/proc/IsScientist(mob/living/carbon/human/H)
return HAS_TRAIT(H, TRAIT_ABDUCTOR_SCIENTIST_TRAINING)
@@ -64,10 +47,9 @@
button_icon_state = "beam_down"
/datum/action/innate/teleport_in/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/abductor/pad/P = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
@@ -79,7 +61,7 @@
button_icon_state = "beam_up"
/datum/action/innate/teleport_out/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/obj/machinery/abductor/console/console = target
@@ -91,14 +73,13 @@
button_icon_state = "beam_down"
/datum/action/innate/teleport_self/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/abductor/pad/P = target
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
P.MobToLoc(remote_eye.loc,C)
P.MobToLoc(remote_eye.loc, owner)
/datum/action/innate/vest_mode_swap
name = "Switch Vest Mode"
@@ -106,7 +87,7 @@
button_icon_state = "vest_mode"
/datum/action/innate/vest_mode_swap/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/obj/machinery/abductor/console/console = target
console.FlipVest()
@@ -118,7 +99,7 @@
button_icon_state = "vest_disguise"
/datum/action/innate/vest_disguise_swap/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/obj/machinery/abductor/console/console = target
console.SelectDisguise(remote=1)
@@ -129,11 +110,10 @@
button_icon_state = "set_drop"
/datum/action/innate/set_droppoint/Activate()
if(!target || !iscarbon(owner))
if(QDELETED(owner) || !iscarbon(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/mob/camera/aiEye/remote/remote_eye = owner.remote_control
var/obj/machinery/abductor/console/console = target
console.SetDroppoint(remote_eye.loc,owner)
@@ -44,7 +44,7 @@
lock_override = CAMERA_LOCK_STATION
shuttlePortId = "huntership_custom"
see_hidden = FALSE
jumpto_ports = list("huntership_home" = 1, "whiteship_home" = 1, "syndicate_nw" = 1)
jump_to_ports = list("huntership_home" = 1, "whiteship_home" = 1, "syndicate_nw" = 1)
view_range = 4.5
/obj/structure/closet/crate/eva
@@ -487,7 +487,7 @@
/obj/machinery/airalarm/proc/shock(mob/user, prb)
if((stat & (NOPOWER))) // unpowered, no shock
if((machine_stat & (NOPOWER))) // unpowered, no shock
return FALSE
if(!prob(prb))
return FALSE //you lucked out, no shock for you
@@ -682,11 +682,11 @@
))
/obj/machinery/airalarm/update_icon_state()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
icon_state = "alarm0"
return
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "alarmx"
return
@@ -729,7 +729,7 @@
update_light()
/obj/machinery/airalarm/process()
if((stat & (NOPOWER|BROKEN)) || shorted)
if((machine_stat & (NOPOWER|BROKEN)) || shorted)
return
var/turf/location = get_turf(src)
@@ -790,7 +790,7 @@
var/area/A = get_base_area(src)
var/new_area_danger_level = 0
for(var/obj/machinery/airalarm/AA in A)
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
if (!(AA.machine_stat & (NOPOWER|BROKEN)) && !AA.shorted)
new_area_danger_level = clamp(max(new_area_danger_level, AA.danger_level), 0, 1)
var/did_anything_happen
@@ -908,7 +908,7 @@
return TRUE
/obj/machinery/airalarm/proc/togglelock(mob/living/user)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
to_chat(user, "<span class='warning'>It does nothing!</span>")
else
if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN))
@@ -921,7 +921,7 @@
/obj/machinery/airalarm/power_change()
..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
set_light(0)
update_icon()
@@ -66,9 +66,9 @@
icon_state = "filter_[on_state ? "on" : "off"][flipped ? "_f" : ""]"
/obj/machinery/atmospherics/components/trinary/filter/power_change()
var/old_stat = stat
var/old_stat = machine_stat
..()
if(stat != old_stat)
if(machine_stat != old_stat)
update_icon()
/obj/machinery/atmospherics/components/trinary/filter/process_atmos()
@@ -51,9 +51,9 @@
icon_state = "inje_on"
/obj/machinery/atmospherics/components/unary/outlet_injector/power_change()
var/old_stat = stat
var/old_stat = machine_stat
..()
if(old_stat != stat)
if(old_stat != machine_stat)
update_icon()
@@ -59,7 +59,7 @@
icon_state = "meterX"
return FALSE
if(stat & (BROKEN|NOPOWER))
if(machine_stat & (BROKEN|NOPOWER))
icon_state = "meter0"
return FALSE
@@ -129,7 +129,7 @@
qdel(src)
/obj/machinery/meter/interact(mob/user)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
else
to_chat(user, status())
@@ -226,7 +226,7 @@
air_contents.set_moles(GAS_N2, (N2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
/obj/machinery/portable_atmospherics/canister/update_icon_state()
if(stat & BROKEN)
if(machine_stat & BROKEN)
icon_state = "[icon_state]-1"
/obj/machinery/portable_atmospherics/canister/update_overlays()
@@ -252,7 +252,7 @@
/obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
canister_break()
if(disassembled)
new /obj/item/stack/sheet/metal (loc, 10)
@@ -280,9 +280,9 @@
return TRUE
/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag)
if((stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
if((machine_stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
return
stat |= BROKEN
machine_stat |= BROKEN
canister_break()
/obj/machinery/portable_atmospherics/canister/proc/canister_break()
@@ -313,7 +313,7 @@
/obj/machinery/portable_atmospherics/canister/process_atmos()
..()
if(stat & BROKEN)
if(machine_stat & BROKEN)
return PROCESS_KILL
if(timing && valve_timer < world.time)
valve_open = !valve_open
@@ -107,7 +107,7 @@
/obj/machinery/portable_atmospherics/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/tank))
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
var/obj/item/tank/T = W
if(!user.transferItemToLoc(T, src))
return
@@ -115,7 +115,7 @@
replace_tank(user, FALSE, T)
update_icon()
else if(W.tool_behaviour == TOOL_WRENCH)
if(!(stat & BROKEN))
if(!(machine_stat & BROKEN))
if(connected_port)
disconnect()
W.play_tool_sound(src)
@@ -147,7 +147,7 @@
return TRUE
/obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user, attackchain_flags = NONE, damage_multiplier = 1)
if(I.force < 10 && !(stat & BROKEN))
if(I.force < 10 && !(machine_stat & BROKEN))
take_damage(0)
else
investigate_log("was smacked with \a [I] by [key_name(user)].", INVESTIGATE_ATMOS)
@@ -19,7 +19,7 @@
. = ..()
pump = new(src, FALSE)
pump.on = TRUE
pump.stat = 0
pump.machine_stat = 0
SSair.add_to_rebuild_queue(pump)
/obj/machinery/portable_atmospherics/pump/Destroy()
+1 -1
View File
@@ -204,7 +204,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
portal_visuals.reset_visuals()
/obj/machinery/gateway/process()
if((stat & (NOPOWER)) && use_power)
if((machine_stat & (NOPOWER)) && use_power)
if(target)
deactivate()
return
@@ -54,7 +54,7 @@
queue += purchase
/obj/machinery/ltsrbt/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(recharge_cooldown)
recharge_cooldown--
+2 -2
View File
@@ -156,13 +156,13 @@
return
if(SSshuttle.supply.getDockedId() == "supply_home")
SSshuttle.supply.export_categories = get_export_categories()
SSshuttle.moveShuttle(SSshuttle.supply.id, "supply_away", TRUE)
SSshuttle.moveShuttle(SSshuttle.supply.shuttle_id, "supply_away", TRUE)
say("The supply shuttle is departing.")
investigate_log("[key_name(usr)] sent the supply shuttle away.", INVESTIGATE_CARGO)
else
investigate_log("[key_name(usr)] called the supply shuttle.", INVESTIGATE_CARGO)
say("The supply shuttle has been called and will arrive in [SSshuttle.supply.timeLeft(600)] minutes.")
SSshuttle.moveShuttle(SSshuttle.supply.id, "supply_home", TRUE)
SSshuttle.moveShuttle(SSshuttle.supply.shuttle_id, "supply_home", TRUE)
. = TRUE
if("loan")
if(!SSshuttle.shuttle_loan)
+2 -2
View File
@@ -160,7 +160,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(80)
new /obj/effect/temp_visual/emp(get_turf(S))
@@ -210,7 +210,7 @@
/obj/docking_port/mobile/pirate
name = "pirate shuttle"
id = "pirateship"
shuttle_id = "pirateship"
rechargeTime = 3 MINUTES
/obj/machinery/suit_storage_unit/pirate
@@ -45,7 +45,7 @@
. = ..()
if (dirty)
. += "grbloody"
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if (!occupant)
. += "grjam"
@@ -64,7 +64,7 @@
go_out()
/obj/machinery/gibber/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(operating)
to_chat(user, "<span class='danger'>It's locked and running.</span>")
@@ -88,7 +88,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>"
. += "<span class='notice'>- Capacity: <b>[max_n_of_items]</b> items.<span>"
. += "<span class='notice'>- Cook time reduced by <b>[(productivity - 1) * 25]%</b>.<span>"
@@ -207,7 +207,7 @@
if(operating || panel_open || !anchored || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return
if(isAI(user) && (stat & NOPOWER))
if(isAI(user) && (machine_stat & NOPOWER))
return
if(!length(ingredients))
@@ -222,7 +222,7 @@
// post choice verification
if(operating || panel_open || !anchored || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return
if(isAI(user) && (stat & NOPOWER))
if(isAI(user) && (machine_stat & NOPOWER))
return
usr.set_machine(src)
@@ -241,7 +241,7 @@
ingredients.Cut()
/obj/machinery/microwave/proc/cook(mob/user)
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
return
if(operating || broken > 0 || panel_open || !anchored || dirty == 100)
return
@@ -297,7 +297,7 @@
loop(MICROWAVE_MUCK, 4)
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * productivity, 2), mob/user) // standard wait is 10
if(stat & (NOPOWER|BROKEN))
if(machine_stat & (NOPOWER|BROKEN))
if(type == MICROWAVE_PRE)
pre_fail()
return
@@ -42,7 +42,7 @@
if(default_deconstruction_crowbar(O))
return
if(stat) //NOPOWER etc
if(machine_stat) //NOPOWER etc
return
else
return ..()
@@ -42,7 +42,7 @@
/obj/machinery/smartfridge/update_icon_state()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(!stat)
if(!machine_stat)
SSvis_overlays.add_vis_overlay(src, icon, "smartfridge-light-mask", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
if (visible_contents)
switch(contents.len)
@@ -61,7 +61,7 @@
/obj/machinery/smartfridge/update_overlays()
. = ..()
if(!stat)
if(!machine_stat)
. += emissive_appearance(icon, "smartfridge-light-mask", alpha = src.alpha)
@@ -88,7 +88,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>")
+2 -2
View File
@@ -84,7 +84,7 @@
/obj/machinery/computer/holodeck/power_change()
. = ..()
toggle_power(!stat)
toggle_power(!machine_stat)
/obj/machinery/computer/holodeck/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -308,7 +308,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_REF(derez), O, silent), 50) // may last a disturbingly long time
return
+1 -1
View File
@@ -165,7 +165,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
+2 -2
View File
@@ -163,7 +163,7 @@
/obj/machinery/biogenerator/proc/activate(mob/user)
if(user.stat != CONSCIOUS)
return
if(stat != NONE)
if(machine_stat != NONE)
return
if(processing)
to_chat(user, "<span class='warning'>The biogenerator is in the process of working.</span>")
@@ -249,7 +249,7 @@
update_icon()
/obj/machinery/biogenerator/ui_status(mob/user)
if(stat & BROKEN || panel_open)
if(machine_stat & BROKEN || panel_open)
return UI_CLOSE
return ..()
+1 -1
View File
@@ -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"

Some files were not shown because too many files have changed in this diff Show More