From e1098fe00c82e905fc7046394de26f9ba0de33a6 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Tue, 23 Apr 2024 23:55:40 +0300 Subject: [PATCH] [MIRROR] Implements data systems (#3042) * Implements data systems (#82816) Subsystems currently come in two different flavors: 1. Systems that process at intervals with the master controller 2. Global data containers that do not fire And I think they should be split up... This moves 4 non firing, non init subsytems -> datasystem Clarity in code * Implements data systems * Update ammo_workbench.dm --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com> Co-authored-by: Iajret --- code/__DEFINES/dcs/signals/signals_reagent.dm | 4 +-- code/__HELPERS/construction.dm | 2 +- code/__HELPERS/global_lists.dm | 4 +-- code/__HELPERS/mobs.dm | 24 ++++++++-------- code/__HELPERS/priority_announce.dm | 2 +- code/controllers/subsystem/dynamic/dynamic.dm | 6 ++-- .../subsystem/movement/cliff_falling.dm | 2 +- .../subsystem/movement/movement_types.dm | 28 +++++++++---------- code/datums/actions/mobs/charge.dm | 6 ++-- code/datums/ai/_ai_controller.dm | 2 +- code/datums/ai/monkey/monkey_behaviors.dm | 4 +-- code/datums/ai/movement/_ai_movement.dm | 2 +- .../movement/ai_movement_basic_avoidance.dm | 2 +- .../ai/movement/ai_movement_complete_stop.dm | 4 +-- code/datums/ai/movement/ai_movement_dumb.dm | 2 +- code/datums/ai/movement/ai_movement_jps.dm | 2 +- code/datums/components/conveyor_movement.dm | 2 +- code/datums/components/drift.dm | 2 +- code/datums/components/force_move.dm | 2 +- .../components/material/remote_materials.dm | 2 +- code/datums/components/shuttle_cling.dm | 2 +- code/datums/materials/_material.dm | 4 +-- .../proximity_monitor/fields/timestop.dm | 2 +- code/datums/systems/_system.dm | 16 +++++++++++ .../systems/ds}/battle_royale.dm | 11 ++++---- .../systems/ds}/communications.dm | 9 +++--- .../systems/ds}/materials.dm | 17 ++++++----- .../systems/ds}/move_handler.dm | 10 +++---- code/datums/systems/manager.dm | 14 ++++++++++ code/game/atom/atom_materials.dm | 2 +- code/game/machinery/autolathe.dm | 4 +-- .../game/machinery/computer/communications.dm | 20 ++++++------- code/game/machinery/recycler.dm | 2 +- code/game/machinery/syndicatebomb.dm | 8 +++--- .../anomalies/anomalies_dimensional.dm | 2 +- .../effects/decals/cleanable/aliens.dm | 2 +- .../effects/decals/cleanable/humans.dm | 4 +-- .../effects/decals/cleanable/robots.dm | 2 +- .../effects/effect_system/effect_system.dm | 2 +- .../effect_system/effects_explosion.dm | 2 +- .../effects/effect_system/effects_water.dm | 4 +-- .../effects/spawners/xeno_egg_delivery.dm | 4 +-- code/game/objects/effects/step_triggers.dm | 2 +- .../effects/temporary_visuals/effect_trail.dm | 2 +- .../objects/items/devices/battle_royale.dm | 2 +- code/game/objects/items/extinguisher.dm | 2 +- code/game/objects/items/machine_wand.dm | 2 +- code/game/objects/items/stacks/stack.dm | 6 ++-- code/game/objects/items/storage/bags.dm | 2 +- code/game/objects/items/tanks/watertank.dm | 2 +- .../transit_tubes/transit_tube_pod.dm | 2 +- code/game/world.dm | 4 +++ code/modules/admin/verbs/adminevents.dm | 12 ++++---- .../antagonists/pirate/pirate_event.dm | 2 +- .../antagonists/space_dragon/carp_rift.dm | 2 +- .../antagonists/wizard/equipment/artefact.dm | 2 +- code/modules/antagonists/xeno/xeno.dm | 6 ++-- .../events/immovable_rod/immovable_rod.dm | 12 ++++---- code/modules/events/shuttle_insurance.dm | 2 +- .../ruins/lavalandruin_code/biodome_winter.dm | 2 +- code/modules/meteors/meteor_types.dm | 2 +- code/modules/mining/machine_processing.dm | 2 +- code/modules/mining/machine_silo.dm | 2 +- code/modules/mob/living/init_signals.dm | 2 +- .../living/simple_animal/bot/SuperBeepsky.dm | 6 ++-- .../mob/living/simple_animal/bot/secbot.dm | 8 +++--- .../living/simple_animal/hostile/hostile.dm | 10 +++---- .../hostile/megafauna/colossus.dm | 18 ++++++------ .../hostile/mining_mobs/curse_blob.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 2 +- code/modules/mob/mob_movement.dm | 2 +- code/modules/mod/modules/modules_general.dm | 2 +- .../boxes_magazines/_box_magazine.dm | 2 +- .../reagents/reagent_containers/spray.dm | 2 +- code/modules/recycling/conveyor.dm | 8 +++--- code/modules/recycling/disposal/holder.dm | 2 +- code/modules/religion/rites.dm | 2 +- .../mecha/equipment/tools/other_tools.dm | 2 +- .../ammo_workbench/code/ammo_workbench.dm | 2 +- .../nanotrasen_consultant/console_ntr.dm | 6 ++-- tgstation.dme | 10 ++++--- 81 files changed, 219 insertions(+), 188 deletions(-) create mode 100644 code/datums/systems/_system.dm rename code/{controllers/subsystem => datums/systems/ds}/battle_royale.dm (96%) rename code/{controllers/subsystem => datums/systems/ds}/communications.dm (87%) rename code/{controllers/subsystem => datums/systems/ds}/materials.dm (92%) rename code/{controllers/subsystem/movement => datums/systems/ds}/move_handler.dm (91%) create mode 100644 code/datums/systems/manager.dm diff --git a/code/__DEFINES/dcs/signals/signals_reagent.dm b/code/__DEFINES/dcs/signals/signals_reagent.dm index 38d2ae92d9d..08993ad56de 100644 --- a/code/__DEFINES/dcs/signals/signals_reagent.dm +++ b/code/__DEFINES/dcs/signals/signals_reagent.dm @@ -19,8 +19,8 @@ ///from base of [/datum/reagent/proc/expose_atom]: (/turf, reac_volume) #define COMSIG_REAGENT_EXPOSE_TURF "reagent_expose_turf" -///from base of [/datum/controller/subsystem/materials/proc/InitializeMaterial]: (/datum/material) -#define COMSIG_MATERIALS_INIT_MAT "SSmaterials_init_mat" +///from base of [/datum/system/materials/proc/InitializeMaterial]: (/datum/material) +#define COMSIG_MATERIALS_INIT_MAT "DSmaterials_init_mat" ///from base of [/datum/component/multiple_lives/proc/respawn]: (mob/respawned_mob, gibbed, lives_left) #define COMSIG_ON_MULTIPLE_LIVES_RESPAWN "on_multiple_lives_respawn" diff --git a/code/__HELPERS/construction.dm b/code/__HELPERS/construction.dm index f7b0ece13f8..cf38f690c26 100644 --- a/code/__HELPERS/construction.dm +++ b/code/__HELPERS/construction.dm @@ -2,7 +2,7 @@ #define OPTIMAL_COST(cost)(max(1, round(cost))) /// Wrapper for fetching material references. Exists exclusively so that people don't need to wrap everything in a list every time. -#define GET_MATERIAL_REF(arguments...) SSmaterials._GetMaterialRef(list(##arguments)) +#define GET_MATERIAL_REF(arguments...) DSmaterials._GetMaterialRef(list(##arguments)) // Wrapper to convert material name into its source name #define MATERIAL_SOURCE(mat) "[mat.name]_material" diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 1bdd26aeb01..b49760b374f 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -173,8 +173,8 @@ GLOB.crafting_recipes += recipe var/list/material_stack_recipes = list( - SSmaterials.base_stack_recipes, - SSmaterials.rigid_stack_recipes, + DSmaterials.base_stack_recipes, + DSmaterials.rigid_stack_recipes, ) for(var/list/recipe_list in material_stack_recipes) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 03f34068194..95dc7888484 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -251,23 +251,23 @@ GLOBAL_LIST_EMPTY(species_list) * * Checks that `user` does not move, change hands, get stunned, etc. for the * given `delay`. Returns `TRUE` on success or `FALSE` on failure. - * + * * @param {mob} user - The mob performing the action. - * + * * @param {number} delay - The time in deciseconds. Use the SECONDS define for readability. `1 SECONDS` is 10 deciseconds. - * + * * @param {atom} target - The target of the action. This is where the progressbar will display. - * + * * @param {flag} timed_action_flags - Flags to control the behavior of the timed action. - * + * * @param {boolean} progress - Whether to display a progress bar / cogbar. - * + * * @param {datum/callback} extra_checks - Additional checks to perform before the action is executed. - * + * * @param {string} interaction_key - The assoc key under which the do_after is capped, with max_interact_count being the cap. Interaction key will default to target if not set. - * + * * @param {number} max_interact_count - The maximum amount of interactions allowed. - * + * * @param {boolean} hidden - By default, any action 1 second or longer shows a cog over the user while it is in progress. If hidden is set to TRUE, the cog will not be shown. */ /proc/do_after(mob/user, delay, atom/target, timed_action_flags = NONE, progress = TRUE, datum/callback/extra_checks, interaction_key, max_interact_count = 1, hidden = FALSE) @@ -288,7 +288,7 @@ GLOBAL_LIST_EMPTY(species_list) var/atom/target_loc = target?.loc var/drifting = FALSE - if(SSmove_manager.processing_on(user, SSspacedrift)) + if(DSmove_manager.processing_on(user, SSspacedrift)) drifting = TRUE var/holding = user.get_active_held_item() @@ -317,7 +317,7 @@ GLOBAL_LIST_EMPTY(species_list) if(!QDELETED(progbar)) progbar.update(world.time - starttime) - if(drifting && !SSmove_manager.processing_on(user, SSspacedrift)) + if(drifting && !DSmove_manager.processing_on(user, SSspacedrift)) drifting = FALSE user_loc = user.loc @@ -337,7 +337,7 @@ GLOBAL_LIST_EMPTY(species_list) if(!QDELETED(progbar)) progbar.end_progress() - + cog?.remove() if(interaction_key) diff --git a/code/__HELPERS/priority_announce.dm b/code/__HELPERS/priority_announce.dm index f63b90b83a1..8bc720c899c 100644 --- a/code/__HELPERS/priority_announce.dm +++ b/code/__HELPERS/priority_announce.dm @@ -107,7 +107,7 @@ message.title = title message.content = text - SScommunications.send_message(message) + DScommunications.send_message(message) /** * Sends a minor annoucement to players. diff --git a/code/controllers/subsystem/dynamic/dynamic.dm b/code/controllers/subsystem/dynamic/dynamic.dm index 0a19c532366..f12ccb913a4 100644 --- a/code/controllers/subsystem/dynamic/dynamic.dm +++ b/code/controllers/subsystem/dynamic/dynamic.dm @@ -317,7 +317,7 @@ SUBSYSTEM_DEF(dynamic) SSticker.news_report = SSshuttle.emergency?.is_hijacked() ? SHUTTLE_HIJACK : STATION_EVACUATED /datum/controller/subsystem/dynamic/proc/send_intercept() - if(SScommunications.block_command_report) //If we don't want the report to be printed just yet, we put it off until it's ready + if(DScommunications.block_command_report) //If we don't want the report to be printed just yet, we put it off until it's ready addtimer(CALLBACK(src, PROC_REF(send_intercept)), 10 SECONDS) return @@ -349,10 +349,10 @@ SUBSYSTEM_DEF(dynamic) if(trait_list_strings.len > 0) . += "
Identified shift divergencies:
" + trait_list_strings.Join() - if(length(SScommunications.command_report_footnotes)) + if(length(DScommunications.command_report_footnotes)) var/footnote_pile = "" - for(var/datum/command_footnote/footnote in SScommunications.command_report_footnotes) + for(var/datum/command_footnote/footnote in DScommunications.command_report_footnotes) footnote_pile += "[footnote.message]
" footnote_pile += "[footnote.signature]
" footnote_pile += "
" diff --git a/code/controllers/subsystem/movement/cliff_falling.dm b/code/controllers/subsystem/movement/cliff_falling.dm index 80e2f236eb7..65089f0ea1b 100644 --- a/code/controllers/subsystem/movement/cliff_falling.dm +++ b/code/controllers/subsystem/movement/cliff_falling.dm @@ -10,7 +10,7 @@ MOVEMENT_SUBSYSTEM_DEF(cliff_falling) /datum/controller/subsystem/movement/cliff_falling/proc/start_falling(atom/movable/faller, turf/open/cliff/cliff) // Make them move - var/mover = SSmove_manager.move(moving = faller, direction = cliff.fall_direction, delay = cliff.fall_speed, subsystem = src, priority = MOVEMENT_ABOVE_SPACE_PRIORITY, flags = MOVEMENT_LOOP_OUTSIDE_CONTROL | MOVEMENT_LOOP_NO_DIR_UPDATE) + var/mover = DSmove_manager.move(moving = faller, direction = cliff.fall_direction, delay = cliff.fall_speed, subsystem = src, priority = MOVEMENT_ABOVE_SPACE_PRIORITY, flags = MOVEMENT_LOOP_OUTSIDE_CONTROL | MOVEMENT_LOOP_NO_DIR_UPDATE) cliff_grinders[faller] = mover diff --git a/code/controllers/subsystem/movement/movement_types.dm b/code/controllers/subsystem/movement/movement_types.dm index ebb12c84e4b..3567e881b14 100644 --- a/code/controllers/subsystem/movement/movement_types.dm +++ b/code/controllers/subsystem/movement/movement_types.dm @@ -162,7 +162,7 @@ status &= ~MOVELOOP_STATUS_PAUSED ///Removes the atom from some movement subsystem. Defaults to SSmovement -/datum/controller/subsystem/move_manager/proc/stop_looping(atom/movable/moving, datum/controller/subsystem/movement/subsystem = SSmovement) +/datum/system/move_manager/proc/stop_looping(atom/movable/moving, datum/controller/subsystem/movement/subsystem = SSmovement) var/datum/movement_packet/our_info = moving.move_packet if(!our_info) return FALSE @@ -183,7 +183,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move(moving, direction, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move(moving, direction, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/move, priority, flags, extra_info, delay, timeout, direction) ///Replacement for walk() @@ -224,7 +224,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/force_move_dir(moving, direction, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/force_move_dir(moving, direction, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/move/force, priority, flags, extra_info, delay, timeout, direction) /datum/move_loop/move/force @@ -281,7 +281,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/force_move(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/force_move(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/has_target/force_move, priority, flags, extra_info, delay, timeout, chasing) ///Used for force-move loops @@ -315,7 +315,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/jps_move(moving, +/datum/system/move_manager/proc/jps_move(moving, chasing, delay, timeout, @@ -493,7 +493,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move_to(moving, chasing, min_dist, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move_to(moving, chasing, min_dist, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/has_target/dist_bound/move_to, priority, flags, extra_info, delay, timeout, chasing, min_dist) ///Wrapper around walk_to() @@ -527,7 +527,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move_away(moving, chasing, max_dist, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move_away(moving, chasing, max_dist, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/has_target/dist_bound/move_away, priority, flags, extra_info, delay, timeout, chasing, max_dist) ///Wrapper around walk_away() @@ -562,7 +562,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move_towards(moving, chasing, delay, home, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move_towards(moving, chasing, delay, home, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/has_target/move_towards, priority, flags, extra_info, delay, timeout, chasing, home) /** @@ -581,7 +581,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/home_onto(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/home_onto(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info) return move_towards(moving, chasing, delay, TRUE, timeout, subsystem, priority, flags, extra_info) ///Used as a alternative to walk_towards @@ -717,7 +717,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move_towards_legacy(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move_towards_legacy(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/has_target/move_towards_budget, priority, flags, extra_info, delay, timeout, chasing) ///The actual implementation of walk_towards() @@ -743,7 +743,7 @@ * priority - Defines how different move loops override each other. Lower numbers beat higher numbers, equal defaults to what currently exists. Defaults to MOVEMENT_DEFAULT_PRIORITY * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm */ -/datum/controller/subsystem/move_manager/proc/freeze(moving, halted_turf, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/freeze(moving, halted_turf, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/freeze, priority, flags, extra_info, delay, timeout, halted_turf) /// As close as you can get to a "do-nothing" move loop, the pure intention of this is to absolutely resist all and any automated movement until the move loop times out. @@ -767,7 +767,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move_rand(moving, directions, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move_rand(moving, directions, delay, timeout, subsystem, priority, flags, datum/extra_info) if(!directions) directions = GLOB.alldirs return add_to_loop(moving, subsystem, /datum/move_loop/move_rand, priority, flags, extra_info, delay, timeout, directions) @@ -819,7 +819,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move_to_rand(moving, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move_to_rand(moving, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/move_to_rand, priority, flags, extra_info, delay, timeout) ///Wrapper around step_rand @@ -845,7 +845,7 @@ * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm * **/ -/datum/controller/subsystem/move_manager/proc/move_disposals(moving, delay, timeout, subsystem, priority, flags, datum/extra_info) +/datum/system/move_manager/proc/move_disposals(moving, delay, timeout, subsystem, priority, flags, datum/extra_info) return add_to_loop(moving, subsystem, /datum/move_loop/disposal_holder, priority, flags, extra_info, delay, timeout) /// Disposal holders need to move through a chain of pipes diff --git a/code/datums/actions/mobs/charge.dm b/code/datums/actions/mobs/charge.dm index 3cca055a541..07c6330c71a 100644 --- a/code/datums/actions/mobs/charge.dm +++ b/code/datums/actions/mobs/charge.dm @@ -44,7 +44,7 @@ if(charger in charging) // Stop any existing charging, this'll clean things up properly - SSmove_manager.stop_looping(charger) + DSmove_manager.stop_looping(charger) charging += charger actively_moving = FALSE @@ -60,7 +60,7 @@ var/time_to_hit = min(get_dist(charger, target), charge_distance) * charge_speed - var/datum/move_loop/new_loop = SSmove_manager.home_onto(charger, target, delay = charge_speed, timeout = time_to_hit, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/new_loop = DSmove_manager.home_onto(charger, target, delay = charge_speed, timeout = time_to_hit, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) if(!new_loop) return RegisterSignal(new_loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move), override = TRUE) @@ -96,7 +96,7 @@ /datum/action/cooldown/mob_cooldown/charge/update_status_on_signal(mob/source, new_stat, old_stat) . = ..() if(new_stat == DEAD) - SSmove_manager.stop_looping(source) //This will cause the loop to qdel, triggering an end to our charging + DSmove_manager.stop_looping(source) //This will cause the loop to qdel, triggering an end to our charging /datum/action/cooldown/mob_cooldown/charge/proc/do_charge_indicator(atom/charger, atom/charge_target) var/turf/target_turf = get_turf(charge_target) diff --git a/code/datums/ai/_ai_controller.dm b/code/datums/ai/_ai_controller.dm index f5e59d39d82..c5717ceb044 100644 --- a/code/datums/ai/_ai_controller.dm +++ b/code/datums/ai/_ai_controller.dm @@ -279,7 +279,7 @@ multiple modular subtrees with behaviors /datum/ai_controller/process(seconds_per_tick) if(!able_to_run()) - SSmove_manager.stop_looping(pawn) //stop moving + DSmove_manager.stop_looping(pawn) //stop moving return //this should remove them from processing in the future through event-based stuff. if(!LAZYLEN(current_behaviors) && idle_behavior) diff --git a/code/datums/ai/monkey/monkey_behaviors.dm b/code/datums/ai/monkey/monkey_behaviors.dm index 659a590f78e..10a23acdabe 100644 --- a/code/datums/ai/monkey/monkey_behaviors.dm +++ b/code/datums/ai/monkey/monkey_behaviors.dm @@ -120,7 +120,7 @@ break if(target) - SSmove_manager.move_away(living_pawn, target, max_dist=MONKEY_ENEMY_VISION, delay=5) + DSmove_manager.move_away(living_pawn, target, max_dist=MONKEY_ENEMY_VISION, delay=5) return AI_BEHAVIOR_DELAY return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED @@ -161,7 +161,7 @@ controller.clear_blackboard_key(target_key) if(QDELETED(living_pawn)) // pawn can be null at this point return - SSmove_manager.stop_looping(living_pawn) + DSmove_manager.stop_looping(living_pawn) /// attack using a held weapon otherwise bite the enemy, then if we are angry there is a chance we might calm down a little /datum/ai_behavior/monkey_attack_mob/proc/monkey_attack(datum/ai_controller/controller, mob/living/target, seconds_per_tick, disarm) diff --git a/code/datums/ai/movement/_ai_movement.dm b/code/datums/ai/movement/_ai_movement.dm index 3f455b2acd0..a0a75bb227c 100644 --- a/code/datums/ai/movement/_ai_movement.dm +++ b/code/datums/ai/movement/_ai_movement.dm @@ -17,7 +17,7 @@ moving_controllers -= controller // We got deleted as we finished an action if(!QDELETED(controller.pawn)) - SSmove_manager.stop_looping(controller.pawn, SSai_movement) + DSmove_manager.stop_looping(controller.pawn, SSai_movement) /datum/ai_movement/proc/increment_pathing_failures(datum/ai_controller/controller) controller.consecutive_pathing_attempts++ diff --git a/code/datums/ai/movement/ai_movement_basic_avoidance.dm b/code/datums/ai/movement/ai_movement_basic_avoidance.dm index 6b48f1b5e9e..bcfe6833a8d 100644 --- a/code/datums/ai/movement/ai_movement_basic_avoidance.dm +++ b/code/datums/ai/movement/ai_movement_basic_avoidance.dm @@ -9,7 +9,7 @@ var/atom/movable/moving = controller.pawn var/min_dist = controller.blackboard[BB_CURRENT_MIN_MOVE_DISTANCE] var/delay = controller.movement_delay - var/datum/move_loop/loop = SSmove_manager.move_to(moving, current_movement_target, min_dist, delay, flags = move_flags, subsystem = SSai_movement, extra_info = controller) + var/datum/move_loop/loop = DSmove_manager.move_to(moving, current_movement_target, min_dist, delay, flags = move_flags, subsystem = SSai_movement, extra_info = controller) RegisterSignal(loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move)) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(post_move)) diff --git a/code/datums/ai/movement/ai_movement_complete_stop.dm b/code/datums/ai/movement/ai_movement_complete_stop.dm index dcae93f1ba0..31309256a67 100644 --- a/code/datums/ai/movement/ai_movement_complete_stop.dm +++ b/code/datums/ai/movement/ai_movement_complete_stop.dm @@ -8,8 +8,8 @@ var/stopping_time = controller.blackboard[BB_STATIONARY_SECONDS] var/delay_time = (stopping_time * 0.5) // no real reason to fire any more often than this really // assume that the current_movement_target is our location - var/datum/move_loop/loop = SSmove_manager.freeze(moving, current_movement_target, delay = delay_time, timeout = stopping_time, subsystem = SSai_movement, extra_info = controller) + var/datum/move_loop/loop = DSmove_manager.freeze(moving, current_movement_target, delay = delay_time, timeout = stopping_time, subsystem = SSai_movement, extra_info = controller) RegisterSignal(loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move)) /datum/ai_movement/complete_stop/allowed_to_move(datum/move_loop/source) - return FALSE + return FALSE diff --git a/code/datums/ai/movement/ai_movement_dumb.dm b/code/datums/ai/movement/ai_movement_dumb.dm index 06ac4bdd10c..a64a7539eec 100644 --- a/code/datums/ai/movement/ai_movement_dumb.dm +++ b/code/datums/ai/movement/ai_movement_dumb.dm @@ -7,7 +7,7 @@ . = ..() var/atom/movable/moving = controller.pawn var/delay = controller.movement_delay - var/datum/move_loop/loop = SSmove_manager.move_towards_legacy(moving, current_movement_target, delay, subsystem = SSai_movement, extra_info = controller) + var/datum/move_loop/loop = DSmove_manager.move_towards_legacy(moving, current_movement_target, delay, subsystem = SSai_movement, extra_info = controller) RegisterSignal(loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move)) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(post_move)) diff --git a/code/datums/ai/movement/ai_movement_jps.dm b/code/datums/ai/movement/ai_movement_jps.dm index 825feefabfa..ac16b0aaa23 100644 --- a/code/datums/ai/movement/ai_movement_jps.dm +++ b/code/datums/ai/movement/ai_movement_jps.dm @@ -12,7 +12,7 @@ var/atom/movable/moving = controller.pawn var/delay = controller.movement_delay - var/datum/move_loop/has_target/jps/loop = SSmove_manager.jps_move(moving, + var/datum/move_loop/has_target/jps/loop = DSmove_manager.jps_move(moving, current_movement_target, delay, repath_delay = 0.5 SECONDS, diff --git a/code/datums/components/conveyor_movement.dm b/code/datums/components/conveyor_movement.dm index d8affca3649..61a0066ff4a 100644 --- a/code/datums/components/conveyor_movement.dm +++ b/code/datums/components/conveyor_movement.dm @@ -15,7 +15,7 @@ if(!start_delay) start_delay = speed var/atom/movable/moving_parent = parent - var/datum/move_loop/loop = SSmove_manager.move(moving_parent, direction, delay = start_delay, subsystem = SSconveyors, flags=MOVEMENT_LOOP_IGNORE_PRIORITY|MOVEMENT_LOOP_OUTSIDE_CONTROL) + var/datum/move_loop/loop = DSmove_manager.move(moving_parent, direction, delay = start_delay, subsystem = SSconveyors, flags=MOVEMENT_LOOP_IGNORE_PRIORITY|MOVEMENT_LOOP_OUTSIDE_CONTROL) RegisterSignal(loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(should_move)) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(loop_ended)) diff --git a/code/datums/components/drift.dm b/code/datums/components/drift.dm index 6b91a83534f..f8ad46e3ec3 100644 --- a/code/datums/components/drift.dm +++ b/code/datums/components/drift.dm @@ -23,7 +23,7 @@ if(instant) flags |= MOVEMENT_LOOP_START_FAST var/atom/movable/movable_parent = parent - drifting_loop = SSmove_manager.move(moving = parent, direction = direction, delay = movable_parent.inertia_move_delay, subsystem = SSspacedrift, priority = MOVEMENT_SPACE_PRIORITY, flags = flags) + drifting_loop = DSmove_manager.move(moving = parent, direction = direction, delay = movable_parent.inertia_move_delay, subsystem = SSspacedrift, priority = MOVEMENT_SPACE_PRIORITY, flags = flags) if(!drifting_loop) //Really want to qdel here but can't return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/force_move.dm b/code/datums/components/force_move.dm index b8c36818621..6c1c1e38e5f 100644 --- a/code/datums/components/force_move.dm +++ b/code/datums/components/force_move.dm @@ -9,7 +9,7 @@ var/mob/mob_parent = parent var/dist = get_dist(mob_parent, target) - var/datum/move_loop/loop = SSmove_manager.move_towards(mob_parent, target, delay = 1, timeout = dist) + var/datum/move_loop/loop = DSmove_manager.move_towards(mob_parent, target, delay = 1, timeout = dist) RegisterSignal(mob_parent, COMSIG_MOB_CLIENT_PRE_LIVING_MOVE, PROC_REF(stop_move)) RegisterSignal(mob_parent, COMSIG_ATOM_PRE_PRESSURE_PUSH, PROC_REF(stop_pressure)) if(spin) diff --git a/code/datums/components/material/remote_materials.dm b/code/datums/components/material/remote_materials.dm index 568b018e58b..695a02bcb96 100644 --- a/code/datums/components/material/remote_materials.dm +++ b/code/datums/components/material/remote_materials.dm @@ -86,7 +86,7 @@ handles linking back and forth. mat_container = parent.AddComponent( \ /datum/component/material_container, \ - SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ + DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ local_size, \ mat_container_flags, \ container_signals = mat_container_signals, \ diff --git a/code/datums/components/shuttle_cling.dm b/code/datums/components/shuttle_cling.dm index 6702b9d601d..724060c9cbe 100644 --- a/code/datums/components/shuttle_cling.dm +++ b/code/datums/components/shuttle_cling.dm @@ -51,7 +51,7 @@ update_state(parent) //otherwise we'll get moved 1 tile before we can correct ourselves, which isnt super bad but just looks jank /datum/component/shuttle_cling/proc/initialize_loop() - hyperloop = SSmove_manager.move(moving = parent, direction = direction, delay = not_clinging_move_delay, subsystem = SShyperspace_drift, priority = MOVEMENT_ABOVE_SPACE_PRIORITY, flags = MOVEMENT_LOOP_NO_DIR_UPDATE|MOVEMENT_LOOP_OUTSIDE_CONTROL) + hyperloop = DSmove_manager.move(moving = parent, direction = direction, delay = not_clinging_move_delay, subsystem = SShyperspace_drift, priority = MOVEMENT_ABOVE_SPACE_PRIORITY, flags = MOVEMENT_LOOP_NO_DIR_UPDATE|MOVEMENT_LOOP_OUTSIDE_CONTROL) update_state() /datum/component/shuttle_cling/proc/clear_loop() diff --git a/code/datums/materials/_material.dm b/code/datums/materials/_material.dm index da5a15b8d31..9d6b8674728 100644 --- a/code/datums/materials/_material.dm +++ b/code/datums/materials/_material.dm @@ -10,7 +10,7 @@ Simple datum which is instanced once per type and is used for every object of sa var/name = "material" /// A short description of the material. Not used anywhere, yet... var/desc = "its..stuff." - /// What the material is indexed by in the SSmaterials.materials list. Defaults to the type of the material. + /// What the material is indexed by in the DSmaterials.materials list. Defaults to the type of the material. var/id ///Base color of the material, is used for greyscale. Item isn't changed in color if this is null. @@ -23,7 +23,7 @@ Simple datum which is instanced once per type and is used for every object of sa ///Starlight color of the material ///This is the color of light it'll emit if its turf is transparent and over space. Defaults to COLOR_STARLIGHT if not set var/starlight_color - ///Bitflags that influence how SSmaterials handles this material. + ///Bitflags that influence how DSmaterials handles this material. var/init_flags = MATERIAL_INIT_MAPLOAD ///Materials "Traits". its a map of key = category | Value = Bool. Used to define what it can be used for var/list/categories = list() diff --git a/code/datums/proximity_monitor/fields/timestop.dm b/code/datums/proximity_monitor/fields/timestop.dm index a3e22483c7a..91e13c79142 100644 --- a/code/datums/proximity_monitor/fields/timestop.dm +++ b/code/datums/proximity_monitor/fields/timestop.dm @@ -214,7 +214,7 @@ frozen_mobs += victim victim.Stun(20, ignore_canstun = TRUE) victim.add_traits(list(TRAIT_MUTE, TRAIT_EMOTEMUTE), TIMESTOP_TRAIT) - SSmove_manager.stop_looping(victim) //stops them mid pathing even if they're stunimmune //This is really dumb + DSmove_manager.stop_looping(victim) //stops them mid pathing even if they're stunimmune //This is really dumb if(isanimal(victim)) var/mob/living/simple_animal/animal_victim = victim animal_victim.toggle_ai(AI_OFF) diff --git a/code/datums/systems/_system.dm b/code/datums/systems/_system.dm new file mode 100644 index 00000000000..fe3271048ab --- /dev/null +++ b/code/datums/systems/_system.dm @@ -0,0 +1,16 @@ +#define NEW_DS_GLOBAL(varname) if(varname != src){if(istype(varname)){qdel(varname);}varname = src;} + +#define DATASYSTEM_DEF(X) GLOBAL_REAL(DS##X, /datum/system/##X);\ +/datum/system/##X/New(){\ + NEW_DS_GLOBAL(DS##X);\ +}\ +/datum/system/##X + + +/** + * Global systems which are distinct from subsystems in that they do not process by the MC. + * Data systems or "DS" are used to store round information and procs to interface with that data, if needed. + */ +/datum/system + /// Name of the system + var/name = "Datum System" diff --git a/code/controllers/subsystem/battle_royale.dm b/code/datums/systems/ds/battle_royale.dm similarity index 96% rename from code/controllers/subsystem/battle_royale.dm rename to code/datums/systems/ds/battle_royale.dm index 139a5aa8b49..1cdc7358a56 100644 --- a/code/controllers/subsystem/battle_royale.dm +++ b/code/datums/systems/ds/battle_royale.dm @@ -7,7 +7,7 @@ GLOBAL_LIST_INIT(battle_royale_regions, list( ), "Research Division" = list( /area/station/command/heads_quarters/rd, - /area/station/security/checkpoint/science, + /area/station/security/checkpoint/science, /area/station/science, ), "Engineering Bay" = list( @@ -24,14 +24,13 @@ GLOBAL_LIST_INIT(battle_royale_regions, list( )) /// Basically just exists to hold references to datums so that they don't GC -SUBSYSTEM_DEF(battle_royale) +DATASYSTEM_DEF(battle_royale) name = "Battle Royale" - flags = SS_NO_INIT | SS_NO_FIRE /// List of battle royale datums currently running var/list/active_battles /// Start a new battle royale using a passed list of implants -/datum/controller/subsystem/battle_royale/proc/start_battle(list/competitors) +/datum/system/battle_royale/proc/start_battle(list/competitors) var/datum/battle_royale_controller/controller = new() if (!controller.start(competitors)) return FALSE @@ -42,7 +41,7 @@ SUBSYSTEM_DEF(battle_royale) return TRUE /// Drop reference when it kills itself -/datum/controller/subsystem/battle_royale/proc/battle_ended(datum/source) +/datum/system/battle_royale/proc/battle_ended(datum/source) SIGNAL_HANDLER LAZYREMOVE(active_battles, source) if (!LAZYLEN(active_battles)) @@ -52,7 +51,7 @@ SUBSYSTEM_DEF(battle_royale) /// Datum which controls the conflict /datum/battle_royale_controller /// Where is our battle taking place? - var/chosen_area + var/chosen_area /// Is the battle currently in progress? var/battle_running = TRUE /// Should we let everyone know that someone has died? diff --git a/code/controllers/subsystem/communications.dm b/code/datums/systems/ds/communications.dm similarity index 87% rename from code/controllers/subsystem/communications.dm rename to code/datums/systems/ds/communications.dm index dfdeea26962..6effa3f5e9c 100644 --- a/code/controllers/subsystem/communications.dm +++ b/code/datums/systems/ds/communications.dm @@ -2,9 +2,8 @@ #define COMMUNICATION_COOLDOWN_AI (30 SECONDS) #define COMMUNICATION_COOLDOWN_MEETING (5 MINUTES) -SUBSYSTEM_DEF(communications) +DATASYSTEM_DEF(communications) name = "Communications" - flags = SS_NO_INIT | SS_NO_FIRE COOLDOWN_DECLARE(silicon_message_cooldown) COOLDOWN_DECLARE(nonsilicon_message_cooldown) @@ -21,7 +20,7 @@ SUBSYSTEM_DEF(communications) /// The location where the special xenomorph egg was planted var/area/captivity_area -/datum/controller/subsystem/communications/proc/can_announce(mob/living/user, is_silicon) +/datum/system/communications/proc/can_announce(mob/living/user, is_silicon) if(is_silicon && COOLDOWN_FINISHED(src, silicon_message_cooldown)) return TRUE else if(!is_silicon && COOLDOWN_FINISHED(src, nonsilicon_message_cooldown)) @@ -29,7 +28,7 @@ SUBSYSTEM_DEF(communications) else return FALSE -/datum/controller/subsystem/communications/proc/make_announcement(mob/living/user, is_silicon, input, syndicate, list/players) +/datum/system/communications/proc/make_announcement(mob/living/user, is_silicon, input, syndicate, list/players) if(!can_announce(user, is_silicon)) return FALSE if(is_silicon) @@ -45,7 +44,7 @@ SUBSYSTEM_DEF(communications) user.log_talk(input, LOG_SAY, tag="priority announcement") message_admins("[ADMIN_LOOKUPFLW(user)] has made a priority announcement.") -/datum/controller/subsystem/communications/proc/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE) +/datum/system/communications/proc/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE) for(var/obj/machinery/computer/communications/C in GLOB.shuttle_caller_list) if(!(C.machine_stat & (BROKEN|NOPOWER)) && is_station_level(C.z)) if(unique) diff --git a/code/controllers/subsystem/materials.dm b/code/datums/systems/ds/materials.dm similarity index 92% rename from code/controllers/subsystem/materials.dm rename to code/datums/systems/ds/materials.dm index 25efd8695dc..527c1a3d642 100644 --- a/code/controllers/subsystem/materials.dm +++ b/code/datums/systems/ds/materials.dm @@ -1,13 +1,12 @@ /*! How material datums work -Materials are now instanced datums, with an associative list of them being kept in SSmaterials. We only instance the materials once and then re-use these instances for everything. +Materials are now instanced datums, with an associative list of them being kept in DSmaterials. We only instance the materials once and then re-use these instances for everything. These materials call on_applied() on whatever item they are applied to, common effects are adding components, changing color and changing description. This allows us to differentiate items based on the material they are made out of.area */ -SUBSYSTEM_DEF(materials) +DATASYSTEM_DEF(materials) name = "Materials" - flags = SS_NO_FIRE | SS_NO_INIT ///Dictionary of material.id || material ref var/list/materials ///Dictionary of type || list of material refs @@ -37,7 +36,7 @@ SUBSYSTEM_DEF(materials) var/list/datum/dimension_theme/dimensional_themes ///Ran on initialize, populated the materials and materials_by_category dictionaries with their appropiate vars (See these variables for more info) -/datum/controller/subsystem/materials/proc/InitializeMaterials() +/datum/system/materials/proc/InitializeMaterials() materials = list() materials_by_type = list() materialids_by_type = list() @@ -58,7 +57,7 @@ SUBSYSTEM_DEF(materials) * - [arguments][/list]: The arguments to use to create the material datum * - The first element is the type of material to initialize. */ -/datum/controller/subsystem/materials/proc/InitializeMaterial(list/arguments) +/datum/system/materials/proc/InitializeMaterial(list/arguments) var/datum/material/mat_type = arguments[1] if(initial(mat_type.init_flags) & MATERIAL_INIT_BESPOKE) arguments[1] = GetIdFromArguments(arguments) @@ -90,13 +89,13 @@ SUBSYSTEM_DEF(materials) * - If the material type is bespoke a text ID is generated from the arguments list and used to load a material datum from the cache. * - The following elements are used to generate bespoke IDs */ -/datum/controller/subsystem/materials/proc/_GetMaterialRef(list/arguments) +/datum/system/materials/proc/_GetMaterialRef(list/arguments) if(!materials) InitializeMaterials() var/datum/material/key = arguments[1] if(istype(key)) - return key // We are assuming here that the only thing allowed to create material datums is [/datum/controller/subsystem/materials/proc/InitializeMaterial] + return key // We are assuming here that the only thing allowed to create material datums is [/datum/system/materials/proc/InitializeMaterial] if(istext(key)) // Handle text id . = materials[key] @@ -124,7 +123,7 @@ SUBSYSTEM_DEF(materials) * Named arguments can appear in any order and we need them to appear after ordered arguments * We assume that no one will pass in a named argument with a value of null **/ -/datum/controller/subsystem/materials/proc/GetIdFromArguments(list/arguments) +/datum/system/materials/proc/GetIdFromArguments(list/arguments) var/datum/material/mattype = arguments[1] var/list/fullid = list("[initial(mattype.id) || mattype]") var/list/named_arguments = list() @@ -150,7 +149,7 @@ SUBSYSTEM_DEF(materials) /// Returns a list to be used as an object's custom_materials. Lists will be cached and re-used based on the parameters. -/datum/controller/subsystem/materials/proc/FindOrCreateMaterialCombo(list/materials_declaration, multiplier) +/datum/system/materials/proc/FindOrCreateMaterialCombo(list/materials_declaration, multiplier) if(!LAZYLEN(materials_declaration)) return null // If we get a null we pass it right back, we don't want to generate stack traces just because something is clearing out its materials list. diff --git a/code/controllers/subsystem/movement/move_handler.dm b/code/datums/systems/ds/move_handler.dm similarity index 91% rename from code/controllers/subsystem/movement/move_handler.dm rename to code/datums/systems/ds/move_handler.dm index fcc5c1c6504..dc3458627ef 100644 --- a/code/controllers/subsystem/movement/move_handler.dm +++ b/code/datums/systems/ds/move_handler.dm @@ -17,16 +17,14 @@ * * You can find the logic for this control in this file * - * Specifics of how different loops operate can be found in the movement_types.dm file, alongside the [add to loop][/datum/controller/subsystem/move_manager/proc/add_to_loop] helper procs that use them + * Specifics of how different loops operate can be found in the movement_types.dm file, alongside the [add to loop][/datum/system/move_manager/proc/add_to_loop] helper procs that use them * **/ -SUBSYSTEM_DEF(move_manager) +DATASYSTEM_DEF(move_manager) name = "Movement Handler" - flags = SS_NO_INIT | SS_NO_FIRE - runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME ///Adds a movable thing to a movement subsystem. Returns TRUE if it all worked, FALSE if it failed somehow -/datum/controller/subsystem/move_manager/proc/add_to_loop(atom/movable/thing_to_add, datum/controller/subsystem/movement/subsystem = SSmovement, datum/move_loop/loop_type, priority = MOVEMENT_DEFAULT_PRIORITY, flags, datum/extra_info) +/datum/system/move_manager/proc/add_to_loop(atom/movable/thing_to_add, datum/controller/subsystem/movement/subsystem = SSmovement, datum/move_loop/loop_type, priority = MOVEMENT_DEFAULT_PRIORITY, flags, datum/extra_info) var/datum/movement_packet/our_data = thing_to_add.move_packet if(!our_data) our_data = new(thing_to_add) @@ -35,7 +33,7 @@ SUBSYSTEM_DEF(move_manager) return our_data.add_loop(arglist(arguments)) ///Returns the subsystem's loop if we're processing on it, null otherwise -/datum/controller/subsystem/move_manager/proc/processing_on(atom/movable/packet_owner, datum/controller/subsystem/movement/subsystem) +/datum/system/move_manager/proc/processing_on(atom/movable/packet_owner, datum/controller/subsystem/movement/subsystem) var/datum/movement_packet/packet = packet_owner.move_packet if(!packet) return diff --git a/code/datums/systems/manager.dm b/code/datums/systems/manager.dm new file mode 100644 index 00000000000..0d5fdb8b839 --- /dev/null +++ b/code/datums/systems/manager.dm @@ -0,0 +1,14 @@ +// See initialization order in /code/game/world.dm +GLOBAL_REAL(SysMgr, /datum/system_manager) + + +/** + * Initializes all data systems and keeps track of them. + */ +/datum/system_manager + /// List of managed data systems, post initialization. + var/list/datum/system/managed = list() + + +/datum/system_manager/New() + init_subtypes(/datum/system, managed) diff --git a/code/game/atom/atom_materials.dm b/code/game/atom/atom_materials.dm index 345a8486dd6..deb27140257 100644 --- a/code/game/atom/atom_materials.dm +++ b/code/game/atom/atom_materials.dm @@ -23,7 +23,7 @@ var/datum/material/custom_material = GET_MATERIAL_REF(current_material) custom_material.on_applied(src, OPTIMAL_COST(materials[current_material] * multiplier * material_modifier), material_flags) - custom_materials = SSmaterials.FindOrCreateMaterialCombo(materials, multiplier) + custom_materials = DSmaterials.FindOrCreateMaterialCombo(materials, multiplier) /** * Returns the material composition of the atom. diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 296a9031ae2..02dfa624d35 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -32,7 +32,7 @@ /obj/machinery/autolathe/Initialize(mapload) materials = AddComponent( \ /datum/component/material_container, \ - SSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL], \ + DSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL], \ 0, \ MATCONTAINER_EXAMINE, \ container_signals = list(COMSIG_MATCONTAINER_ITEM_CONSUMED = TYPE_PROC_REF(/obj/machinery/autolathe, AfterMaterialInsert)) \ @@ -252,7 +252,7 @@ var/amount_needed = design.materials[material] if(istext(material)) // category var/list/choices = list() - for(var/datum/material/valid_candidate as anything in SSmaterials.materials_by_category[material]) + for(var/datum/material/valid_candidate as anything in DSmaterials.materials_by_category[material]) if(materials.get_material_amount(valid_candidate) < amount_needed) continue choices[valid_candidate.name] = valid_candidate diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index bd15f5f9f4c..48d547a822f 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -335,7 +335,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) if (!message) return - SScommunications.soft_filtering = FALSE + DScommunications.soft_filtering = FALSE var/list/hard_filter_result = is_ic_filtered(message) if(hard_filter_result) tgui_alert(usr, "Your message contains: (\"[hard_filter_result[CHAT_FILTER_INDEX_WORD]]\"), which is not allowed on this server.") @@ -347,7 +347,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) return message_admins("[ADMIN_LOOKUPFLW(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". They may be using a disallowed term for a cross-station message. Increasing delay time to reject.\n\n Message: \"[html_encode(message)]\"") log_admin_private("[key_name(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". They may be using a disallowed term for a cross-station message. Increasing delay time to reject.\n\n Message: \"[message]\"") - SScommunications.soft_filtering = TRUE + DScommunications.soft_filtering = TRUE playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) @@ -358,13 +358,13 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) GLOB.admins, span_adminnotice( \ "CROSS-SECTOR MESSAGE (OUTGOING): [ADMIN_LOOKUPFLW(usr)] is about to send \ - the following message to [destination] (will autoapprove in [SScommunications.soft_filtering ? DisplayTimeText(EXTENDED_CROSS_SECTOR_CANCEL_TIME) : DisplayTimeText(CROSS_SECTOR_CANCEL_TIME)]): \ + the following message to [destination] (will autoapprove in [DScommunications.soft_filtering ? DisplayTimeText(EXTENDED_CROSS_SECTOR_CANCEL_TIME) : DisplayTimeText(CROSS_SECTOR_CANCEL_TIME)]): \ REJECT
\ [html_encode(message)]" \ ) ) - send_cross_comms_message_timer = addtimer(CALLBACK(src, PROC_REF(send_cross_comms_message), usr, destination, message), SScommunications.soft_filtering ? EXTENDED_CROSS_SECTOR_CANCEL_TIME : CROSS_SECTOR_CANCEL_TIME, TIMER_STOPPABLE) + send_cross_comms_message_timer = addtimer(CALLBACK(src, PROC_REF(send_cross_comms_message), usr, destination, message), DScommunications.soft_filtering ? EXTENDED_CROSS_SECTOR_CANCEL_TIME : CROSS_SECTOR_CANCEL_TIME, TIMER_STOPPABLE) COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN) if ("setState") @@ -443,7 +443,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) state = STATE_MAIN playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE) imprint_gps(gps_tag = "Encrypted Communications Channel") - + if ("toggleEmergencyAccess") if(emergency_access_cooldown(usr)) //if were in cooldown, dont allow the following code return @@ -550,7 +550,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) var/network_name = CONFIG_GET(string/cross_comms_network) if(network_name) payload["network"] = network_name - if(SScommunications.soft_filtering) + if(DScommunications.soft_filtering) payload["is_filtered"] = TRUE var/name_to_send = "[CONFIG_GET(string/cross_comms_name)]([station_name()])" //NOVA EDIT ADDITION @@ -560,7 +560,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) usr.log_talk(message, LOG_SAY, tag = "message to the other server") message_admins("[ADMIN_LOOKUPFLW(usr)] has sent a message to the other server\[s].") deadchat_broadcast(" has sent an outgoing message to the other station(s).", "[usr.real_name]", usr, message_type = DEADCHAT_ANNOUNCEMENT) - SScommunications.soft_filtering = FALSE // set it to false at the end of the proc to ensure that everything prior reads as intended + DScommunications.soft_filtering = FALSE // set it to false at the end of the proc to ensure that everything prior reads as intended /obj/machinery/computer/communications/ui_data(mob/user) var/list/data = list( @@ -725,7 +725,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) return deltimer(send_cross_comms_message_timer) - SScommunications.soft_filtering = FALSE + DScommunications.soft_filtering = FALSE send_cross_comms_message_timer = null log_admin("[key_name(usr)] has cancelled the outgoing cross-comms message.") @@ -798,7 +798,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) /obj/machinery/computer/communications/proc/make_announcement(mob/living/user) var/is_ai = HAS_SILICON_ACCESS(user) - if(!SScommunications.can_announce(user, is_ai)) + if(!DScommunications.can_announce(user, is_ai)) to_chat(user, span_alert("Intercomms recharging. Please stand by.")) return var/input = tgui_input_text(user, "Message to announce to the station crew", "Announcement") @@ -819,7 +819,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) ) var/list/players = get_communication_players() - SScommunications.make_announcement(user, is_ai, input, syndicate || (obj_flags & EMAGGED), players) + DScommunications.make_announcement(user, is_ai, input, syndicate || (obj_flags & EMAGGED), players) deadchat_broadcast(" made a priority announcement from [span_name("[get_area_name(usr, TRUE)]")].", span_name("[user.real_name]"), user, message_type=DEADCHAT_ANNOUNCEMENT) /obj/machinery/computer/communications/proc/get_communication_players() diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 28aae488866..9df7d584f42 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -21,7 +21,7 @@ /obj/machinery/recycler/Initialize(mapload) materials = AddComponent( /datum/component/material_container, \ - SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ + DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ INFINITY, \ MATCONTAINER_NO_INSERT \ ) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 693668e9e89..154b03e0f98 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -606,7 +606,7 @@ var/datum/radial_menu_choice/null_choice = new null_choice.name = DIMENSION_CHOICE_RANDOM choosable_dimensions[DIMENSION_CHOICE_RANDOM] = null_choice - for(var/datum/dimension_theme/theme as anything in SSmaterials.dimensional_themes) + for(var/datum/dimension_theme/theme as anything in DSmaterials.dimensional_themes) var/datum/radial_menu_choice/theme_choice = new theme_choice.image = image(initial(theme.icon), initial(theme.icon_state)) theme_choice.name = initial(theme.name) @@ -628,14 +628,14 @@ /obj/item/bombcore/dimensional/detonate() var/list/affected_turfs = circle_range_turfs(src, range_heavy) - var/theme_count = length(SSmaterials.dimensional_themes) + var/theme_count = length(DSmaterials.dimensional_themes) var/num_affected = 0 for(var/turf/affected as anything in affected_turfs) var/datum/dimension_theme/theme_to_use if(isnull(chosen_theme)) - theme_to_use = SSmaterials.dimensional_themes[SSmaterials.dimensional_themes[rand(1, theme_count)]] + theme_to_use = DSmaterials.dimensional_themes[DSmaterials.dimensional_themes[rand(1, theme_count)]] else - theme_to_use = SSmaterials.dimensional_themes[chosen_theme] + theme_to_use = DSmaterials.dimensional_themes[chosen_theme] if(!theme_to_use.can_convert(affected)) continue num_affected++ diff --git a/code/game/objects/effects/anomalies/anomalies_dimensional.dm b/code/game/objects/effects/anomalies/anomalies_dimensional.dm index 026c5974d5f..a4ebfc21f1a 100644 --- a/code/game/objects/effects/anomalies/anomalies_dimensional.dm +++ b/code/game/objects/effects/anomalies/anomalies_dimensional.dm @@ -51,7 +51,7 @@ /obj/effect/anomaly/dimensional/proc/prepare_area(new_theme_path) if (!new_theme_path) new_theme_path = pick(subtypesof(/datum/dimension_theme)) - theme = SSmaterials.dimensional_themes[new_theme_path] + theme = DSmaterials.dimensional_themes[new_theme_path] apply_theme_icon() target_turfs = list() diff --git a/code/game/objects/effects/decals/cleanable/aliens.dm b/code/game/objects/effects/decals/cleanable/aliens.dm index 4f4b2543792..fb87f788036 100644 --- a/code/game/objects/effects/decals/cleanable/aliens.dm +++ b/code/game/objects/effects/decals/cleanable/aliens.dm @@ -47,7 +47,7 @@ break return - var/datum/move_loop/loop = SSmove_manager.move(src, direction, delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move(src, direction, delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(spread_movement_effects)) /obj/effect/decal/cleanable/xenoblood/xgibs/proc/spread_movement_effects(datum/move_loop/has_target/source) diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index d9fb0e76b61..0e6a6943bdd 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -163,7 +163,7 @@ break return - var/datum/move_loop/loop = SSmove_manager.move_to(src, get_step(src, direction), delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move_to(src, get_step(src, direction), delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(spread_movement_effects)) /obj/effect/decal/cleanable/blood/gibs/proc/spread_movement_effects(datum/move_loop/has_target/source) @@ -376,7 +376,7 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache) /// Set the splatter up to fly through the air until it rounds out of steam or hits something /obj/effect/decal/cleanable/blood/hitsplatter/proc/fly_towards(turf/target_turf, range) var/delay = 2 - var/datum/move_loop/loop = SSmove_manager.move_towards(src, target_turf, delay, timeout = delay * range, priority = MOVEMENT_ABOVE_SPACE_PRIORITY, flags = MOVEMENT_LOOP_START_FAST) + var/datum/move_loop/loop = DSmove_manager.move_towards(src, target_turf, delay, timeout = delay * range, priority = MOVEMENT_ABOVE_SPACE_PRIORITY, flags = MOVEMENT_LOOP_START_FAST) RegisterSignal(loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move)) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(post_move)) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(loop_done)) diff --git a/code/game/objects/effects/decals/cleanable/robots.dm b/code/game/objects/effects/decals/cleanable/robots.dm index d248b5e691d..77034850a0b 100644 --- a/code/game/objects/effects/decals/cleanable/robots.dm +++ b/code/game/objects/effects/decals/cleanable/robots.dm @@ -32,7 +32,7 @@ break return - var/datum/move_loop/loop = SSmove_manager.move(src, direction, delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move(src, direction, delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(spread_movement_effects)) /obj/effect/decal/cleanable/robot_debris/proc/spread_movement_effects(datum/move_loop/has_target/source) diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index 9d2d13f9925..9e5418a94f4 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -67,7 +67,7 @@ would spawn and follow the beaker, even if it is carried or thrown. var/step_amt = pick(1,2,3) var/step_delay = 5 - var/datum/move_loop/loop = SSmove_manager.move(effect, direction, step_delay, timeout = step_delay * step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move(effect, direction, step_delay, timeout = step_delay * step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(decrement_total_effect)) /datum/effect_system/proc/decrement_total_effect(datum/source) diff --git a/code/game/objects/effects/effect_system/effects_explosion.dm b/code/game/objects/effects/effect_system/effects_explosion.dm index 32be64c9353..9153d4151b3 100644 --- a/code/game/objects/effects/effect_system/effects_explosion.dm +++ b/code/game/objects/effects/effect_system/effects_explosion.dm @@ -11,7 +11,7 @@ /obj/effect/particle_effect/expl_particles/LateInitialize() var/step_amt = pick(25;1,50;2,100;3,200;4) - var/datum/move_loop/loop = SSmove_manager.move(src, pick(GLOB.alldirs), 1, timeout = step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move(src, pick(GLOB.alldirs), 1, timeout = step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(end_particle)) /obj/effect/particle_effect/expl_particles/proc/end_particle(datum/source) diff --git a/code/game/objects/effects/effect_system/effects_water.dm b/code/game/objects/effects/effect_system/effects_water.dm index 2edca60a320..6444cf3d0ee 100644 --- a/code/game/objects/effects/effect_system/effects_water.dm +++ b/code/game/objects/effects/effect_system/effects_water.dm @@ -38,7 +38,7 @@ /// Starts the effect moving at a target with a delay in deciseconds, and a lifetime in moves /// Returns the created loop /obj/effect/particle_effect/water/extinguisher/proc/move_at(atom/target, delay, lifetime) - var/datum/move_loop/loop = SSmove_manager.move_towards_legacy(src, target, delay, timeout = delay * lifetime, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move_towards_legacy(src, target, delay, timeout = delay * lifetime, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(post_forcemove)) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(movement_stopped)) return loop @@ -63,7 +63,7 @@ // Stomach acid doesn't use legacy because it's not "targeted", and we instead want the circular sorta look /obj/effect/particle_effect/water/extinguisher/stomach_acid/move_at(atom/target, delay, lifetime) - var/datum/move_loop/loop = SSmove_manager.move_towards(src, target, delay, timeout = delay * lifetime, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move_towards(src, target, delay, timeout = delay * lifetime, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(post_forcemove)) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(movement_stopped)) return loop diff --git a/code/game/objects/effects/spawners/xeno_egg_delivery.dm b/code/game/objects/effects/spawners/xeno_egg_delivery.dm index b09a37f14b1..e87b27e0913 100644 --- a/code/game/objects/effects/spawners/xeno_egg_delivery.dm +++ b/code/game/objects/effects/spawners/xeno_egg_delivery.dm @@ -25,5 +25,5 @@ /obj/structure/alien/egg/delivery/Initialize(mapload) . = ..() - SScommunications.xenomorph_egg_delivered = TRUE - SScommunications.captivity_area = get_area(src) + DScommunications.xenomorph_egg_delivered = TRUE + DScommunications.captivity_area = get_area(src) diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index ecfa560bfe6..874104c9202 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -70,7 +70,7 @@ ADD_TRAIT(AM, TRAIT_IMMOBILIZED, REF(src)) affecting[AM] = AM.dir - var/datum/move_loop/loop = SSmove_manager.move(AM, direction, speed, tiles ? tiles * speed : INFINITY) + var/datum/move_loop/loop = DSmove_manager.move(AM, direction, speed, tiles ? tiles * speed : INFINITY) RegisterSignal(loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move)) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(post_move)) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(set_to_normal)) diff --git a/code/game/objects/effects/temporary_visuals/effect_trail.dm b/code/game/objects/effects/temporary_visuals/effect_trail.dm index 028e5141653..2fd7d41d22c 100644 --- a/code/game/objects/effects/temporary_visuals/effect_trail.dm +++ b/code/game/objects/effects/temporary_visuals/effect_trail.dm @@ -29,7 +29,7 @@ AddElement(/datum/element/floor_loving) AddComponent(/datum/component/spawner, spawn_types = list(spawned_effect), max_spawned = max_spawned, spawn_time = spawn_interval) src.target = target - movement = SSmove_manager.move_towards(src, chasing = target, delay = move_speed, home = homing, timeout = duration, flags = MOVEMENT_LOOP_START_FAST) + movement = DSmove_manager.move_towards(src, chasing = target, delay = move_speed, home = homing, timeout = duration, flags = MOVEMENT_LOOP_START_FAST) RegisterSignal(target, COMSIG_QDELETING, PROC_REF(on_target_invalid)) if (isliving(target)) diff --git a/code/game/objects/items/devices/battle_royale.dm b/code/game/objects/items/devices/battle_royale.dm index b4ea15c6de7..4a47b164f43 100644 --- a/code/game/objects/items/devices/battle_royale.dm +++ b/code/game/objects/items/devices/battle_royale.dm @@ -78,7 +78,7 @@ balloon_alert(user, "[required_contestants - contestant_count] contestants needed!") return - SSbattle_royale.start_battle(implanted_implants) + DSbattle_royale.start_battle(implanted_implants) for (var/obj/implanter as anything in linked_implanters) do_sparks(3, cardinal_only = FALSE, source = implanter) diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm index ba65b6a9974..54307a3359d 100644 --- a/code/game/objects/items/extinguisher.dm +++ b/code/game/objects/items/extinguisher.dm @@ -258,7 +258,7 @@ //Chair movement loop /obj/item/extinguisher/proc/move_chair(obj/buckled_object, movementdirection) - var/datum/move_loop/loop = SSmove_manager.move(buckled_object, movementdirection, 1, timeout = 9, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move(buckled_object, movementdirection, 1, timeout = 9, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) //This means the chair slowing down is dependant on the extinguisher existing, which is weird //Couldn't figure out a better way though RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(manage_chair_speed)) diff --git a/code/game/objects/items/machine_wand.dm b/code/game/objects/items/machine_wand.dm index c1dd0bf382d..7ce94b9ad40 100644 --- a/code/game/objects/items/machine_wand.dm +++ b/code/game/objects/items/machine_wand.dm @@ -150,7 +150,7 @@ CRASH("a moving bug has been created but isn't moving towards anything!") src.controller = controller src.thing_moving_towards = thing_moving_towards - var/datum/move_loop/loop = SSmove_manager.home_onto(src, thing_moving_towards, delay = 5, flags = MOVEMENT_LOOP_NO_DIR_UPDATE) + var/datum/move_loop/loop = DSmove_manager.home_onto(src, thing_moving_towards, delay = 5, flags = MOVEMENT_LOOP_NO_DIR_UPDATE) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(reached_destination_check)) RegisterSignal(thing_moving_towards, COMSIG_QDELETING, PROC_REF(on_machine_del)) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 18a95cd77d3..83235796a45 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -110,9 +110,9 @@ for(var/category in what_are_we_made_of.categories) switch(category) if(MAT_CATEGORY_BASE_RECIPES) - recipes |= SSmaterials.base_stack_recipes.Copy() + recipes |= DSmaterials.base_stack_recipes.Copy() if(MAT_CATEGORY_RIGID) - recipes |= SSmaterials.rigid_stack_recipes.Copy() + recipes |= DSmaterials.rigid_stack_recipes.Copy() update_weight() update_appearance() @@ -131,7 +131,7 @@ * - multiplier: The amount to multiply the mats per unit by. Defaults to 1. */ /obj/item/stack/proc/set_mats_per_unit(list/mats, multiplier=1) - mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(mats, multiplier) + mats_per_unit = DSmaterials.FindOrCreateMaterialCombo(mats, multiplier) update_custom_materials() /** Updates the custom materials list of this stack. diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 71731bd80c0..9b4ead49a56 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -406,7 +406,7 @@ /obj/item/storage/bag/tray/proc/do_scatter(obj/item/tray_item) var/delay = rand(2,4) - var/datum/move_loop/loop = SSmove_manager.move_rand(tray_item, list(NORTH,SOUTH,EAST,WEST), delay, timeout = rand(1, 2) * delay, flags = MOVEMENT_LOOP_START_FAST) + var/datum/move_loop/loop = DSmove_manager.move_rand(tray_item, list(NORTH,SOUTH,EAST,WEST), delay, timeout = rand(1, 2) * delay, flags = MOVEMENT_LOOP_START_FAST) //This does mean scattering is tied to the tray. Not sure how better to handle it RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(change_speed)) diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 9950b8e9c93..5cef642634a 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -309,7 +309,7 @@ user.log_message("used Resin Launcher", LOG_GAME) playsound(src,'sound/items/syringeproj.ogg',40,TRUE) var/delay = 2 - var/datum/move_loop/loop = SSmove_manager.move_towards(resin, target, delay, timeout = delay * 5, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/loop = DSmove_manager.move_towards(resin, target, delay, timeout = delay * 5, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(resin_stop_check)) RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(resin_landed)) return diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index b1168302f68..48848df0fd5 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -94,7 +94,7 @@ moving = TRUE current_tube = tube - var/datum/move_loop/engine = SSmove_manager.force_move_dir(src, dir, 0, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/engine = DSmove_manager.force_move_dir(src, dir, 0, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) RegisterSignal(engine, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(before_pipe_transfer)) RegisterSignal(engine, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(after_pipe_transfer)) RegisterSignal(engine, COMSIG_QDELETING, PROC_REF(engine_finish)) diff --git a/code/game/world.dm b/code/game/world.dm index 1c922b8929c..57dc1c7c716 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -17,6 +17,7 @@ GLOBAL_VAR(restart_counter) * - world.init_byond_tracy() * - (Start native profiling) * - world.init_debugger() + * - SysMgr (all data systems) * - Master => * - config *unloaded * - (all subsystems) PreInit() @@ -84,6 +85,9 @@ GLOBAL_VAR(restart_counter) // Create the logger logger = new + // Initialize all the data systems + SysMgr = new + // THAT'S IT, WE'RE DONE, THE. FUCKING. END. Master = new diff --git a/code/modules/admin/verbs/adminevents.dm b/code/modules/admin/verbs/adminevents.dm index 44cb8a9685f..6805c8a1691 100644 --- a/code/modules/admin/verbs/adminevents.dm +++ b/code/modules/admin/verbs/adminevents.dm @@ -253,11 +253,11 @@ ADMIN_VERB(run_weather, R_FUN, "Run Weather", "Triggers specific weather on the ADMIN_VERB(command_report_footnote, R_ADMIN, "Command Report Footnote", "Adds a footnote to the roundstart command report.", ADMIN_CATEGORY_EVENTS) var/datum/command_footnote/command_report_footnote = new /datum/command_footnote() - SScommunications.block_command_report += 1 //Add a blocking condition to the counter until the inputs are done. + DScommunications.block_command_report += 1 //Add a blocking condition to the counter until the inputs are done. command_report_footnote.message = tgui_input_text(user, "This message will be attached to the bottom of the roundstart threat report. Be sure to delay the roundstart report if you need extra time.", "P.S.") if(!command_report_footnote.message) - SScommunications.block_command_report -= 1 + DScommunications.block_command_report -= 1 qdel(command_report_footnote) return @@ -266,8 +266,8 @@ ADMIN_VERB(command_report_footnote, R_ADMIN, "Command Report Footnote", "Adds a if(!command_report_footnote.signature) command_report_footnote.signature = "Classified" - SScommunications.command_report_footnotes += command_report_footnote - SScommunications.block_command_report-- + DScommunications.command_report_footnotes += command_report_footnote + DScommunications.block_command_report-- message_admins("[user] has added a footnote to the command report: [command_report_footnote.message], signed [command_report_footnote.signature]") @@ -276,5 +276,5 @@ ADMIN_VERB(command_report_footnote, R_ADMIN, "Command Report Footnote", "Adds a var/signature ADMIN_VERB(delay_command_report, R_FUN, "Delay Command Report", "Prevents the roundstart command report from being sent; or forces it to send it delayed.", ADMIN_CATEGORY_EVENTS) - SScommunications.block_command_report = !SScommunications.block_command_report - message_admins("[key_name_admin(user)] has [(SScommunications.block_command_report ? "delayed" : "sent")] the roundstart command report.") + DScommunications.block_command_report = !DScommunications.block_command_report + message_admins("[key_name_admin(user)] has [(DScommunications.block_command_report ? "delayed" : "sent")] the roundstart command report.") diff --git a/code/modules/antagonists/pirate/pirate_event.dm b/code/modules/antagonists/pirate/pirate_event.dm index e4a14182d0e..40cf038a214 100644 --- a/code/modules/antagonists/pirate/pirate_event.dm +++ b/code/modules/antagonists/pirate/pirate_event.dm @@ -42,7 +42,7 @@ priority_announce("Incoming subspace communication. Secure channel opened at all communication consoles.", "Incoming Message", SSstation.announcer.get_rand_report_sound()) threat.answer_callback = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(pirates_answered), threat, chosen_gang, payoff, world.time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(spawn_pirates), threat, chosen_gang), RESPONSE_MAX_TIME) - SScommunications.send_message(threat, unique = TRUE) + DScommunications.send_message(threat, unique = TRUE) /proc/pirates_answered(datum/comm_message/threat, datum/pirate_gang/chosen_gang, payoff, initial_send_time) if(world.time > initial_send_time + RESPONSE_MAX_TIME) diff --git a/code/modules/antagonists/space_dragon/carp_rift.dm b/code/modules/antagonists/space_dragon/carp_rift.dm index e003bf76e4d..8a74d4b63da 100644 --- a/code/modules/antagonists/space_dragon/carp_rift.dm +++ b/code/modules/antagonists/space_dragon/carp_rift.dm @@ -160,7 +160,7 @@ newcarp.faction = dragon.owner.current.faction.Copy() if(SPT_PROB(1.5, seconds_per_tick)) var/rand_dir = pick(GLOB.cardinals) - SSmove_manager.move_to(src, get_step(src, rand_dir), 1) + DSmove_manager.move_to(src, get_step(src, rand_dir), 1) return // Increase time trackers and check for any updated states. diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 44d00f3c170..222fcb39d16 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -362,7 +362,7 @@ qdel(src) return RegisterSignal(src, COMSIG_MOVABLE_CROSS_OVER, PROC_REF(check_teleport)) - SSmove_manager.move_towards(src, get_turf(whistle.whistler)) + DSmove_manager.move_towards(src, get_turf(whistle.whistler)) /// Check if anything the tornado crosses is the creator. /obj/effect/temp_visual/teleporting_tornado/proc/check_teleport(datum/source, atom/movable/crossed) diff --git a/code/modules/antagonists/xeno/xeno.dm b/code/modules/antagonists/xeno/xeno.dm index 115e40ca595..d2e0bddd0dd 100644 --- a/code/modules/antagonists/xeno/xeno.dm +++ b/code/modules/antagonists/xeno/xeno.dm @@ -87,7 +87,7 @@ explanation_text = "Escape from captivity." /datum/objective/escape_captivity/check_completion() - if(!istype(get_area(owner), SScommunications.captivity_area)) + if(!istype(get_area(owner), DScommunications.captivity_area)) return TRUE /datum/objective/advance_hive @@ -146,7 +146,7 @@ if(!captive_alien || captive_alien.stat == DEAD) return CAPTIVE_XENO_DEAD - if(istype(get_area(captive_alien), SScommunications.captivity_area)) + if(istype(get_area(captive_alien), DScommunications.captivity_area)) return CAPTIVE_XENO_FAIL return CAPTIVE_XENO_PASS @@ -155,7 +155,7 @@ /mob/living/carbon/alien/mind_initialize() ..() if(!mind.has_antag_datum(/datum/antagonist/xeno)) - if(SScommunications.xenomorph_egg_delivered && istype(get_area(src), SScommunications.captivity_area)) + if(DScommunications.xenomorph_egg_delivered && istype(get_area(src), DScommunications.captivity_area)) mind.add_antag_datum(/datum/antagonist/xeno/captive) else mind.add_antag_datum(/datum/antagonist/xeno) diff --git a/code/modules/events/immovable_rod/immovable_rod.dm b/code/modules/events/immovable_rod/immovable_rod.dm index a4cc4d4d683..658d2d07bd8 100644 --- a/code/modules/events/immovable_rod/immovable_rod.dm +++ b/code/modules/events/immovable_rod/immovable_rod.dm @@ -45,9 +45,9 @@ RegisterSignal(src, COMSIG_ATOM_ENTERING, PROC_REF(on_entering_atom)) if(special_target) - SSmove_manager.home_onto(src, special_target) + DSmove_manager.home_onto(src, special_target) else - SSmove_manager.move_towards(src, real_destination) + DSmove_manager.move_towards(src, real_destination) /obj/effect/immovablerod/Destroy(force) UnregisterSignal(src, COMSIG_ATOM_ENTERING) @@ -113,7 +113,7 @@ return visible_message(span_danger("[src] phases into reality.")) - SSmove_manager.home_onto(src, special_target) + DSmove_manager.home_onto(src, special_target) if(loc == target_turf) complete_trajectory() @@ -264,7 +264,7 @@ * Stops your rod's automated movement. Sit... Stay... Good rod! */ /obj/effect/immovablerod/proc/sit_stay_good_rod() - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) /** * Allows your rod to release restraint level zero and go for a walk. @@ -278,7 +278,7 @@ /obj/effect/immovablerod/proc/go_for_a_walk(walkies_location = null) if(walkies_location) special_target = walkies_location - SSmove_manager.home_onto(src, special_target) + DSmove_manager.home_onto(src, special_target) return complete_trajectory() @@ -294,7 +294,7 @@ */ /obj/effect/immovablerod/proc/walk_in_direction(direction) destination_turf = get_edge_target_turf(src, direction) - SSmove_manager.move_towards(src, destination_turf) + DSmove_manager.move_towards(src, destination_turf) /** * Rod will push the tram to a landmark if it hits the tram from the front/back diff --git a/code/modules/events/shuttle_insurance.dm b/code/modules/events/shuttle_insurance.dm index 4fce9c556b8..fed6ad9af9e 100644 --- a/code/modules/events/shuttle_insurance.dm +++ b/code/modules/events/shuttle_insurance.dm @@ -43,7 +43,7 @@ /datum/round_event/shuttle_insurance/start() insurance_message = new("Shuttle Insurance", "Hey, pal, this is the [ship_name]. Can't help but notice you're rocking a wild and crazy shuttle there with NO INSURANCE! Crazy. What if something happened to it, huh?! We've done a quick evaluation on your rates in this sector and we're offering [insurance_evaluation] to cover for your shuttle in case of any disaster.", list("Purchase Insurance.","Reject Offer.")) insurance_message.answer_callback = CALLBACK(src, PROC_REF(answered)) - SScommunications.send_message(insurance_message, unique = TRUE) + DScommunications.send_message(insurance_message, unique = TRUE) /datum/round_event/shuttle_insurance/proc/answered() if(EMERGENCY_AT_LEAST_DOCKED) diff --git a/code/modules/mapfluff/ruins/lavalandruin_code/biodome_winter.dm b/code/modules/mapfluff/ruins/lavalandruin_code/biodome_winter.dm index 150b4c5e44b..55fe9e77eac 100644 --- a/code/modules/mapfluff/ruins/lavalandruin_code/biodome_winter.dm +++ b/code/modules/mapfluff/ruins/lavalandruin_code/biodome_winter.dm @@ -45,5 +45,5 @@ else if(isliving(hit_atom)) var/mob/living/hit_mob = hit_atom - SSmove_manager.stop_looping(hit_mob) //stops them mid pathing even if they're stunimmune + DSmove_manager.stop_looping(hit_mob) //stops them mid pathing even if they're stunimmune hit_mob.apply_status_effect(/datum/status_effect/ice_block_talisman, 3 SECONDS) diff --git a/code/modules/meteors/meteor_types.dm b/code/modules/meteors/meteor_types.dm index 2b37a55aaa4..d7a7dd14002 100644 --- a/code/modules/meteors/meteor_types.dm +++ b/code/modules/meteors/meteor_types.dm @@ -76,7 +76,7 @@ /obj/effect/meteor/proc/chase_target(atom/chasing, delay, home) if(!isatom(chasing)) return - var/datum/move_loop/new_loop = SSmove_manager.move_towards(src, chasing, delay, home, lifetime) + var/datum/move_loop/new_loop = DSmove_manager.move_towards(src, chasing, delay, home, lifetime) if(!new_loop) return diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 61318f63b92..2eaa1d95db9 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -152,7 +152,7 @@ materials = AddComponent( \ /datum/component/material_container, \ - SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ + DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ INFINITY, \ MATCONTAINER_EXAMINE, \ allowed_items = accepted_type \ diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index 97c3a90b78e..5096f00a770 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -20,7 +20,7 @@ materials = AddComponent( \ /datum/component/material_container, \ - SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ + DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \ INFINITY, \ MATCONTAINER_EXAMINE, \ container_signals = list( \ diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm index 2bf3cc72dbe..c0506cdd451 100644 --- a/code/modules/mob/living/init_signals.dm +++ b/code/modules/mob/living/init_signals.dm @@ -103,7 +103,7 @@ SIGNAL_HANDLER mobility_flags &= ~MOBILITY_MOVE if(living_flags & MOVES_ON_ITS_OWN) - SSmove_manager.stop_looping(src) //stop mid walk //This is also really dumb + DSmove_manager.stop_looping(src) //stop mid walk //This is also really dumb /// Called when [TRAIT_IMMOBILIZED] is removed from the mob. /mob/living/proc/on_immobilized_trait_loss(datum/source) diff --git a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm index a0c9a964fb3..6d85b9c1867 100644 --- a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm +++ b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm @@ -71,7 +71,7 @@ switch(mode) if(BOT_IDLE) // idle update_appearance() - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) look_for_perp() // see if any criminals are in range if(!mode && bot_mode_flags & BOT_MODE_AUTOPATROL) // still idle, and set to patrol mode = BOT_START_PATROL // switch to patrol mode @@ -80,7 +80,7 @@ playsound(src,'sound/effects/beepskyspinsabre.ogg',100,TRUE,-1) // general beepsky doesn't give up so easily, jedi scum if(frustration >= 20) - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) back_to_idle() return if(target) // make sure target exists @@ -91,7 +91,7 @@ return else // not next to perp var/turf/olddist = get_dist(src, target) - SSmove_manager.move_to(src, target, 1, 4) + DSmove_manager.move_to(src, target, 1, 4) if((get_dist(src, target)) >= (olddist)) frustration++ else diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 23dd583388f..15cec22cb69 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -164,7 +164,7 @@ target = null oldtarget_name = null set_anchored(FALSE) - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) last_found = world.time /mob/living/simple_animal/bot/secbot/proc/on_saboteur(datum/source, disrupt_duration) @@ -389,7 +389,7 @@ switch(mode) if(BOT_IDLE) // idle - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) look_for_perp() // see if any criminals are in range if((mode == BOT_IDLE) && bot_mode_flags & BOT_MODE_AUTOPATROL) // didn't start hunting during look_for_perp, and set to patrol mode = BOT_START_PATROL // switch to patrol mode @@ -397,7 +397,7 @@ if(BOT_HUNT) // hunting for perp // if can't reach perp for long enough, go idle if(frustration >= 8) - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) back_to_idle() return @@ -415,7 +415,7 @@ // not next to perp var/turf/olddist = get_dist(src, target) - SSmove_manager.move_to(src, target, 1, 4) + DSmove_manager.move_to(src, target, 1, 4) if((get_dist(src, target)) >= (olddist)) frustration++ else diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 383cc112ce0..fc36b9e62da 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -104,7 +104,7 @@ /mob/living/simple_animal/hostile/Life(seconds_per_tick = SSMOBS_DT, times_fired) . = ..() if(!.) //dead - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) /mob/living/simple_animal/hostile/handle_automated_action() if(AIStatus == AI_OFF || QDELETED(src)) @@ -339,11 +339,11 @@ if(!target.Adjacent(target_from) && ranged_cooldown <= world.time) //But make sure they're not in range for a melee attack and our range attack is off cooldown OpenFire(target) if(!Process_Spacemove(0)) //Drifting - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) return 1 if(retreat_distance != null) //If we have a retreat distance, check if we need to run from our target if(target_distance <= retreat_distance) //If target's closer than our retreat distance, run - SSmove_manager.move_away(src, target, retreat_distance, move_to_delay, flags = MOVEMENT_LOOP_IGNORE_GLIDE) + DSmove_manager.move_away(src, target, retreat_distance, move_to_delay, flags = MOVEMENT_LOOP_IGNORE_GLIDE) else Goto(target,move_to_delay,minimum_distance) //Otherwise, get to our minimum distance so we chase them else @@ -378,7 +378,7 @@ approaching_target = TRUE else approaching_target = FALSE - SSmove_manager.move_to(src, target, minimum_distance, delay, flags = MOVEMENT_LOOP_IGNORE_GLIDE) + DSmove_manager.move_to(src, target, minimum_distance, delay, flags = MOVEMENT_LOOP_IGNORE_GLIDE) return TRUE /mob/living/simple_animal/hostile/adjustHealth(amount, updating_health = TRUE, forced = FALSE) @@ -418,7 +418,7 @@ GiveTarget(null) approaching_target = FALSE in_melee = FALSE - SSmove_manager.stop_looping(src) + DSmove_manager.stop_looping(src) LoseAggro() SEND_SIGNAL(src, COMSIG_HOSTILE_MOB_LOST_TARGET) // NOVA EDIT ADDITION diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 40f7f3abd0d..414cf97eab2 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -330,7 +330,7 @@ . = ..() if(!.) return FALSE - + for(var/atom/thing as anything in range(1, src)) if(isturf(thing)) new /obj/effect/decal/cleanable/confetti(thing) @@ -340,7 +340,7 @@ continue var/mob/living/carbon/human/new_clown = thing - + if(new_clown.stat != DEAD) continue @@ -349,12 +349,12 @@ var/clown_ref = REF(new_clown) if(clown_ref in clowned_mob_refs) //one clowning per person continue - + for(var/obj/item/to_strip in new_clown.get_equipped_items()) new_clown.dropItemToGround(to_strip) new_clown.dress_up_as_job(SSjob.GetJobType(/datum/job/clown)) clowned_mob_refs += clown_ref - + return TRUE /// Transforms the area to look like a new one @@ -370,7 +370,7 @@ /obj/machinery/anomalous_crystal/theme_warp/Initialize(mapload) . = ..() - terrain_theme = SSmaterials.dimensional_themes[pick(subtypesof(/datum/dimension_theme))] + terrain_theme = DSmaterials.dimensional_themes[pick(subtypesof(/datum/dimension_theme))] observer_desc = "This crystal changes the area around it to match the theme of \"[terrain_theme.name]\"." /obj/machinery/anomalous_crystal/theme_warp/ActivationReaction(mob/user, method) @@ -423,18 +423,18 @@ if(!ishuman(thing)) continue - + var/mob/living/carbon/human/to_revive = thing - + if(to_revive.stat != DEAD) continue - + to_revive.set_species(/datum/species/shadow, TRUE) to_revive.revive(ADMIN_HEAL_ALL, force_grab_ghost = TRUE) //Free revives, but significantly limits your options for reviving except via the crystal //except JK who cares about BADDNA anymore. this even heals suicides. ADD_TRAIT(to_revive, TRAIT_BADDNA, MAGIC_TRAIT) - + return TRUE /obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm index 3a838ac58cd..b2555309f8a 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm @@ -45,7 +45,7 @@ /mob/living/simple_animal/hostile/asteroid/curseblob/proc/move_loop(move_target, delay) if(our_loop) return - our_loop = SSmove_manager.force_move(src, move_target, delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + our_loop = DSmove_manager.force_move(src, move_target, delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) if(!our_loop) return RegisterSignal(move_target, COMSIG_MOB_STATCHANGE, PROC_REF(stat_change)) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 47d3ddcf20f..4cfe68b2b96 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -539,7 +539,7 @@ /mob/living/simple_animal/proc/Goto(target, delay, minimum_distance) if(prevent_goto_movement) return FALSE - SSmove_manager.move_to(src, target, minimum_distance, delay) + DSmove_manager.move_to(src, target, minimum_distance, delay) return TRUE //Makes this mob hunt the prey, be it living or an object. Will kill living creatures, and delete objects. diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 4e48144a7e6..c9c218ebea8 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -315,7 +315,7 @@ if(rebound.last_pushoff == world.time) continue if(continuous_move && !pass_allowed) - var/datum/move_loop/move/rebound_engine = SSmove_manager.processing_on(rebound, SSspacedrift) + var/datum/move_loop/move/rebound_engine = DSmove_manager.processing_on(rebound, SSspacedrift) // If you're moving toward it and you're both going the same direction, stop if(moving_direction == get_dir(src, pushover) && rebound_engine && moving_direction == rebound_engine.direction) continue diff --git a/code/modules/mod/modules/modules_general.dm b/code/modules/mod/modules/modules_general.dm index f80fd952cef..f5ca4b2f951 100644 --- a/code/modules/mod/modules/modules_general.dm +++ b/code/modules/mod/modules/modules_general.dm @@ -827,7 +827,7 @@ . = ..() if(!length(accepted_mats)) - accepted_mats = SSmaterials.materials_by_category[MAT_CATEGORY_SILO] + accepted_mats = DSmaterials.materials_by_category[MAT_CATEGORY_SILO] container = AddComponent( \ /datum/component/material_container, \ diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index 15135bee1a5..ec2139ad5d0 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -43,7 +43,7 @@ /obj/item/ammo_box/Initialize(mapload) . = ..() - custom_materials = SSmaterials.FindOrCreateMaterialCombo(custom_materials, 0.1) + custom_materials = DSmaterials.FindOrCreateMaterialCombo(custom_materials, 0.1) if(!start_empty) top_off(starting=TRUE) update_icon_state() diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 350f51492cf..e35a71e5d9b 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -100,7 +100,7 @@ reagent_puff.end_life() return - var/datum/move_loop/our_loop = SSmove_manager.move_towards_legacy(reagent_puff, target, wait_step, timeout = range * wait_step, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + var/datum/move_loop/our_loop = DSmove_manager.move_towards_legacy(reagent_puff, target, wait_step, timeout = range * wait_step, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) reagent_puff.RegisterSignal(our_loop, COMSIG_QDELETING, TYPE_PROC_REF(/obj/effect/decal/chempuff, loop_ended)) reagent_puff.RegisterSignal(our_loop, COMSIG_MOVELOOP_POSTPROCESS, TYPE_PROC_REF(/obj/effect/decal/chempuff, check_move)) diff --git a/code/modules/recycling/conveyor.dm b/code/modules/recycling/conveyor.dm index 3c04bd924ec..6d5b270cd71 100644 --- a/code/modules/recycling/conveyor.dm +++ b/code/modules/recycling/conveyor.dm @@ -241,7 +241,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) /obj/machinery/conveyor/proc/conveyable_enter(datum/source, atom/convayable) SIGNAL_HANDLER if(operating == CONVEYOR_OFF) - SSmove_manager.stop_looping(convayable, SSconveyors) + DSmove_manager.stop_looping(convayable, SSconveyors) return start_conveying(convayable) @@ -249,12 +249,12 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) SIGNAL_HANDLER var/has_conveyor = neighbors["[direction]"] if(convayable.z != z || !has_conveyor || !isturf(convayable.loc)) //If you've entered something on us, stop moving - SSmove_manager.stop_looping(convayable, SSconveyors) + DSmove_manager.stop_looping(convayable, SSconveyors) /obj/machinery/conveyor/proc/start_conveying(atom/movable/moving) if(QDELETED(moving)) return - var/datum/move_loop/move/moving_loop = SSmove_manager.processing_on(moving, SSconveyors) + var/datum/move_loop/move/moving_loop = DSmove_manager.processing_on(moving, SSconveyors) if(moving_loop) moving_loop.direction = movedir moving_loop.delay = speed * 1 SECONDS @@ -268,7 +268,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) /obj/machinery/conveyor/proc/stop_conveying(atom/movable/thing) if(!ismovable(thing)) return - SSmove_manager.stop_looping(thing, SSconveyors) + DSmove_manager.stop_looping(thing, SSconveyors) // attack with item, place item on conveyor /obj/machinery/conveyor/attackby(obj/item/attacking_item, mob/living/user, params) diff --git a/code/modules/recycling/disposal/holder.dm b/code/modules/recycling/disposal/holder.dm index fff78f74bef..ecc33c240bf 100644 --- a/code/modules/recycling/disposal/holder.dm +++ b/code/modules/recycling/disposal/holder.dm @@ -78,7 +78,7 @@ /// Starts the movement process, persists while the holder is moving through pipes /obj/structure/disposalholder/proc/start_moving() var/delay = world.tick_lag - var/datum/move_loop/our_loop = SSmove_manager.move_disposals(src, delay = delay, timeout = delay * count) + var/datum/move_loop/our_loop = DSmove_manager.move_disposals(src, delay = delay, timeout = delay * count) if(our_loop) RegisterSignal(our_loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move)) RegisterSignal(our_loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(try_expel)) diff --git a/code/modules/religion/rites.dm b/code/modules/religion/rites.dm index d907191c33d..af02fa72117 100644 --- a/code/modules/religion/rites.dm +++ b/code/modules/religion/rites.dm @@ -391,7 +391,7 @@ /datum/religion_rites/ceremonial_weapon/perform_rite(mob/living/user, atom/religious_tool) for(var/obj/item/stack/sheet/could_blade in get_turf(religious_tool)) - if(!(GET_MATERIAL_REF(could_blade.material_type) in SSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL])) + if(!(GET_MATERIAL_REF(could_blade.material_type) in DSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL])) continue if(could_blade.amount < 5) continue diff --git a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm index 43f2715dbec..61853ef1cdc 100644 --- a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm @@ -129,7 +129,7 @@ /obj/item/mecha_parts/mecha_equipment/gravcatapult/proc/do_scatter(atom/movable/scatter, atom/movable/target) var/dist = 5 - get_dist(scatter, target) var/delay = 2 - SSmove_manager.move_away(scatter, target, delay = delay, timeout = delay * dist, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) + DSmove_manager.move_away(scatter, target, delay = delay, timeout = delay * dist, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY) /obj/item/mecha_parts/mecha_equipment/gravcatapult/get_snowflake_data() return list( diff --git a/modular_nova/modules/ammo_workbench/code/ammo_workbench.dm b/modular_nova/modules/ammo_workbench/code/ammo_workbench.dm index 84acbc48cb0..c8fb9773eea 100644 --- a/modular_nova/modules/ammo_workbench/code/ammo_workbench.dm +++ b/modular_nova/modules/ammo_workbench/code/ammo_workbench.dm @@ -68,7 +68,7 @@ /obj/machinery/ammo_workbench/Initialize(mapload) AddComponent( \ /datum/component/material_container, \ - SSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL], \ + DSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL], \ 200000, \ MATCONTAINER_EXAMINE, \ allowed_items = /obj/item/stack, \ diff --git a/tff_modular/modules/nanotrasen_consultant/console_ntr.dm b/tff_modular/modules/nanotrasen_consultant/console_ntr.dm index 34932f98181..aee22798151 100644 --- a/tff_modular/modules/nanotrasen_consultant/console_ntr.dm +++ b/tff_modular/modules/nanotrasen_consultant/console_ntr.dm @@ -133,7 +133,7 @@ GLOBAL_LIST_EMPTY(responding_centcom_consoles) if (!message) return - SScommunications.soft_filtering = FALSE + DScommunications.soft_filtering = FALSE var/list/hard_filter_result = is_ic_filtered(message) if(hard_filter_result) tgui_alert(usr, "Your message contains: (\"[hard_filter_result[CHAT_FILTER_INDEX_WORD]]\"), which is not allowed on this server.") @@ -145,7 +145,7 @@ GLOBAL_LIST_EMPTY(responding_centcom_consoles) return message_admins("[ADMIN_LOOKUPFLW(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". They may be using a disallowed term for a cross-station message. Increasing delay time to reject.\n\n Message: \"[html_encode(message)]\"") log_admin_private("[key_name(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". They may be using a disallowed term for a cross-station message. Increasing delay time to reject.\n\n Message: \"[message]\"") - SScommunications.soft_filtering = TRUE + DScommunications.soft_filtering = TRUE playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) var/destination = params["destination"] @@ -299,7 +299,7 @@ GLOBAL_LIST_EMPTY(responding_centcom_consoles) /obj/machinery/computer/comntr/proc/add_message(datum/comm_message/new_message) LAZYADD(messages, new_message) -/datum/controller/subsystem/communications/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE) +/datum/system/communications/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE) for(var/obj/machinery/computer/comntr/C in GLOB.responding_centcom_consoles) if(!(C.machine_stat & (BROKEN|NOPOWER)) && is_station_level(C.z)) if(unique) diff --git a/tgstation.dme b/tgstation.dme index 5a89ba835a1..36ffa46359e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -731,13 +731,11 @@ #include "code\controllers\subsystem\atoms.dm" #include "code\controllers\subsystem\augury.dm" #include "code\controllers\subsystem\ban_cache.dm" -#include "code\controllers\subsystem\battle_royale.dm" #include "code\controllers\subsystem\bitrunning.dm" #include "code\controllers\subsystem\blackbox.dm" #include "code\controllers\subsystem\blackmarket.dm" #include "code\controllers\subsystem\chat.dm" #include "code\controllers\subsystem\circuit_component.dm" -#include "code\controllers\subsystem\communications.dm" #include "code\controllers\subsystem\dbcore.dm" #include "code\controllers\subsystem\dcs.dm" #include "code\controllers\subsystem\discord.dm" @@ -761,7 +759,6 @@ #include "code\controllers\subsystem\lua.dm" #include "code\controllers\subsystem\machines.dm" #include "code\controllers\subsystem\mapping.dm" -#include "code\controllers\subsystem\materials.dm" #include "code\controllers\subsystem\minor_mapping.dm" #include "code\controllers\subsystem\mobs.dm" #include "code\controllers\subsystem\modular_computers.dm" @@ -828,7 +825,6 @@ #include "code\controllers\subsystem\movement\ai_movement.dm" #include "code\controllers\subsystem\movement\cliff_falling.dm" #include "code\controllers\subsystem\movement\hyperspace_drift.dm" -#include "code\controllers\subsystem\movement\move_handler.dm" #include "code\controllers\subsystem\movement\movement.dm" #include "code\controllers\subsystem\movement\movement_types.dm" #include "code\controllers\subsystem\movement\spacedrift.dm" @@ -1958,6 +1954,12 @@ #include "code\datums\storage\subtypes\rped.dm" #include "code\datums\storage\subtypes\surgery_tray.dm" #include "code\datums\storage\subtypes\trash.dm" +#include "code\datums\systems\_system.dm" +#include "code\datums\systems\manager.dm" +#include "code\datums\systems\ds\battle_royale.dm" +#include "code\datums\systems\ds\communications.dm" +#include "code\datums\systems\ds\materials.dm" +#include "code\datums\systems\ds\move_handler.dm" #include "code\datums\votes\_vote_datum.dm" #include "code\datums\votes\custom_vote.dm" #include "code\datums\votes\map_vote.dm"