push
This commit is contained in:
@@ -41,13 +41,13 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
||||
update_move_direction()
|
||||
|
||||
/obj/machinery/conveyor/auto/update()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "conveyor-broken"
|
||||
operating = FALSE
|
||||
return
|
||||
else if(!operable)
|
||||
operating = FALSE
|
||||
else if(stat & NOPOWER)
|
||||
else if(machine_stat & NOPOWER)
|
||||
operating = FALSE
|
||||
else
|
||||
operating = TRUE
|
||||
@@ -113,20 +113,20 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
||||
update()
|
||||
|
||||
/obj/machinery/conveyor/proc/update()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
icon_state = "conveyor-broken"
|
||||
operating = FALSE
|
||||
return
|
||||
if(!operable)
|
||||
operating = FALSE
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
operating = FALSE
|
||||
icon_state = "conveyor[operating * verted]"
|
||||
|
||||
// machine process
|
||||
// move items to the target location
|
||||
/obj/machinery/conveyor/process()
|
||||
if(stat & (BROKEN | NOPOWER))
|
||||
if(machine_stat & (BROKEN | NOPOWER))
|
||||
return
|
||||
if(!operating)
|
||||
return
|
||||
@@ -149,21 +149,21 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
||||
user.visible_message("<span class='notice'>[user] struggles to pry up \the [src] with \the [I].</span>", \
|
||||
"<span class='notice'>You struggle to pry up \the [src] with \the [I].</span>")
|
||||
if(I.use_tool(src, user, 40, volume=40))
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
var/obj/item/stack/conveyor/C = new /obj/item/stack/conveyor(loc, 1, TRUE, id)
|
||||
transfer_fingerprints_to(C)
|
||||
to_chat(user, "<span class='notice'>You remove the conveyor belt.</span>")
|
||||
qdel(src)
|
||||
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
I.play_tool_sound(src)
|
||||
setDir(turn(dir,-45))
|
||||
update_move_direction()
|
||||
to_chat(user, "<span class='notice'>You rotate [src].</span>")
|
||||
|
||||
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!(stat & BROKEN))
|
||||
if(!(machine_stat & BROKEN))
|
||||
verted = verted * -1
|
||||
update_move_direction()
|
||||
to_chat(user, "<span class='notice'>You reverse [src]'s direction.</span>")
|
||||
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
||||
// make the conveyor broken
|
||||
// also propagate inoperability to any connected conveyor with the same ID
|
||||
/obj/machinery/conveyor/proc/broken()
|
||||
stat |= BROKEN
|
||||
machine_stat |= BROKEN
|
||||
update()
|
||||
|
||||
var/obj/machinery/conveyor/C = locate() in get_step(src, dir)
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
// monkeys and xenos can only pull the flush lever
|
||||
/obj/machinery/disposal/attack_paw(mob/user)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
flush = !flush
|
||||
update_icon()
|
||||
@@ -303,7 +303,7 @@
|
||||
return GLOB.notcontained_state
|
||||
|
||||
/obj/machinery/disposal/bin/ui_interact(mob/user, datum/tgui/ui)
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
return
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
@@ -385,7 +385,7 @@
|
||||
|
||||
/obj/machinery/disposal/bin/update_overlays()
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
if(machine_stat & BROKEN)
|
||||
pressure_charging = FALSE
|
||||
flush = FALSE
|
||||
return
|
||||
@@ -395,7 +395,7 @@
|
||||
. += "dispover-handle"
|
||||
|
||||
//only handle is shown if no power
|
||||
if(stat & NOPOWER || panel_open)
|
||||
if(machine_stat & NOPOWER || panel_open)
|
||||
return
|
||||
|
||||
//check for items in disposal - occupied light
|
||||
@@ -418,7 +418,7 @@
|
||||
//timed process
|
||||
//charge the gas reservoir and perform flush if ready
|
||||
/obj/machinery/disposal/bin/process()
|
||||
if(stat & BROKEN) //nothing can happen if broken
|
||||
if(machine_stat & BROKEN) //nothing can happen if broken
|
||||
return
|
||||
|
||||
flush_count++
|
||||
@@ -431,7 +431,7 @@
|
||||
if(flush && air_contents.return_pressure() >= SEND_PRESSURE) // flush can happen even without power
|
||||
do_flush()
|
||||
|
||||
if(stat & NOPOWER) // won't charge if no power
|
||||
if(machine_stat & NOPOWER) // won't charge if no power
|
||||
return
|
||||
|
||||
use_power(100) // base power usage
|
||||
|
||||
Reference in New Issue
Block a user