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:
Lohikar
2017-06-12 19:09:36 +03:00
committed by skull132
parent 585a6c59dd
commit 0db557ac29
138 changed files with 204 additions and 179 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()