Skip to content

Commit

Permalink
Fixes subsystems warnings (#11334)
Browse files Browse the repository at this point in the history
* fixes subsystems i guess

* fuck shuttle code

* fixes spatial gridmap init

* no need when limited feedback (mostly local environment)
  • Loading branch information
Dejaku51 authored Aug 22, 2024
1 parent 4e0720b commit 9ec9eb3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/blackbox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/movement/zfall.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions code/controllers/subsystem/natural_light_cycle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='boldannounce'>WARNING: Starlight is set to cycle, yet the colours that are set to be cycled is undefined.</span>");
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()
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/spatial_gridmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions code/modules/elevator/elevator_controller.dm
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 9ec9eb3

Please sign in to comment.