mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
machinery_process() & auto_use_power efficiency tweaks (#2657)
changes: Machinery now uses machinery_process() instead of process(), allowing machines to be put into SSprocessing-style lists in addition to the machinery list. Automatic power calculations now involve less proc-calls.
This commit is contained in:
@@ -103,7 +103,7 @@ obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/a
|
||||
|
||||
return node.pipe_color
|
||||
|
||||
/obj/machinery/atmospherics/process()
|
||||
/obj/machinery/atmospherics/machinery_process()
|
||||
last_flow_rate = 0
|
||||
last_power_draw = 0
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
stored_energy = 0
|
||||
return last_stored_energy_transferred
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/process()
|
||||
/obj/machinery/atmospherics/binary/circulator/machinery_process()
|
||||
..()
|
||||
|
||||
if(last_worldtime_transfer < world.time - 50)
|
||||
@@ -144,4 +144,4 @@
|
||||
return
|
||||
|
||||
src.set_dir(turn(src.dir, -90))
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
update_icon()
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/process()
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/machinery_process()
|
||||
..()
|
||||
|
||||
last_power_draw = 0
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
/obj/machinery/atmospherics/binary/passive_gate/hide(var/i)
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/process()
|
||||
/obj/machinery/atmospherics/binary/passive_gate/machinery_process()
|
||||
..()
|
||||
|
||||
last_flow_rate = 0
|
||||
|
||||
@@ -62,7 +62,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/binary/pump/hide(var/i)
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/process()
|
||||
/obj/machinery/atmospherics/binary/pump/machinery_process()
|
||||
last_power_draw = 0
|
||||
last_flow_rate = 0
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/atmospherics/omni/filter/process()
|
||||
/obj/machinery/atmospherics/omni/filter/machinery_process()
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/process()
|
||||
/obj/machinery/atmospherics/omni/mixer/machinery_process()
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
/obj/machinery/atmospherics/omni/proc/error_check()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/process()
|
||||
/obj/machinery/atmospherics/omni/machinery_process()
|
||||
last_power_draw = 0
|
||||
last_flow_rate = 0
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/obj/machinery/atmospherics/portables_connector/hide(var/i)
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/portables_connector/process()
|
||||
/obj/machinery/atmospherics/portables_connector/machinery_process()
|
||||
..()
|
||||
if(!on)
|
||||
return
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/process()
|
||||
/obj/machinery/atmospherics/trinary/filter/machinery_process()
|
||||
..()
|
||||
|
||||
last_power_draw = 0
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if (!mixing_inputs)
|
||||
mixing_inputs = list(src.air1 = node1_concentration, src.air2 = node2_concentration)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/process()
|
||||
/obj/machinery/atmospherics/trinary/mixer/machinery_process()
|
||||
..()
|
||||
|
||||
last_power_draw = 0
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
else
|
||||
src.go_to_side()
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/process()
|
||||
/obj/machinery/atmospherics/tvalve/machinery_process()
|
||||
..()
|
||||
. = PROCESS_KILL
|
||||
//machines.Remove(src)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/process()
|
||||
/obj/machinery/atmospherics/unary/freezer/machinery_process()
|
||||
..()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN) || !use_power)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater/process()
|
||||
/obj/machinery/atmospherics/unary/heater/machinery_process()
|
||||
..()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN) || !use_power)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/process()
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/machinery_process()
|
||||
..()
|
||||
|
||||
last_power_draw = 0
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/process()
|
||||
/obj/machinery/atmospherics/unary/vent_pump/machinery_process()
|
||||
..()
|
||||
|
||||
if (hibernate > world.time)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/process()
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/machinery_process()
|
||||
..()
|
||||
|
||||
if (hibernate > world.time)
|
||||
|
||||
@@ -136,11 +136,9 @@
|
||||
else
|
||||
src.open()
|
||||
|
||||
/obj/machinery/atmospherics/valve/process()
|
||||
/obj/machinery/atmospherics/valve/machinery_process()
|
||||
..()
|
||||
. = PROCESS_KILL
|
||||
|
||||
return
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/valve/initialize()
|
||||
normalize_dir()
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/process()
|
||||
/obj/machinery/atmospherics/pipe/simple/machinery_process()
|
||||
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
|
||||
..()
|
||||
else
|
||||
@@ -452,7 +452,7 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold/pipeline_expansion()
|
||||
return list(node1, node2, node3)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/process()
|
||||
/obj/machinery/atmospherics/pipe/manifold/machinery_process()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
@@ -697,7 +697,7 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/pipeline_expansion()
|
||||
return list(node1, node2, node3, node4)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/process()
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/machinery_process()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
@@ -960,7 +960,7 @@
|
||||
/obj/machinery/atmospherics/pipe/cap/pipeline_expansion()
|
||||
return list(node)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/process()
|
||||
/obj/machinery/atmospherics/pipe/cap/machinery_process()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
@@ -1075,7 +1075,7 @@
|
||||
initialize_directions = dir
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/process()
|
||||
/obj/machinery/atmospherics/pipe/tank/machinery_process()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
@@ -1242,7 +1242,7 @@
|
||||
name = "Larger vent"
|
||||
volume = 1000
|
||||
|
||||
/obj/machinery/atmospherics/pipe/vent/process()
|
||||
/obj/machinery/atmospherics/pipe/vent/machinery_process()
|
||||
if(!parent)
|
||||
if(build_killswitch <= 0)
|
||||
. = PROCESS_KILL
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
sortTim(cameranet.cameras, /proc/cmp_camera)
|
||||
cameranet.cameras_unsorted = FALSE
|
||||
|
||||
var/list/curr_machinery = src.processing_machinery
|
||||
var/list/curr_powersinks = src.processing_powersinks
|
||||
var/list/curr_machinery = processing_machinery
|
||||
var/list/curr_powersinks = processing_powersinks
|
||||
|
||||
while (curr_machinery.len)
|
||||
var/obj/machinery/M = curr_machinery[curr_machinery.len]
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
if (M.machinery_processing)
|
||||
processes_this_tick++
|
||||
switch (M.process())
|
||||
switch (M.machinery_process())
|
||||
if (PROCESS_KILL)
|
||||
remove_machine(M)
|
||||
if (M_NO_PROCESS)
|
||||
@@ -99,12 +99,26 @@
|
||||
if (start_tick != world.time)
|
||||
// Slept.
|
||||
if (!slept_in_process[M.type])
|
||||
log_debug("SSmachinery: Type '[M.type]' slept during process().")
|
||||
log_debug("SSmachinery: Type '[M.type]' slept during machinery_process().")
|
||||
slept_in_process[M.type] = TRUE
|
||||
|
||||
if (M.use_power)
|
||||
powerusers_this_tick++
|
||||
M.auto_use_power()
|
||||
if (M.has_special_power_checks)
|
||||
M.auto_use_power()
|
||||
else
|
||||
var/area/A = M.loc ? M.loc.loc : null
|
||||
if (isarea(A))
|
||||
var/chan = M.power_channel
|
||||
if (A.powered(chan))
|
||||
var/usage = 0
|
||||
switch (M.use_power)
|
||||
if (1)
|
||||
usage = M.idle_power_usage
|
||||
if (2)
|
||||
usage = M.active_power_usage
|
||||
|
||||
A.use_power(usage, chan)
|
||||
|
||||
if (no_mc_tick)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
icon_state = "table2-idle"
|
||||
return 0
|
||||
|
||||
/obj/machinery/optable/process()
|
||||
/obj/machinery/optable/machinery_process()
|
||||
check_victim()
|
||||
|
||||
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/sleeper/process()
|
||||
/obj/machinery/sleeper/machinery_process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
TLV["pressure"] = list(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20) /* kpa */
|
||||
TLV["temperature"] = list(T0C-26, T0C, T0C+40, T0C+66) // K
|
||||
|
||||
/obj/machinery/alarm/process()
|
||||
/obj/machinery/alarm/machinery_process()
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted || buildstage != 2)
|
||||
return
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process()
|
||||
/obj/machinery/air_sensor/machinery_process()
|
||||
if(on)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -100,7 +100,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
user.set_machine(src)
|
||||
onclose(user, "computer")
|
||||
|
||||
/obj/machinery/computer/general_air_control/process()
|
||||
/obj/machinery/computer/general_air_control/machinery_process()
|
||||
if (operable())
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -411,7 +411,7 @@ Min Core Pressure: [pressure_limit] kPa<BR>"}
|
||||
var/on_temperature = 1200
|
||||
circuit = /obj/item/weapon/circuitboard/air_management/injector_control
|
||||
|
||||
/obj/machinery/computer/general_air_control/fuel_injection/process()
|
||||
/obj/machinery/computer/general_air_control/fuel_injection/machinery_process()
|
||||
if(automation)
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
@@ -185,7 +185,7 @@ update_flag
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/process()
|
||||
/obj/machinery/portable_atmospherics/canister/machinery_process()
|
||||
if (destroyed)
|
||||
return
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if (!target)
|
||||
src.target = locate(/obj/machinery/atmospherics/pipe) in loc
|
||||
|
||||
/obj/machinery/meter/process()
|
||||
/obj/machinery/meter/machinery_process()
|
||||
if(!target)
|
||||
icon_state = "meterX"
|
||||
return 0
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
connect(port)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/process()
|
||||
/obj/machinery/portable_atmospherics/machinery_process()
|
||||
if(!connected_port) //only react when pipe_network will ont it do it for you
|
||||
//Allow for reactions
|
||||
air_contents.react()
|
||||
@@ -143,6 +143,7 @@
|
||||
var/power_losses
|
||||
var/last_power_draw = 0
|
||||
var/obj/item/weapon/cell/cell
|
||||
has_special_power_checks = TRUE
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/powered()
|
||||
if(use_power) //using area power
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/process()
|
||||
/obj/machinery/portable_atmospherics/powered/pump/machinery_process()
|
||||
..()
|
||||
var/power_draw = -1
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/process()
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/machinery_process()
|
||||
..()
|
||||
|
||||
var/power_draw = -1
|
||||
@@ -183,7 +183,7 @@
|
||||
if (old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/huge/process()
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/huge/machinery_process()
|
||||
if(!on || (stat & (NOPOWER|BROKEN)))
|
||||
update_use_power(0)
|
||||
last_flow_rate = 0
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/on = 0
|
||||
var/volume_rate = 800
|
||||
|
||||
/obj/machinery/zvent/process()
|
||||
/obj/machinery/zvent/machinery_process()
|
||||
|
||||
//all this object does, is make its turf share air with the ones above and below it, if they have a vent too.
|
||||
if (istype(loc,/turf/simulated)) //if we're not on a valid turf, forget it
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
idle_power_usage = 15000
|
||||
active_power_usage = 15000
|
||||
|
||||
/obj/machinery/bluespacerelay/process()
|
||||
/obj/machinery/bluespacerelay/machinery_process()
|
||||
|
||||
update_power()
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@
|
||||
mode = 0
|
||||
|
||||
|
||||
/obj/machinery/bot/mulebot/process()
|
||||
/obj/machinery/bot/mulebot/machinery_process()
|
||||
if(!has_power())
|
||||
on = 0
|
||||
return
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
wires = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/camera/process()
|
||||
/obj/machinery/camera/machinery_process()
|
||||
if((stat & EMPED) && world.time >= affected_by_emp_until)
|
||||
stat &= ~EMPED
|
||||
cancelCameraAlarm()
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
..(severity)
|
||||
|
||||
|
||||
/obj/machinery/cell_charger/process()
|
||||
/obj/machinery/cell_charger/machinery_process()
|
||||
//world << "ccpt [charging] [stat]"
|
||||
if((stat & (BROKEN|NOPOWER)) || !anchored)
|
||||
update_use_power(0)
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
return between(0, 100 * (occupant.health - occupant.maxHealth * config.health_threshold_crit / 100) / (occupant.maxHealth * (heal_level - config.health_threshold_crit) / 100), 100)
|
||||
|
||||
//Grow clones to maturity then kick them out. FREELOADERS
|
||||
/obj/machinery/clonepod/process()
|
||||
/obj/machinery/clonepod/machinery_process()
|
||||
|
||||
if(stat & NOPOWER) //Autoeject if power is lost
|
||||
if(occupant)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
idle_power_usage = 15000
|
||||
active_power_usage = 15000
|
||||
|
||||
/obj/machinery/bluespacerelay/process()
|
||||
/obj/machinery/bluespacerelay/machinery_process()
|
||||
|
||||
update_power()
|
||||
|
||||
|
||||
@@ -79,6 +79,6 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/operating/process()
|
||||
/obj/machinery/computer/operating/machinery_process()
|
||||
if(operable())
|
||||
src.updateDialog()
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
if(can_access_camera(jump_to))
|
||||
switch_to_camera(user,jump_to)
|
||||
|
||||
/obj/machinery/computer/security/process()
|
||||
/obj/machinery/computer/security/machinery_process()
|
||||
if(cache_id != camera_repository.camera_cache_id)
|
||||
cache_id = camera_repository.camera_cache_id
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
..()
|
||||
crew_announcement.newscast = 1
|
||||
|
||||
/obj/machinery/computer/communications/process()
|
||||
/obj/machinery/computer/communications/machinery_process()
|
||||
if(operable())
|
||||
if(state != STATE_STATUSDISPLAY)
|
||||
src.updateDialog()
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/process()
|
||||
/obj/machinery/computer/pod/machinery_process()
|
||||
if(inoperable())
|
||||
return
|
||||
if(timing)
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
..()
|
||||
queue_icon_update()
|
||||
|
||||
/obj/machinery/crusher_base/process()
|
||||
/obj/machinery/crusher_base/machinery_process()
|
||||
set waitfor = FALSE
|
||||
if(!pstn) //We dont process if theres no piston
|
||||
return
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
node = target
|
||||
break
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/process()
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/machinery_process()
|
||||
..()
|
||||
if(!node)
|
||||
return
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
return 1
|
||||
|
||||
//Lifted from Unity stasis.dm and refactored. ~Zuhayr
|
||||
/obj/machinery/cryopod/process()
|
||||
/obj/machinery/cryopod/machinery_process()
|
||||
if(occupant)
|
||||
//Allow a ten minute gap between entering the pod and actually despawning.
|
||||
if(world.time - time_entered < time_till_despawn)
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/uranium/process()
|
||||
/obj/machinery/door/airlock/uranium/machinery_process()
|
||||
if(world.time > last_event+20)
|
||||
if(prob(50))
|
||||
radiate()
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
|
||||
flick("airlock_sensor_cycle", src)
|
||||
|
||||
/obj/machinery/airlock_sensor/process()
|
||||
/obj/machinery/airlock_sensor/machinery_process()
|
||||
if(on)
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
var/pressure = round(air_sample.return_pressure(),0.1)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
//Main door timer loop, if it's timing and time is >0 reduce time by 1.
|
||||
// if it's less than 0, open door, reset timer
|
||||
// update the door_timer window and the icon
|
||||
/obj/machinery/door_timer/process()
|
||||
/obj/machinery/door_timer/machinery_process()
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
if(src.timing)
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
return ..()
|
||||
|
||||
// CHECK PRESSURE
|
||||
/obj/machinery/door/firedoor/process()
|
||||
/obj/machinery/door/firedoor/machinery_process()
|
||||
..()
|
||||
|
||||
if(density && next_process_time <= world.time)
|
||||
|
||||
@@ -24,7 +24,7 @@ obj/machinery/embedded_controller/radio/Destroy()
|
||||
program.receive_signal(signal, receive_method, receive_param)
|
||||
//spawn(5) program.process() //no, program.process sends some signals and machines respond and we here again and we lag -rastaf0
|
||||
|
||||
/obj/machinery/embedded_controller/process()
|
||||
/obj/machinery/embedded_controller/machinery_process()
|
||||
if(program)
|
||||
program.process()
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
src.alarm()
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/process()//Note: this processing was mostly phased out due to other code, and only runs when needed
|
||||
/obj/machinery/firealarm/machinery_process()//Note: this processing was mostly phased out due to other code, and only runs when needed
|
||||
var/area/A = get_area(src)
|
||||
if (A.fire != previous_fire_state)
|
||||
update_icon()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
overlays.Cut()
|
||||
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
|
||||
|
||||
/obj/machinery/floodlight/process()
|
||||
/obj/machinery/floodlight/machinery_process()
|
||||
if(!on)
|
||||
return
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ var/list/floor_light_cache = list()
|
||||
update_brightness()
|
||||
return
|
||||
|
||||
/obj/machinery/floor_light/process()
|
||||
/obj/machinery/floor_light/machinery_process()
|
||||
..()
|
||||
var/need_update
|
||||
if((!anchored || broken()) && on)
|
||||
|
||||
@@ -154,7 +154,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
icon_state = "holopad0"
|
||||
return 1
|
||||
|
||||
/obj/machinery/hologram/holopad/process()
|
||||
/obj/machinery/hologram/holopad/machinery_process()
|
||||
for (var/mob/living/silicon/ai/master in masters)
|
||||
var/active_ai = (master && !master.incapacitated() && master.client && master.eyeobj)//If there is an AI with an eye attached, it's not incapacitated, and it has a client
|
||||
if((stat & NOPOWER) || !active_ai)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
ignite()
|
||||
return
|
||||
|
||||
/obj/machinery/igniter/process() //ugh why is this even in process()?
|
||||
/obj/machinery/igniter/machinery_process() //ugh why is this even in process()?
|
||||
if (on && powered() )
|
||||
var/turf/location = src.loc
|
||||
if (isturf(location))
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/iv_drip/process()
|
||||
/obj/machinery/iv_drip/machinery_process()
|
||||
set background = 1
|
||||
|
||||
if(src.attached)
|
||||
@@ -192,4 +192,4 @@
|
||||
/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(height && istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through.
|
||||
return 1
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/appliance/process()
|
||||
/obj/machinery/appliance/machinery_process()
|
||||
if (cooking_power > 0 && cooking)
|
||||
for (var/i in cooking_objs)
|
||||
do_cooking_tick(i)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
light.pixel_y = light_y
|
||||
add_overlay(light)
|
||||
|
||||
/obj/machinery/appliance/cooker/process()
|
||||
/obj/machinery/appliance/cooker/machinery_process()
|
||||
if (!stat)
|
||||
heat_up()
|
||||
else
|
||||
|
||||
@@ -137,7 +137,7 @@ fundamental differences
|
||||
icon_state = off_icon
|
||||
|
||||
|
||||
/obj/machinery/appliance/mixer/process()
|
||||
/obj/machinery/appliance/mixer/machinery_process()
|
||||
if (!stat)
|
||||
for (var/i in cooking_objs)
|
||||
do_cooking_tick(i)
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/smartfridge/drying_rack/process()
|
||||
/obj/machinery/smartfridge/drying_rack/machinery_process()
|
||||
..()
|
||||
if (contents.len)
|
||||
dry()
|
||||
@@ -152,7 +152,7 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/smartfridge/process()
|
||||
/obj/machinery/smartfridge/machinery_process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(src.seconds_electrified > 0)
|
||||
|
||||
@@ -114,6 +114,7 @@ Class Procs:
|
||||
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
|
||||
var/printing = 0 // Is this machine currently printing anything?
|
||||
var/tmp/machinery_processing = FALSE // Are we process()ing in SSmachinery?
|
||||
var/has_special_power_checks = FALSE // If true, call auto_use_power instead of doing it all in SSmachinery.
|
||||
|
||||
/obj/machinery/Initialize(mapload, d=0)
|
||||
. = ..()
|
||||
@@ -135,6 +136,9 @@ Class Procs:
|
||||
qdel(A)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/proc/machinery_process()
|
||||
. = process()
|
||||
|
||||
/obj/machinery/process()//If you dont use process or power why are you here
|
||||
if(!(use_power || idle_power_usage || active_power_usage))
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/list/slogan_list = list("Don't deploy just yet! Grab your gear!","Forgetting something?","Don't hop on in your skivvies, mate!","It's not Casual Friday, y'know?","Heaven's above, put some clothes on!")
|
||||
var/shut_up = 0 //Stop spouting those godawful pitches!
|
||||
|
||||
/obj/machinery/megavendor/process()
|
||||
/obj/machinery/megavendor/machinery_process()
|
||||
if(((src.last_slogan + src.slogan_delay) <= world.time) && (src.slogan_list.len > 0) && (!src.shut_up) && prob(5))
|
||||
var/slogan = pick(src.slogan_list)
|
||||
src.ping(slogan)
|
||||
|
||||
@@ -34,7 +34,7 @@ var/bomb_set
|
||||
wires = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/nuclearbomb/process()
|
||||
/obj/machinery/nuclearbomb/machinery_process()
|
||||
if (src.timing)
|
||||
src.timeleft = max(timeleft - 2, 0) // 2 seconds per process()
|
||||
if (timeleft <= 0)
|
||||
|
||||
@@ -443,7 +443,7 @@ var/list/turret_icons
|
||||
spark_system.queue() //creates some sparks because they look cool
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/porta_turret/process()
|
||||
/obj/machinery/porta_turret/machinery_process()
|
||||
//the main machinery process
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 50
|
||||
has_special_power_checks = TRUE
|
||||
var/mob/occupant = null
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/icon_update_tick = 0 // Used to rebuild the overlay only once every 10 ticks
|
||||
@@ -40,7 +41,7 @@
|
||||
/obj/machinery/recharge_station/proc/has_cell_power()
|
||||
return cell && cell.percent() > 0
|
||||
|
||||
/obj/machinery/recharge_station/process()
|
||||
/obj/machinery/recharge_station/machinery_process()
|
||||
if(stat & (BROKEN))
|
||||
return
|
||||
if(!cell) // Shouldn't be possible, but sanity check
|
||||
|
||||
@@ -22,7 +22,7 @@ obj/machinery/scanner/New()
|
||||
if(!outputdir)
|
||||
outputdir = 8
|
||||
|
||||
/obj/machinery/scanner/process()
|
||||
/obj/machinery/scanner/machinery_process()
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
use_power(50)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/on = 0
|
||||
var/set_temperature = T0C + 50 //K
|
||||
var/heating_power = 40000
|
||||
has_special_power_checks = TRUE
|
||||
|
||||
|
||||
/obj/machinery/space_heater/Initialize()
|
||||
@@ -153,7 +154,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/space_heater/process()
|
||||
/obj/machinery/space_heater/machinery_process()
|
||||
if(on)
|
||||
if(cell && cell.charge)
|
||||
var/datum/gas_mixture/env = loc.return_air()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
SSradio.add_object(src, frequency)
|
||||
|
||||
// timed process
|
||||
/obj/machinery/status_display/process()
|
||||
/obj/machinery/status_display/machinery_process()
|
||||
if(stat & NOPOWER)
|
||||
remove_display()
|
||||
return
|
||||
|
||||
@@ -910,7 +910,7 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/suit_cycler/process()
|
||||
/obj/machinery/suit_cycler/machinery_process()
|
||||
|
||||
if(electrified > 0)
|
||||
electrified--
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
deactivate()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/supply_beacon/process()
|
||||
/obj/machinery/power/supply_beacon/machinery_process()
|
||||
if(expended)
|
||||
return PROCESS_KILL
|
||||
if(!use_power)
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
return ..()
|
||||
|
||||
//stealth direct power usage
|
||||
/obj/machinery/power/singularity_beacon/process()
|
||||
/obj/machinery/power/singularity_beacon/machinery_process()
|
||||
if(!active)
|
||||
return PROCESS_KILL
|
||||
else
|
||||
|
||||
@@ -171,7 +171,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
else
|
||||
on = 0
|
||||
|
||||
/obj/machinery/telecomms/process()
|
||||
/obj/machinery/telecomms/machinery_process()
|
||||
update_power()
|
||||
|
||||
// Check heat and generate some
|
||||
|
||||
@@ -580,7 +580,7 @@
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
/obj/machinery/vending/machinery_process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
|
||||
repair += P.rating * 2
|
||||
|
||||
/obj/machinery/mech_recharger/process()
|
||||
/obj/machinery/mech_recharger/machinery_process()
|
||||
..()
|
||||
if(!charging)
|
||||
return
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
manufacturer = basic_robolimb.company
|
||||
update_categories()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/process()
|
||||
/obj/machinery/mecha_part_fabricator/machinery_process()
|
||||
..()
|
||||
if(stat)
|
||||
return
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
if(istype(E,/obj/effect/rune) || istype(E,/obj/effect/decal/cleanable) || istype(E,/obj/effect/overlay))
|
||||
qdel(E)
|
||||
|
||||
/obj/machinery/shower/process()
|
||||
/obj/machinery/shower/machinery_process()
|
||||
if(!on) return
|
||||
wash_floor()
|
||||
if(!mobpresent) return
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/artillerycontrol/process()
|
||||
/obj/machinery/artillerycontrol/machinery_process()
|
||||
if(src.reload<180)
|
||||
src.reload++
|
||||
|
||||
@@ -62,4 +62,4 @@
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,2,5,11)*/
|
||||
explosion(loc,2,5,11)*/
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/dnaforensics/process()
|
||||
/obj/machinery/dnaforensics/machinery_process()
|
||||
if(scanning)
|
||||
if(!bloodsamp || bloodsamp.loc != src)
|
||||
bloodsamp = null
|
||||
|
||||
@@ -46,7 +46,7 @@ log transactions
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/atm/process()
|
||||
/obj/machinery/atm/machinery_process()
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
if (stat != oldstat && active && (stat & NOPOWER))
|
||||
emergencyShutdown()
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/process()
|
||||
/obj/machinery/computer/HolodeckControl/machinery_process()
|
||||
for(var/item in holographic_objs) // do this first, to make sure people don't take items out when power is down.
|
||||
if(!(get_turf(item) in linkedholodeck))
|
||||
derez(item, 0)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
user << "<span class='notice'>You take all filled honeycombs out.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/beehive/process()
|
||||
/obj/machinery/beehive/machinery_process()
|
||||
if(closed && !smoked && bee_count)
|
||||
pollinate_flowers()
|
||||
update_icon()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
var/failed_task = 0
|
||||
var/disk_needs_genes = 0
|
||||
|
||||
/obj/machinery/botany/process()
|
||||
/obj/machinery/botany/machinery_process()
|
||||
|
||||
..()
|
||||
if(!active) return
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/apiary/process()
|
||||
/obj/machinery/apiary/machinery_process()
|
||||
|
||||
if(swarming > 0)
|
||||
swarming -= 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/machinery/portable_atmospherics/hydroponics/process()
|
||||
/obj/machinery/portable_atmospherics/hydroponics/machinery_process()
|
||||
|
||||
// Handle nearby smoke if any.
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/die()
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/process()
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/machinery_process()
|
||||
if(!seed)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
QDEL_NULL(spark_system)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mining/drill/process()
|
||||
/obj/machinery/mining/drill/machinery_process()
|
||||
|
||||
if(need_player_check)
|
||||
return
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
/obj/machinery/mineral/processing_unit/machinery_process()
|
||||
..()
|
||||
|
||||
if (!src.output || !src.input) return
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
/obj/machinery/mineral/stacking_machine/machinery_process()
|
||||
..()
|
||||
if(!console)
|
||||
log_debug("Stacking machine tried to process, but no console has linked itself to it.")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/process()
|
||||
/obj/machinery/mineral/unloading_machine/machinery_process()
|
||||
..()
|
||||
if (src.output && src.input)
|
||||
if (locate(/obj/structure/ore_box, input.loc))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(src.output) break
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
/obj/machinery/mineral/mint/machinery_process()
|
||||
if ( src.input)
|
||||
var/obj/item/stack/O
|
||||
O = locate(/obj/item/stack, input.loc)
|
||||
|
||||
@@ -304,7 +304,7 @@ var/list/ai_verbs_default = list(
|
||||
. = ..()
|
||||
powered_ai = null
|
||||
|
||||
/obj/machinery/ai_powersupply/process()
|
||||
/obj/machinery/ai_powersupply/machinery_process()
|
||||
if(!powered_ai || powered_ai.stat == DEAD)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if (stat & NOPOWER)
|
||||
icon_state = "drone_fab_nopower"
|
||||
|
||||
/obj/machinery/drone_fabricator/process()
|
||||
/obj/machinery/drone_fabricator/machinery_process()
|
||||
|
||||
if(!ROUND_IS_STARTED)
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
else
|
||||
add_overlay("ntnet_o_ok")
|
||||
|
||||
/obj/machinery/ntnet_relay/process()
|
||||
/obj/machinery/ntnet_relay/machinery_process()
|
||||
if(operable())
|
||||
use_power = 2
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/up/process()
|
||||
/obj/machinery/atmospherics/pipe/up/machinery_process()
|
||||
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
|
||||
..()
|
||||
else
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
R.fields["y"] = S.y
|
||||
known_sectors += R
|
||||
|
||||
/obj/machinery/computer/helm/process()
|
||||
/obj/machinery/computer/helm/machinery_process()
|
||||
if (autopilot && dx && dy)
|
||||
var/turf/T = locate(dx,dy,1)
|
||||
if(linked.loc == T)
|
||||
|
||||
@@ -186,7 +186,7 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/process()
|
||||
/obj/machinery/photocopier/faxmachine/machinery_process()
|
||||
.=..()
|
||||
var/static/ui_update_delay = 0
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/process()
|
||||
/obj/machinery/power/am_control_unit/machinery_process()
|
||||
if(exploding && !exploded)
|
||||
message_admins("AME explosion at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) - Last touched by [fingerprintslast]",0,1)
|
||||
exploded=1
|
||||
|
||||
@@ -107,7 +107,7 @@ proc/cardinalrange(var/center)
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/process()
|
||||
/obj/machinery/am_shielding/machinery_process()
|
||||
if(!processing)
|
||||
. = PROCESS_KILL
|
||||
//TODO: core functions and stability
|
||||
|
||||
@@ -1081,7 +1081,7 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/apc/process()
|
||||
/obj/machinery/power/apc/machinery_process()
|
||||
|
||||
if(stat & (BROKEN|MAINT))
|
||||
return
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
|
||||
#define SMESRATE 0.05 // rate of internal charge to external power
|
||||
/obj/machinery/power/smes/batteryrack/makeshift/process()
|
||||
/obj/machinery/power/smes/batteryrack/makeshift/machinery_process()
|
||||
if(stat & BROKEN) return
|
||||
|
||||
//store machine state to see if we need to update the icon overlays
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//Input is searched from the 'dir' direction
|
||||
var/obj/structure/cable/input
|
||||
|
||||
/obj/machinery/logic/indicator/process()
|
||||
/obj/machinery/logic/indicator/machinery_process()
|
||||
if(input)
|
||||
return 1
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "bulb0"
|
||||
|
||||
/obj/machinery/logic/indicator/bulb/process()
|
||||
/obj/machinery/logic/indicator/bulb/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1 exists.
|
||||
return
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
//Output is searched from the 'dir' direction
|
||||
var/obj/structure/cable/output
|
||||
|
||||
/obj/machinery/logic/sensor/process()
|
||||
/obj/machinery/logic/sensor/machinery_process()
|
||||
if(output)
|
||||
return 1
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
icon = 'icons/obj/atmospherics/outlet_injector.dmi'
|
||||
icon_state = "off"
|
||||
|
||||
/obj/machinery/logic/sensor/constant_high/process()
|
||||
/obj/machinery/logic/sensor/constant_high/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1 exists.
|
||||
return
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
icon = 'icons/atmos/heat.dmi'
|
||||
icon_state = "intact"
|
||||
|
||||
/obj/machinery/logic/oneinput/process()
|
||||
/obj/machinery/logic/oneinput/machinery_process()
|
||||
if(input && output)
|
||||
return 1
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
return 0 //On the process() call, where everything is still being searched for, it returns 0. It will return 1 on the next process() call.
|
||||
|
||||
//NOT GATE
|
||||
/obj/machinery/logic/oneinput/not/process()
|
||||
/obj/machinery/logic/oneinput/not/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1, input2 and output exist.
|
||||
return
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
icon = 'icons/obj/atmospherics/mixer.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
/obj/machinery/logic/twoinput/process()
|
||||
/obj/machinery/logic/twoinput/machinery_process()
|
||||
if(input1 && input2 && output)
|
||||
return 1
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
return 0 //On the process() call, where everything is still being searched for, it returns 0. It will return 1 on the next process() call.
|
||||
|
||||
//AND GATE
|
||||
/obj/machinery/logic/twoinput/and/process()
|
||||
/obj/machinery/logic/twoinput/and/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1, input2 and output exist.
|
||||
return
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
pn_output.draw_power(LOGIC_HIGH) //Otherwise increase the load to 5
|
||||
|
||||
//OR GATE
|
||||
/obj/machinery/logic/twoinput/or/process()
|
||||
/obj/machinery/logic/twoinput/or/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1, input2 and output exist.
|
||||
return
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
pn_output.draw_power(LOGIC_HIGH) //Otherwise increase the load to 5
|
||||
|
||||
//XOR GATE
|
||||
/obj/machinery/logic/twoinput/xor/process()
|
||||
/obj/machinery/logic/twoinput/xor/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1, input2 and output exist.
|
||||
return
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
pn_output.draw_power(LOGIC_HIGH) //Otherwise increase the load to 5
|
||||
|
||||
//XNOR GATE (EQUIVALENCE)
|
||||
/obj/machinery/logic/twoinput/xnor/process()
|
||||
/obj/machinery/logic/twoinput/xnor/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1, input2 and output exist.
|
||||
return
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
#define RELAY_POWER_TRANSFER 2000 //How much power a relay transfers through.
|
||||
|
||||
//RELAY - input1 governs the flow from input2 to output
|
||||
/obj/machinery/logic/twoinput/relay/process()
|
||||
/obj/machinery/logic/twoinput/relay/machinery_process()
|
||||
if(!..()) //Parent proc checks if input1, input2 and output exist.
|
||||
return
|
||||
|
||||
@@ -289,4 +289,4 @@
|
||||
|
||||
|
||||
#undef RELAY_POWER_TRANSFER
|
||||
#undef LOGIC_HIGH
|
||||
#undef LOGIC_HIGH
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
/obj/machinery/power/fractal_reactor/New()
|
||||
..()
|
||||
if(!mapped_in)
|
||||
world << "<b><span class='warning'>WARNING:</span> Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</b>"
|
||||
world << "<b><span class='alert'>WARNING:</span> Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</b>"
|
||||
|
||||
/obj/machinery/power/fractal_reactor/process()
|
||||
/obj/machinery/power/fractal_reactor/machinery_process()
|
||||
if(!powernet && !powernet_connection_failed)
|
||||
if(!connect_to_network())
|
||||
powernet_connection_failed = 1
|
||||
spawn(150) // Error! Check again in 15 seconds.
|
||||
powernet_connection_failed = 0
|
||||
add_avail(power_generation_rate)
|
||||
add_avail(power_generation_rate)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user