From 9ec9eb30d3174e088e3c2b6dee618ab9a4a2db0e Mon Sep 17 00:00:00 2001 From: Dejaku51 <40302913+Dejaku51@users.noreply.github.com> Date: Thu, 22 Aug 2024 06:59:27 +0200 Subject: [PATCH] Fixes subsystems warnings (#11334) * fixes subsystems i guess * fuck shuttle code * fixes spatial gridmap init * no need when limited feedback (mostly local environment) --- code/__DEFINES/subsystems.dm | 1 - code/controllers/subsystem/blackbox.dm | 2 +- code/controllers/subsystem/movement/zfall.dm | 2 +- code/controllers/subsystem/natural_light_cycle.dm | 5 +++-- code/controllers/subsystem/spatial_gridmap.dm | 2 ++ code/modules/elevator/elevator_controller.dm | 7 +++---- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 187a593db2fa6..b37a72da289ea 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -174,7 +174,6 @@ #define INIT_ORDER_MINOR_MAPPING -40 #define INIT_ORDER_PATH -50 #define INIT_ORDER_EXPLOSIONS -69 -#define INIT_ORDER_ELEVATOR -70 #define INIT_ORDER_BAN_CACHE -98 //Near the end, logs the costs of initialize #define INIT_ORDER_INIT_PROFILER -99 diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index 0267da492a9e2..5b568b171a137 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -19,7 +19,7 @@ SUBSYSTEM_DEF(blackbox) /datum/controller/subsystem/blackbox/Initialize() triggertime = world.time if(CONFIG_GET(flag/limited_feedback)) - return ..() + return SS_INIT_NO_NEED record_feedback("amount", "random_seed", Master.random_seed) record_feedback("amount", "dm_version", DM_VERSION) record_feedback("amount", "dm_build", DM_BUILD) diff --git a/code/controllers/subsystem/movement/zfall.dm b/code/controllers/subsystem/movement/zfall.dm index 01d61635387b3..5217c1b5c7e65 100644 --- a/code/controllers/subsystem/movement/zfall.dm +++ b/code/controllers/subsystem/movement/zfall.dm @@ -1,7 +1,7 @@ /// Responsible for triggering mob zfalls when they are not already triggered by structure deconstruction or moving into openspace SUBSYSTEM_DEF(zfall) name = "Zfall" - flags = SS_TICKER + flags = SS_TICKER | SS_NO_INIT wait = 5 runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME priority = FIRE_PRIORITY_ZFALL diff --git a/code/controllers/subsystem/natural_light_cycle.dm b/code/controllers/subsystem/natural_light_cycle.dm index dc49b9e1614b9..2518bbd3822fe 100644 --- a/code/controllers/subsystem/natural_light_cycle.dm +++ b/code/controllers/subsystem/natural_light_cycle.dm @@ -9,13 +9,14 @@ SUBSYSTEM_DEF(natural_light_cycle) . = ..() if (SSmapping.config.starlight_mode != STARLIGHT_MODE_CYCLE) flags |= SS_NO_FIRE - return + return SS_INIT_NO_NEED cycle_colours = SSmapping.config.cycle_colours if (!islist(cycle_colours) || !length(cycle_colours)) to_chat(world, "WARNING: Starlight is set to cycle, yet the colours that are set to be cycled is undefined."); log_world("WARNING: Starlight is set to cycle, yet the colours that are set to be cycled is undefined.") flags |= SS_NO_FIRE - return SS_INIT_SUCCESS + return SS_INIT_FAILURE + return SS_INIT_SUCCESS /datum/controller/subsystem/natural_light_cycle/fire(resumed) var/time = station_time() diff --git a/code/controllers/subsystem/spatial_gridmap.dm b/code/controllers/subsystem/spatial_gridmap.dm index 672325d82b772..1337424866a06 100644 --- a/code/controllers/subsystem/spatial_gridmap.dm +++ b/code/controllers/subsystem/spatial_gridmap.dm @@ -139,6 +139,8 @@ SUBSYSTEM_DEF(spatial_grid) RegisterSignal(SSdcs, COMSIG_GLOB_NEW_Z, PROC_REF(propogate_spatial_grid_to_new_z)) RegisterSignal(SSdcs, COMSIG_GLOB_EXPANDED_WORLD_BOUNDS, PROC_REF(after_world_bounds_expanded)) + return SS_INIT_SUCCESS + ///add a movable to the pre init queue for whichever type is specified so that when the subsystem initializes they get added to the grid /datum/controller/subsystem/spatial_grid/proc/enter_pre_init_queue(atom/movable/waiting_movable, type) RegisterSignal(waiting_movable, COMSIG_PARENT_PREQDELETED, PROC_REF(queued_item_deleted), override = TRUE) diff --git a/code/modules/elevator/elevator_controller.dm b/code/modules/elevator/elevator_controller.dm index 42eb3da2c76d9..856a60eddcf0f 100644 --- a/code/modules/elevator/elevator_controller.dm +++ b/code/modules/elevator/elevator_controller.dm @@ -1,7 +1,6 @@ SUBSYSTEM_DEF(elevator_controller) name = "Elevator Controller" - flags = SS_NO_FIRE - init_order = INIT_ORDER_ELEVATOR + flags = SS_NO_FIRE | SS_NO_INIT ///List of elevator groups var/list/elevator_groups = list() ///List of elevator group positional stuff @@ -26,7 +25,7 @@ SUBSYSTEM_DEF(elevator_controller) if(!elevator_groups[id]) elevator_groups[id] = list() elevator_groups[id] |= EV - + /datum/controller/subsystem/elevator_controller/proc/move_elevator(id, destination_z, calltime, force) . = TRUE elevator_group_timers[id] = addtimer(CALLBACK(src, PROC_REF(finish_timer), id), calltime || 2 SECONDS, TIMER_STOPPABLE) @@ -46,7 +45,7 @@ SUBSYSTEM_DEF(elevator_controller) var/turf/T = locate(ES.x, ES.y, i) T.ChangeTurf(/turf/open/openspace) crashing = TRUE - + if(S.get_virtual_z_level() != destination_z) playsound(S, 'sound/effects/turbolift/turbolift.ogg', 45) SEND_SIGNAL(src, COMSIG_ELEVATOR_MOVE, id, destination_z, calltime, crashing)