From 5afadccfb5b3a9ad6523c378056a549bd20c54f8 Mon Sep 17 00:00:00 2001 From: Archie Date: Wed, 9 Jun 2021 18:33:20 -0300 Subject: [PATCH] free performance 1 --- code/controllers/subsystem/lighting.dm | 3 +-- .../subsystem/processing/flightpacks.dm | 26 +------------------ code/modules/lighting/lighting_object.dm | 5 +++- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm index 7eff66eb..ee444b6a 100644 --- a/code/controllers/subsystem/lighting.dm +++ b/code/controllers/subsystem/lighting.dm @@ -6,7 +6,6 @@ SUBSYSTEM_DEF(lighting) name = "Lighting" wait = 2 init_order = INIT_ORDER_LIGHTING - flags = SS_TICKER var/static/list/sources_queue = list() // List of lighting sources queued for update. var/static/list/corners_queue = list() // List of lighting corners queued for update. var/static/list/objects_queue = list() // List of lighting objects queued for update. @@ -88,4 +87,4 @@ SUBSYSTEM_DEF(lighting) /datum/controller/subsystem/lighting/Recover() initialized = SSlighting.initialized - ..() \ No newline at end of file + ..() diff --git a/code/controllers/subsystem/processing/flightpacks.dm b/code/controllers/subsystem/processing/flightpacks.dm index a462e2b6..8af9b568 100644 --- a/code/controllers/subsystem/processing/flightpacks.dm +++ b/code/controllers/subsystem/processing/flightpacks.dm @@ -1,25 +1 @@ -PROCESSING_SUBSYSTEM_DEF(flightpacks) - name = "Flightpack Movement" - priority = FIRE_PRIORITY_FLIGHTPACKS - wait = 2 - stat_tag = "FM" - flags = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING - - var/flightsuit_processing = FLIGHTSUIT_PROCESSING_FULL - -/datum/controller/subsystem/processing/flightpacks/Initialize() - sync_flightsuit_processing() - -/datum/controller/subsystem/processing/flightpacks/vv_edit_var(var_name, var_value) - ..() - switch(var_name) - if("flightsuit_processing") - sync_flightsuit_processing() - -/datum/controller/subsystem/processing/flightpacks/proc/sync_flightsuit_processing() - for(var/obj/item/flightpack/FP in processing) - FP.sync_processing(src) - if(flightsuit_processing == FLIGHTSUIT_PROCESSING_NONE) //Don't even bother firing. - can_fire = FALSE - else - can_fire = TRUE +//Dead subsystem is dead diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index c0c5a411..9ceb341f 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -5,7 +5,7 @@ icon = LIGHTING_ICON icon_state = "transparent" - color = LIGHTING_BASE_MATRIX + color = null //we manually set color in init instead plane = LIGHTING_PLANE mouse_opacity = MOUSE_OPACITY_TRANSPARENT layer = LIGHTING_LAYER @@ -17,6 +17,9 @@ /atom/movable/lighting_object/Initialize(mapload) . = ..() verbs.Cut() + //We avoid setting this in the base as if we do then the parent atom handling will add_atom_color it and that + //is totally unsuitable for this object, as we are always changing its colour manually + color = LIGHTING_BASE_MATRIX myturf = loc if (myturf.lighting_object)