mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +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:
@@ -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)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if(!(stat & (NOPOWER|BROKEN)) && lastgenlev)
|
||||
add_overlay("teg-op[lastgenlev]")
|
||||
|
||||
/obj/machinery/power/generator/process()
|
||||
/obj/machinery/power/generator/machinery_process()
|
||||
if(!circ1 || !circ2 || !anchored || stat & (BROKEN|NOPOWER))
|
||||
stored_energy = 0
|
||||
return
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define GENRATE 800 // generator output coefficient from Q
|
||||
|
||||
|
||||
/obj/machinery/power/generator_type2/process()
|
||||
/obj/machinery/power/generator_type2/machinery_process()
|
||||
if(!input1 || !input2)
|
||||
return
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/open = 0
|
||||
var/recent_fault = 0
|
||||
var/power_output = 1
|
||||
has_special_power_checks = TRUE
|
||||
|
||||
/obj/machinery/power/port_gen/proc/IsBroken()
|
||||
return (stat & (BROKEN|EMPED))
|
||||
@@ -29,7 +30,7 @@
|
||||
/obj/machinery/power/port_gen/proc/handleInactive()
|
||||
return
|
||||
|
||||
/obj/machinery/power/port_gen/process()
|
||||
/obj/machinery/power/port_gen/machinery_process()
|
||||
if(active && HasFuel() && !IsBroken() && anchored && powernet)
|
||||
add_avail(power_gen * power_output)
|
||||
UseFuel()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/datum/nano_module/power_monitor/power_monitor
|
||||
|
||||
// Checks the sensors for alerts. If change (alerts cleared or detected) occurs, calls for icon update.
|
||||
/obj/machinery/computer/power_monitor/process()
|
||||
/obj/machinery/computer/power_monitor/machinery_process()
|
||||
var/alert = check_warnings()
|
||||
if(alert != alerting)
|
||||
alerting = !alerting
|
||||
|
||||
@@ -25,7 +25,7 @@ var/global/list/rad_collectors = list()
|
||||
rad_collectors -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
/obj/machinery/power/rad_collector/machinery_process()
|
||||
//so that we don't zero out the meter if the SM is processed first.
|
||||
last_power = last_power_new
|
||||
last_power_new = 0
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
src.use_power = 1 */
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/emitter/process()
|
||||
/obj/machinery/power/emitter/machinery_process()
|
||||
if(stat & (BROKEN))
|
||||
return
|
||||
if(src.state != 2 || (!powernet && active_power_usage))
|
||||
|
||||
@@ -58,7 +58,7 @@ field_generator power level display
|
||||
connected_gens = list()
|
||||
return
|
||||
|
||||
/obj/machinery/field_generator/process()
|
||||
/obj/machinery/field_generator/machinery_process()
|
||||
if(Varedit_start == 1)
|
||||
if(active == 0)
|
||||
active = 1
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/energy = 0
|
||||
var/creation_type = /obj/singularity
|
||||
|
||||
/obj/machinery/the_singularitygen/process()
|
||||
/obj/machinery/the_singularitygen/machinery_process()
|
||||
var/turf/T = get_turf(src)
|
||||
if(src.energy >= 200)
|
||||
new creation_type(T, 50)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/process()
|
||||
/obj/machinery/particle_accelerator/control_box/machinery_process()
|
||||
if(src.active)
|
||||
//a part is missing!
|
||||
if( length(connected_parts) < 6 )
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
inputting = 1
|
||||
// else inputting = 0, as set in process()
|
||||
|
||||
/obj/machinery/power/smes/process()
|
||||
/obj/machinery/power/smes/machinery_process()
|
||||
if(stat & BROKEN) return
|
||||
if(failure_timer) // Disabled by gridcheck.
|
||||
failure_timer--
|
||||
@@ -459,7 +459,7 @@
|
||||
output_level = 250000
|
||||
should_be_mapped = 1
|
||||
|
||||
/obj/machinery/power/smes/magical/process()
|
||||
/obj/machinery/power/smes/magical/machinery_process()
|
||||
charge = 5000000
|
||||
..()
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
// Parameters: None
|
||||
// Description: Uses parent process, but if grounding wire is cut causes sparks to fly around.
|
||||
// This also causes the SMES to quickly discharge, and has small chance of damaging output APCs.
|
||||
/obj/machinery/power/smes/buildable/process()
|
||||
/obj/machinery/power/smes/buildable/machinery_process()
|
||||
if(!grounding && (Percentage() > 5))
|
||||
spark(src, 5, alldirs)
|
||||
charge -= (output_level_max * SMESRATE)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
sunfrac = cos(p_angle) ** 2
|
||||
//isn't the power recieved from the incoming light proportionnal to cos(p_angle) (Lambert's cosine law) rather than cos(p_angle)^2 ?
|
||||
|
||||
/obj/machinery/power/solar/process()//TODO: remove/add this from machines to save on processing as needed ~Carn PRIORITY
|
||||
/obj/machinery/power/solar/machinery_process()//TODO: remove/add this from machines to save on processing as needed ~Carn PRIORITY
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(!sun || !control) //if there's no sun or the panel is not linked to a solar control computer, no need to proceed
|
||||
@@ -167,9 +167,8 @@
|
||||
/obj/machinery/power/solar/fake/Initialize(mapload, var/obj/item/solar_assembly/S)
|
||||
. = ..(mapload, S, 0)
|
||||
|
||||
/obj/machinery/power/solar/fake/process()
|
||||
. = PROCESS_KILL
|
||||
return
|
||||
/obj/machinery/power/solar/fake/machinery_process()
|
||||
return PROCESS_KILL
|
||||
|
||||
//trace towards sun to see if we're in shadow
|
||||
/obj/machinery/power/solar/proc/occlusion()
|
||||
@@ -429,7 +428,7 @@
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar_control/process()
|
||||
/obj/machinery/power/solar_control/machinery_process()
|
||||
lastgen = gen
|
||||
gen = 0
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#define COMPFRICTION 5e5
|
||||
#define COMPSTARTERLOAD 2800
|
||||
|
||||
/obj/machinery/compressor/process()
|
||||
/obj/machinery/compressor/machinery_process()
|
||||
if(!starter)
|
||||
return
|
||||
overlays.Cut()
|
||||
@@ -117,7 +117,7 @@
|
||||
#define TURBGENQ 20000
|
||||
#define TURBGENG 0.8
|
||||
|
||||
/obj/machinery/power/turbine/process()
|
||||
/obj/machinery/power/turbine/machinery_process()
|
||||
if(!compressor.starter)
|
||||
return
|
||||
overlays.Cut()
|
||||
@@ -315,6 +315,6 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/turbine_computer/process()
|
||||
/obj/machinery/computer/turbine_computer/machinery_process()
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
@@ -423,7 +423,8 @@
|
||||
return process(targloc)
|
||||
|
||||
/obj/item/projectile/test/process(var/turf/targloc)
|
||||
while(src) //Loop on through!
|
||||
var/safety = 100 // We really never should need this to last longer than this number of iterations.
|
||||
while(!QDELING(src) && safety > 0) //Loop on through!
|
||||
if(result)
|
||||
return (result - 1)
|
||||
if((!( targloc ) || loc == targloc))
|
||||
@@ -442,6 +443,11 @@
|
||||
if(istype(M))
|
||||
return 1
|
||||
|
||||
safety--
|
||||
|
||||
if (safety < 0)
|
||||
crash_with("test projectile process() maximum iterations exceeded, aborting!")
|
||||
|
||||
//Helper proc to check if you can hit them or not.
|
||||
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=null)
|
||||
if(!istype(target) || !istype(firer))
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
// machine process
|
||||
// move items to the target location
|
||||
/obj/machinery/conveyor/process()
|
||||
/obj/machinery/conveyor/machinery_process()
|
||||
if(stat & (BROKEN | NOPOWER))
|
||||
return
|
||||
if(!operating)
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
|
||||
// timed process
|
||||
// charge the gas reservoir and perform flush if ready
|
||||
/obj/machinery/disposal/process()
|
||||
/obj/machinery/disposal/machinery_process()
|
||||
if(!air_contents || (stat & BROKEN)) // nothing can happen if broken
|
||||
update_use_power(0)
|
||||
return
|
||||
|
||||
@@ -31,7 +31,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/process()
|
||||
/obj/machinery/r_n_d/circuit_imprinter/machinery_process()
|
||||
..()
|
||||
if(stat)
|
||||
update_icon()
|
||||
|
||||
@@ -88,7 +88,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
|
||||
newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
|
||||
return newKey
|
||||
|
||||
/obj/machinery/message_server/process()
|
||||
/obj/machinery/message_server/machinery_process()
|
||||
//if(decryptkey == "password")
|
||||
// decryptkey = generateKey()
|
||||
if(active && (stat & (BROKEN|NOPOWER)))
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/process()
|
||||
/obj/machinery/r_n_d/protolathe/machinery_process()
|
||||
..()
|
||||
if(stat)
|
||||
update_icon()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
for(var/N in temp_list)
|
||||
id_with_download += text2num(N)
|
||||
|
||||
/obj/machinery/r_n_d/server/process()
|
||||
/obj/machinery/r_n_d/server/machinery_process()
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
switch(environment.temperature)
|
||||
if(0 to T0C)
|
||||
@@ -147,7 +147,7 @@
|
||||
server_ids += num
|
||||
no_id_servers -= S
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom/process()
|
||||
/obj/machinery/r_n_d/server/centcom/machinery_process()
|
||||
return PROCESS_KILL //don't need process()
|
||||
|
||||
/obj/machinery/computer/rdservercontrol
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
)
|
||||
|
||||
//todo: how the hell is the asteroid permanently powered?
|
||||
/obj/machinery/auto_cloner/process()
|
||||
/obj/machinery/auto_cloner/machinery_process()
|
||||
if(powered(power_channel))
|
||||
if(!previous_power_state)
|
||||
previous_power_state = 1
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
[pick("front","side","top","bottom","rear","inside")] of [src]. A [pick("slot","funnel","chute","tube")] opens up in the \
|
||||
[pick("front","side","top","bottom","rear","inside")].</span>"
|
||||
|
||||
/obj/machinery/replicator/process()
|
||||
/obj/machinery/replicator/machinery_process()
|
||||
if(spawning_types.len && powered())
|
||||
spawn_progress_time += world.time - last_process_time
|
||||
if(spawn_progress_time > max_spawn_time)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(prob(75))
|
||||
my_effect.trigger = rand(1,4)
|
||||
|
||||
/obj/machinery/artifact/process()
|
||||
/obj/machinery/artifact/machinery_process()
|
||||
|
||||
var/turf/L = loc
|
||||
if(isnull(L) || !istype(L)) // We're inside a container or on null turf, either way stop processing effects
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
user.set_machine(src)
|
||||
onclose(user, "artanalyser")
|
||||
|
||||
/obj/machinery/artifact_analyser/process()
|
||||
/obj/machinery/artifact_analyser/machinery_process()
|
||||
if(scan_in_progress && world.time > scan_completion_time)
|
||||
//finish scanning
|
||||
scan_in_progress = 0
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
user << browse(dat, "window=artharvester;size=450x500")
|
||||
onclose(user, "artharvester")
|
||||
|
||||
/obj/machinery/artifact_harvester/process()
|
||||
/obj/machinery/artifact_harvester/machinery_process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/radiocarbon_spectrometer/process()
|
||||
/obj/machinery/radiocarbon_spectrometer/machinery_process()
|
||||
if(scanning)
|
||||
if(!scanned_item || scanned_item.loc != src)
|
||||
scanned_item = null
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
src.cell = new/obj/item/weapon/cell/high(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/suspension_gen/process()
|
||||
/obj/machinery/suspension_gen/machinery_process()
|
||||
set background = 1
|
||||
|
||||
if (suspension_field)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
desc = "A weak forcefield which seems to be projected by the station's emergency atmosphere containment field"
|
||||
health = max_health/2 // Half health, it's not suposed to resist much.
|
||||
|
||||
/obj/machinery/shield/malfai/process()
|
||||
/obj/machinery/shield/malfai/machinery_process()
|
||||
health -= 0.5 // Slowly lose integrity over time
|
||||
check_failure()
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
create_shields()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/shieldgen/process()
|
||||
/obj/machinery/shieldgen/machinery_process()
|
||||
if (!active || (stat & NOPOWER))
|
||||
return
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
power = 1 // IVE GOT THE POWER!
|
||||
return 1
|
||||
|
||||
/obj/machinery/shieldwallgen/process()
|
||||
/obj/machinery/shieldwallgen/machinery_process()
|
||||
power()
|
||||
if(power)
|
||||
storedpower -= 2500 //the generator post itself uses some power
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
user << browse(t, "window=shield_capacitor;size=500x400")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/shield_capacitor/process()
|
||||
/obj/machinery/shield_capacitor/machinery_process()
|
||||
if (!anchored)
|
||||
active = 0
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
user << browse(t, "window=shield_generator;size=500x400")
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/shield_gen/process()
|
||||
/obj/machinery/shield_gen/machinery_process()
|
||||
if (!anchored && active)
|
||||
toggle()
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/supermatter/process()
|
||||
/obj/machinery/power/supermatter/machinery_process()
|
||||
|
||||
var/turf/L = loc
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
|
||||
/obj/machinery/disease2/diseaseanalyser/process()
|
||||
/obj/machinery/disease2/diseaseanalyser/machinery_process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/centrifuge/process()
|
||||
/obj/machinery/computer/centrifuge/machinery_process()
|
||||
if (inoperable()) return
|
||||
|
||||
if (curing)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/curer/process()
|
||||
/obj/machinery/computer/curer/machinery_process()
|
||||
if (inoperable())
|
||||
return
|
||||
use_power(500)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/process()
|
||||
/obj/machinery/computer/diseasesplicer/machinery_process()
|
||||
if (inoperable())
|
||||
return
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/disease2/incubator/process()
|
||||
/obj/machinery/disease2/incubator/machinery_process()
|
||||
if(dish && on && dish.virus2)
|
||||
use_power(50,EQUIP)
|
||||
if(!powered(EQUIP))
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/disease2/isolator/process()
|
||||
/obj/machinery/disease2/isolator/machinery_process()
|
||||
if (isolating > 0)
|
||||
isolating -= 1
|
||||
if (isolating == 0)
|
||||
|
||||
Reference in New Issue
Block a user