mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Minor Performance Tweaks (#3265)
changes: /datum/wires no longer has an (init) proc. SMES wires now use timers instead of spawn. Cleanables' random_icon_states list is now lazy. (eliminates ~4000 lists from dirt) /obj/effect can no longer be pushed around by conveyor belts. Lighting overlays are now explicitly prevented from being moved by conveyor belts.
This commit is contained in:
@@ -45,8 +45,7 @@ var/const/SMES_WIRE_FAILSAFES = 16 // Cut to disable failsafes, mend to reenable
|
||||
if(SMES_WIRE_RCON)
|
||||
if(S.RCon)
|
||||
S.RCon = 0
|
||||
spawn(10)
|
||||
S.RCon = 1
|
||||
addtimer(CALLBACK(S, /obj/machinery/power/smes/buildable/.proc/reset_rcon), 10)
|
||||
if(SMES_WIRE_INPUT)
|
||||
S.toggle_input()
|
||||
if(SMES_WIRE_OUTPUT)
|
||||
@@ -56,5 +55,10 @@ var/const/SMES_WIRE_FAILSAFES = 16 // Cut to disable failsafes, mend to reenable
|
||||
if(SMES_WIRE_FAILSAFES)
|
||||
if(S.safeties_enabled)
|
||||
S.safeties_enabled = 0
|
||||
spawn(10)
|
||||
S.safeties_enabled = 1
|
||||
addtimer(CALLBACK(S, /obj/machinery/power/smes/buildable/.proc/reset_safeties), 10)
|
||||
|
||||
/obj/machinery/power/smes/buildable/proc/reset_safeties()
|
||||
safeties_enabled = TRUE
|
||||
|
||||
/obj/machinery/power/smes/buildable/proc/reset_rcon()
|
||||
RCon = TRUE
|
||||
|
||||
@@ -17,8 +17,8 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
|
||||
var/wire_count = 0 // Max is 16
|
||||
var/wires_status = 0 // BITFLAG OF WIRES
|
||||
|
||||
var/list/wires = list()
|
||||
var/list/signallers = list()
|
||||
var/list/wires
|
||||
var/list/signallers
|
||||
|
||||
var/table_options = " align='center'"
|
||||
var/row_options1 = " width='80px'"
|
||||
@@ -27,7 +27,8 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
|
||||
var/window_y = 470
|
||||
|
||||
/datum/wires/New(var/atom/holder)
|
||||
..()
|
||||
wires = list()
|
||||
signallers = list()
|
||||
src.holder = holder
|
||||
if(!istype(holder, holder_type))
|
||||
CRASH("Our holder is null/the wrong type!")
|
||||
|
||||
Reference in New Issue
Block a user