mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Remove data systems in favor of global datums (#82943)
This commit is contained in:
@@ -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/system/materials/proc/InitializeMaterial]: (/datum/material)
|
||||
#define COMSIG_MATERIALS_INIT_MAT "DSmaterials_init_mat"
|
||||
///from base of [/datum/materials_controller/proc/InitializeMaterial]: (/datum/material)
|
||||
#define COMSIG_MATERIALS_INIT_MAT "SSmaterials_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"
|
||||
|
||||
@@ -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...) DSmaterials._GetMaterialRef(list(##arguments))
|
||||
#define GET_MATERIAL_REF(arguments...) SSmaterials._GetMaterialRef(list(##arguments))
|
||||
|
||||
// Wrapper to convert material name into its source name
|
||||
#define MATERIAL_SOURCE(mat) "[mat.name]_material"
|
||||
|
||||
@@ -139,8 +139,8 @@
|
||||
GLOB.crafting_recipes += recipe
|
||||
|
||||
var/list/material_stack_recipes = list(
|
||||
DSmaterials.base_stack_recipes,
|
||||
DSmaterials.rigid_stack_recipes,
|
||||
SSmaterials.base_stack_recipes,
|
||||
SSmaterials.rigid_stack_recipes,
|
||||
)
|
||||
|
||||
for(var/list/recipe_list in material_stack_recipes)
|
||||
|
||||
@@ -238,7 +238,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
var/atom/target_loc = target?.loc
|
||||
|
||||
var/drifting = FALSE
|
||||
if(DSmove_manager.processing_on(user, SSspacedrift))
|
||||
if(GLOB.move_manager.processing_on(user, SSspacedrift))
|
||||
drifting = TRUE
|
||||
|
||||
var/holding = user.get_active_held_item()
|
||||
@@ -267,7 +267,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
if(!QDELETED(progbar))
|
||||
progbar.update(world.time - starttime)
|
||||
|
||||
if(drifting && !DSmove_manager.processing_on(user, SSspacedrift))
|
||||
if(drifting && !GLOB.move_manager.processing_on(user, SSspacedrift))
|
||||
drifting = FALSE
|
||||
user_loc = user.loc
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
message.title = title
|
||||
message.content = text
|
||||
|
||||
DScommunications.send_message(message)
|
||||
GLOB.communications_controller.send_message(message)
|
||||
|
||||
/**
|
||||
* Sends a minor annoucement to players.
|
||||
|
||||
@@ -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(DScommunications.block_command_report) //If we don't want the report to be printed just yet, we put it off until it's ready
|
||||
if(GLOB.communications_controller.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)
|
||||
. += "<hr><b>Identified shift divergencies:</b><BR>" + trait_list_strings.Join()
|
||||
|
||||
if(length(DScommunications.command_report_footnotes))
|
||||
if(length(GLOB.communications_controller.command_report_footnotes))
|
||||
var/footnote_pile = ""
|
||||
|
||||
for(var/datum/command_footnote/footnote in DScommunications.command_report_footnotes)
|
||||
for(var/datum/command_footnote/footnote in GLOB.communications_controller.command_report_footnotes)
|
||||
footnote_pile += "[footnote.message]<BR>"
|
||||
footnote_pile += "<i>[footnote.signature]</i><BR>"
|
||||
footnote_pile += "<BR>"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*! How material datums work
|
||||
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.
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
*/
|
||||
|
||||
DATASYSTEM_DEF(materials)
|
||||
SUBSYSTEM_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
|
||||
@@ -36,7 +36,7 @@ DATASYSTEM_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/system/materials/proc/InitializeMaterials()
|
||||
/datum/controller/subsystem/materials/proc/InitializeMaterials()
|
||||
materials = list()
|
||||
materials_by_type = list()
|
||||
materialids_by_type = list()
|
||||
@@ -57,7 +57,7 @@ DATASYSTEM_DEF(materials)
|
||||
* - [arguments][/list]: The arguments to use to create the material datum
|
||||
* - The first element is the type of material to initialize.
|
||||
*/
|
||||
/datum/system/materials/proc/InitializeMaterial(list/arguments)
|
||||
/datum/controller/subsystem/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)
|
||||
@@ -89,13 +89,13 @@ DATASYSTEM_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/system/materials/proc/_GetMaterialRef(list/arguments)
|
||||
/datum/controller/subsystem/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/system/materials/proc/InitializeMaterial]
|
||||
return key // We are assuming here that the only thing allowed to create material datums is [/datum/controller/subsystem/materials/proc/InitializeMaterial]
|
||||
|
||||
if(istext(key)) // Handle text id
|
||||
. = materials[key]
|
||||
@@ -123,7 +123,7 @@ DATASYSTEM_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/system/materials/proc/GetIdFromArguments(list/arguments)
|
||||
/datum/controller/subsystem/materials/proc/GetIdFromArguments(list/arguments)
|
||||
var/datum/material/mattype = arguments[1]
|
||||
var/list/fullid = list("[initial(mattype.id) || mattype]")
|
||||
var/list/named_arguments = list()
|
||||
@@ -149,7 +149,7 @@ DATASYSTEM_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/system/materials/proc/FindOrCreateMaterialCombo(list/materials_declaration, multiplier)
|
||||
/datum/controller/subsystem/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.
|
||||
|
||||
@@ -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 = 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)
|
||||
var/mover = GLOB.move_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
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
status &= ~MOVELOOP_STATUS_PAUSED
|
||||
|
||||
///Removes the atom from some movement subsystem. Defaults to SSmovement
|
||||
/datum/system/move_manager/proc/stop_looping(atom/movable/moving, datum/controller/subsystem/movement/subsystem = SSmovement)
|
||||
/datum/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/system/move_manager/proc/move(moving, direction, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/force_move_dir(moving, direction, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/force_move(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/jps_move(moving,
|
||||
/datum/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/system/move_manager/proc/move_to(moving, chasing, min_dist, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/move_away(moving, chasing, max_dist, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/move_towards(moving, chasing, delay, home, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/home_onto(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/move_towards_legacy(moving, chasing, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/freeze(moving, halted_turf, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/move_rand(moving, directions, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/move_to_rand(moving, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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/system/move_manager/proc/move_disposals(moving, delay, timeout, subsystem, priority, flags, datum/extra_info)
|
||||
/datum/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
|
||||
|
||||
@@ -168,7 +168,6 @@ SUBSYSTEM_DEF(statpanels)
|
||||
list("World Time:", "[world.time]"),
|
||||
list("Globals:", GLOB.stat_entry(), text_ref(GLOB)),
|
||||
list("[config]:", config.stat_entry(), text_ref(config)),
|
||||
list("Datasystem Manager:", "Edit", text_ref(SysMgr)),
|
||||
list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)"),
|
||||
list("Master Controller:", Master.stat_entry(), text_ref(Master)),
|
||||
list("Failsafe Controller:", Failsafe.stat_entry(), text_ref(Failsafe)),
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
if(charger in charging)
|
||||
// Stop any existing charging, this'll clean things up properly
|
||||
DSmove_manager.stop_looping(charger)
|
||||
GLOB.move_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 = DSmove_manager.home_onto(charger, target, delay = charge_speed, timeout = time_to_hit, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/new_loop = GLOB.move_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)
|
||||
DSmove_manager.stop_looping(source) //This will cause the loop to qdel, triggering an end to our charging
|
||||
GLOB.move_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)
|
||||
|
||||
@@ -279,7 +279,7 @@ multiple modular subtrees with behaviors
|
||||
/datum/ai_controller/process(seconds_per_tick)
|
||||
|
||||
if(!able_to_run())
|
||||
DSmove_manager.stop_looping(pawn) //stop moving
|
||||
GLOB.move_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)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
break
|
||||
|
||||
if(target)
|
||||
DSmove_manager.move_away(living_pawn, target, max_dist=MONKEY_ENEMY_VISION, delay=5)
|
||||
GLOB.move_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
|
||||
DSmove_manager.stop_looping(living_pawn)
|
||||
GLOB.move_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)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
moving_controllers -= controller
|
||||
// We got deleted as we finished an action
|
||||
if(!QDELETED(controller.pawn))
|
||||
DSmove_manager.stop_looping(controller.pawn, SSai_movement)
|
||||
GLOB.move_manager.stop_looping(controller.pawn, SSai_movement)
|
||||
|
||||
/datum/ai_movement/proc/increment_pathing_failures(datum/ai_controller/controller)
|
||||
controller.consecutive_pathing_attempts++
|
||||
|
||||
@@ -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 = DSmove_manager.move_to(moving, current_movement_target, min_dist, delay, flags = move_flags, subsystem = SSai_movement, extra_info = controller)
|
||||
var/datum/move_loop/loop = GLOB.move_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))
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
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 = DSmove_manager.freeze(moving, current_movement_target, delay = delay_time, timeout = stopping_time, subsystem = SSai_movement, extra_info = controller)
|
||||
var/datum/move_loop/loop = GLOB.move_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)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
. = ..()
|
||||
var/atom/movable/moving = controller.pawn
|
||||
var/delay = controller.movement_delay
|
||||
var/datum/move_loop/loop = DSmove_manager.move_towards_legacy(moving, current_movement_target, delay, subsystem = SSai_movement, extra_info = controller)
|
||||
var/datum/move_loop/loop = GLOB.move_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))
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/atom/movable/moving = controller.pawn
|
||||
var/delay = controller.movement_delay
|
||||
|
||||
var/datum/move_loop/has_target/jps/loop = DSmove_manager.jps_move(moving,
|
||||
var/datum/move_loop/has_target/jps/loop = GLOB.move_manager.jps_move(moving,
|
||||
current_movement_target,
|
||||
delay,
|
||||
repath_delay = 0.5 SECONDS,
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#define COMMUNICATION_COOLDOWN_AI (30 SECONDS)
|
||||
#define COMMUNICATION_COOLDOWN_MEETING (5 MINUTES)
|
||||
|
||||
DATASYSTEM_DEF(communications)
|
||||
name = "Communications"
|
||||
GLOBAL_DATUM_INIT(communications_controller, /datum/communciations_controller, new)
|
||||
|
||||
/datum/communciations_controller
|
||||
COOLDOWN_DECLARE(silicon_message_cooldown)
|
||||
COOLDOWN_DECLARE(nonsilicon_message_cooldown)
|
||||
|
||||
@@ -20,7 +20,7 @@ DATASYSTEM_DEF(communications)
|
||||
/// The location where the special xenomorph egg was planted
|
||||
var/area/captivity_area
|
||||
|
||||
/datum/system/communications/proc/can_announce(mob/living/user, is_silicon)
|
||||
/datum/communciations_controller/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))
|
||||
@@ -28,7 +28,7 @@ DATASYSTEM_DEF(communications)
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/datum/system/communications/proc/make_announcement(mob/living/user, is_silicon, input, syndicate, list/players)
|
||||
/datum/communciations_controller/proc/make_announcement(mob/living/user, is_silicon, input, syndicate, list/players)
|
||||
if(!can_announce(user, is_silicon))
|
||||
return FALSE
|
||||
if(is_silicon)
|
||||
@@ -44,7 +44,7 @@ DATASYSTEM_DEF(communications)
|
||||
user.log_talk(input, LOG_SAY, tag="priority announcement")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has made a priority announcement.")
|
||||
|
||||
/datum/system/communications/proc/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE)
|
||||
/datum/communciations_controller/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)
|
||||
@@ -15,7 +15,7 @@
|
||||
if(!start_delay)
|
||||
start_delay = speed
|
||||
var/atom/movable/moving_parent = parent
|
||||
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)
|
||||
var/datum/move_loop/loop = GLOB.move_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))
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(instant)
|
||||
flags |= MOVEMENT_LOOP_START_FAST
|
||||
var/atom/movable/movable_parent = parent
|
||||
drifting_loop = DSmove_manager.move(moving = parent, direction = direction, delay = movable_parent.inertia_move_delay, subsystem = SSspacedrift, priority = MOVEMENT_SPACE_PRIORITY, flags = flags)
|
||||
drifting_loop = GLOB.move_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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
var/mob/mob_parent = parent
|
||||
var/dist = get_dist(mob_parent, target)
|
||||
var/datum/move_loop/loop = DSmove_manager.move_towards(mob_parent, target, delay = 1, timeout = dist)
|
||||
var/datum/move_loop/loop = GLOB.move_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)
|
||||
|
||||
@@ -86,7 +86,7 @@ handles linking back and forth.
|
||||
|
||||
mat_container = parent.AddComponent( \
|
||||
/datum/component/material_container, \
|
||||
DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
local_size, \
|
||||
mat_container_flags, \
|
||||
container_signals = mat_container_signals, \
|
||||
|
||||
@@ -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 = 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)
|
||||
hyperloop = GLOB.move_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()
|
||||
|
||||
@@ -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 DSmaterials.materials list. Defaults to the type of the material.
|
||||
/// What the material is indexed by in the SSmaterials.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 DSmaterials handles this material.
|
||||
///Bitflags that influence how SSmaterials 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()
|
||||
|
||||
@@ -17,14 +17,15 @@
|
||||
*
|
||||
* 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/system/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/move_manager/proc/add_to_loop] helper procs that use them
|
||||
*
|
||||
**/
|
||||
DATASYSTEM_DEF(move_manager)
|
||||
name = "Movement Handler"
|
||||
/datum/move_manager
|
||||
|
||||
GLOBAL_DATUM_INIT(move_manager, /datum/move_manager, new)
|
||||
|
||||
///Adds a movable thing to a movement subsystem. Returns TRUE if it all worked, FALSE if it failed somehow
|
||||
/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)
|
||||
/datum/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)
|
||||
@@ -33,7 +34,7 @@ DATASYSTEM_DEF(move_manager)
|
||||
return our_data.add_loop(arglist(arguments))
|
||||
|
||||
///Returns the subsystem's loop if we're processing on it, null otherwise
|
||||
/datum/system/move_manager/proc/processing_on(atom/movable/packet_owner, datum/controller/subsystem/movement/subsystem)
|
||||
/datum/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
|
||||
@@ -214,7 +214,7 @@
|
||||
frozen_mobs += victim
|
||||
victim.Stun(20, ignore_canstun = TRUE)
|
||||
victim.add_traits(list(TRAIT_MUTE, TRAIT_EMOTEMUTE), TIMESTOP_TRAIT)
|
||||
DSmove_manager.stop_looping(victim) //stops them mid pathing even if they're stunimmune //This is really dumb
|
||||
GLOB.move_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)
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#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"
|
||||
@@ -1,229 +0,0 @@
|
||||
/// Global list of areas which are considered to be inside the same department for our purposes
|
||||
GLOBAL_LIST_INIT(battle_royale_regions, list(
|
||||
"Medical Bay" = list(
|
||||
/area/station/command/heads_quarters/cmo,
|
||||
/area/station/medical,
|
||||
/area/station/security/checkpoint/medical,
|
||||
),
|
||||
"Research Division" = list(
|
||||
/area/station/command/heads_quarters/rd,
|
||||
/area/station/security/checkpoint/science,
|
||||
/area/station/science,
|
||||
),
|
||||
"Engineering Bay" = list(
|
||||
/area/station/command/heads_quarters/ce,
|
||||
/area/station/engineering,
|
||||
/area/station/maintenance/disposal/incinerator,
|
||||
/area/station/security/checkpoint/engineering,
|
||||
),
|
||||
"Cargo Bay" = list(
|
||||
/area/station/cargo,
|
||||
/area/station/command/heads_quarters/qm,
|
||||
/area/station/security/checkpoint/supply,
|
||||
),
|
||||
))
|
||||
|
||||
/// Basically just exists to hold references to datums so that they don't GC
|
||||
DATASYSTEM_DEF(battle_royale)
|
||||
name = "Battle Royale"
|
||||
/// List of battle royale datums currently running
|
||||
var/list/active_battles
|
||||
|
||||
/// Start a new battle royale using a passed list of implants
|
||||
/datum/system/battle_royale/proc/start_battle(list/competitors)
|
||||
var/datum/battle_royale_controller/controller = new()
|
||||
if (!controller.start(competitors))
|
||||
return FALSE
|
||||
LAZYADD(active_battles, controller)
|
||||
if (LAZYLEN(active_battles) == 1)
|
||||
start_broadcasting_network(BATTLE_ROYALE_CAMERA_NET)
|
||||
RegisterSignal(controller, COMSIG_QDELETING, PROC_REF(battle_ended))
|
||||
return TRUE
|
||||
|
||||
/// Drop reference when it kills itself
|
||||
/datum/system/battle_royale/proc/battle_ended(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
LAZYREMOVE(active_battles, source)
|
||||
if (!LAZYLEN(active_battles))
|
||||
stop_broadcasting_network(BATTLE_ROYALE_CAMERA_NET)
|
||||
|
||||
|
||||
/// Datum which controls the conflict
|
||||
/datum/battle_royale_controller
|
||||
/// Where is our battle taking place?
|
||||
var/chosen_area
|
||||
/// Is the battle currently in progress?
|
||||
var/battle_running = TRUE
|
||||
/// Should we let everyone know that someone has died?
|
||||
var/announce_deaths = TRUE
|
||||
/// List of implants involved
|
||||
var/list/contestant_implants = list()
|
||||
/// Ways to describe that someone has died
|
||||
var/static/list/euphemisms = list(
|
||||
"cashed their last paycheque.",
|
||||
"didn't make it...",
|
||||
"didn't make the cut.",
|
||||
"had their head blown clean off!",
|
||||
"has been killed!",
|
||||
"has failed the challenge!",
|
||||
"has passed away.",
|
||||
"has died.",
|
||||
"is in a better place now.",
|
||||
"isn't going to be clocking in tomorrow!",
|
||||
"just flatlined.",
|
||||
"isn't today's winner.",
|
||||
"seems to have exploded!",
|
||||
"was just murdered on live tv!",
|
||||
"won't be making it to retirement.",
|
||||
"won't be getting back up after that one.",
|
||||
)
|
||||
/// Ways to tell people not to salt in deadchat, surely effective
|
||||
var/static/list/condolences = list(
|
||||
"Better luck next time!",
|
||||
"But stay tuned, there's still everything to play for!",
|
||||
"Did you catch who did it?",
|
||||
"It looked like that one really hurt...",
|
||||
"Let's get that one on action replay!",
|
||||
"Let's have a moment of silence, please.",
|
||||
"Let's hope the next one does better.",
|
||||
"Someone please notify their next of kin.",
|
||||
"They had a good run.",
|
||||
"Too bad!",
|
||||
"What a shame!",
|
||||
"What an upset!",
|
||||
"What's going to happen next?",
|
||||
"Who could have seen that coming?",
|
||||
"Who will be next?",
|
||||
)
|
||||
|
||||
/datum/battle_royale_controller/Destroy(force)
|
||||
contestant_implants = null
|
||||
return ..()
|
||||
|
||||
/// Start a battle royale with the list of provided implants
|
||||
/datum/battle_royale_controller/proc/start(list/implants, battle_time = 10 MINUTES)
|
||||
chosen_area = pick(GLOB.battle_royale_regions)
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant in implants)
|
||||
contestant_implant.start_battle(chosen_area, GLOB.battle_royale_regions[chosen_area])
|
||||
if (isnull(contestant_implant))
|
||||
continue // Might have exploded if it was removed from a person
|
||||
RegisterSignal(contestant_implant, COMSIG_QDELETING, PROC_REF(implant_destroyed))
|
||||
contestant_implants |= contestant_implant
|
||||
|
||||
if (length(contestant_implants) <= 1)
|
||||
return FALSE // Well there's not much point is there
|
||||
|
||||
priority_announce(
|
||||
text = "Congratulations [station_name()], you have been chosen as the next site of the Rumble Royale! \n\
|
||||
Viewers across the sector will watch our [convert_integer_to_words(length(contestant_implants))] lucky contestants battle their way into your [chosen_area] and fight until only one is left standing! \n\
|
||||
If they don't make it in five minutes, they'll be disqualified. If you see one of our players struggling to get in, do lend them a hand... or don't, if you can live with the consequences! \n\
|
||||
As a gesture of gratitude, we will be providing our premium broadcast to your entertainment monitors at no cost so that you can watch the excitement. \n\
|
||||
Bystanders are advised not to intervene... but if you do, make it look good for the camera!",
|
||||
title = "Rumble Royale Beginning",
|
||||
sound = 'sound/machines/alarm.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant as anything in contestant_implants)
|
||||
contestant_implant.announce()
|
||||
addtimer(CALLBACK(src, PROC_REF(limit_area)), battle_time / 2, TIMER_DELETE_ME)
|
||||
addtimer(CALLBACK(src, PROC_REF(finish)), battle_time, TIMER_DELETE_ME)
|
||||
return TRUE
|
||||
|
||||
/// An implant was destroyed, hopefully because it exploded. Count how many competitors remain.
|
||||
/datum/battle_royale_controller/proc/implant_destroyed(obj/item/implant/implant)
|
||||
SIGNAL_HANDLER
|
||||
contestant_implants -= implant
|
||||
if (!battle_running)
|
||||
return
|
||||
|
||||
if (length(contestant_implants) <= 1)
|
||||
announce_winner(implant)
|
||||
else if (announce_deaths)
|
||||
var/message = ""
|
||||
if (isnull(implant.imp_in))
|
||||
message = "Looks like someone removed and destroyed their implant, that's cheating!"
|
||||
else
|
||||
message = "[implant.imp_in.real_name] [pick(euphemisms)] [pick(condolences)]"
|
||||
priority_announce(
|
||||
text = message,
|
||||
title = "Rumble Royale Casualty Report",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
/// There's only one person left, we have a winner!
|
||||
/datum/battle_royale_controller/proc/announce_winner(obj/item/implant/losing_implant)
|
||||
battle_running = FALSE
|
||||
if (length(contestant_implants) > 1)
|
||||
return
|
||||
|
||||
var/message = ""
|
||||
var/mob/living/loser = losing_implant.imp_in
|
||||
var/obj/item/implant/winning_implant = pop(contestant_implants)
|
||||
var/mob/living/winner = winning_implant?.imp_in
|
||||
|
||||
if (isnull(winner) && isnull(loser))
|
||||
message = "Somehow, it seems like there's no winner tonight. What a disappointment!"
|
||||
else
|
||||
var/loser_text = isnull(loser) ? "With the disqualification of the other remaining contestant" : "With the death of [loser.real_name]"
|
||||
var/winner_text = isnull(winner) ? "we must sadly announce that the would-be winner has also been disqualified. Such bad showmanship!" : "only [winner.real_name] remains. Congratulations, we have a winner!"
|
||||
message = "[loser_text], [winner_text]"
|
||||
|
||||
if (!isnull(winner))
|
||||
podspawn(list(
|
||||
"target" = get_turf(winner),
|
||||
"style" = STYLE_SYNDICATE,
|
||||
"spawn" = /obj/item/food/roast_dinner,
|
||||
))
|
||||
|
||||
priority_announce(
|
||||
text = message,
|
||||
title = "Rumble Royale Winner",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
qdel(winning_implant) // You get to live!
|
||||
winner?.mind?.remove_antag_datum(/datum/antagonist/survivalist/battle_royale)
|
||||
qdel(src)
|
||||
|
||||
/// Called halfway through the battle, if you've not made it to the designated battle zone we kill you
|
||||
/datum/battle_royale_controller/proc/limit_area()
|
||||
priority_announce(
|
||||
text = "We're halfway done folks! And bad news to anyone who hasn't made it to the [chosen_area]... you're out!",
|
||||
title = "Rumble Royale Update",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant as anything in contestant_implants)
|
||||
contestant_implant.limit_areas()
|
||||
|
||||
/// Well you're out of time, bad luck
|
||||
/datum/battle_royale_controller/proc/finish()
|
||||
battle_running = FALSE
|
||||
|
||||
priority_announce(
|
||||
text = "Sorry remaining contestants, your time is up. \
|
||||
We're sorry to announce that this edition of Royal Rumble has no winner. \n\
|
||||
Better luck next time!",
|
||||
title = "Rumble Royale Concluded",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant as anything in contestant_implants)
|
||||
contestant_implant.explode()
|
||||
|
||||
qdel(src)
|
||||
@@ -1,14 +0,0 @@
|
||||
// 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)
|
||||
@@ -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 = DSmaterials.FindOrCreateMaterialCombo(materials, multiplier)
|
||||
custom_materials = SSmaterials.FindOrCreateMaterialCombo(materials, multiplier)
|
||||
|
||||
/**
|
||||
* Returns the material composition of the atom.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/obj/machinery/autolathe/Initialize(mapload)
|
||||
materials = AddComponent( \
|
||||
/datum/component/material_container, \
|
||||
DSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL], \
|
||||
SSmaterials.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 DSmaterials.materials_by_category[material])
|
||||
for(var/datum/material/valid_candidate as anything in SSmaterials.materials_by_category[material])
|
||||
if(materials.get_material_amount(valid_candidate) < amount_needed)
|
||||
continue
|
||||
choices[valid_candidate.name] = valid_candidate
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
if (!message)
|
||||
return
|
||||
|
||||
DScommunications.soft_filtering = FALSE
|
||||
GLOB.communications_controller.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.")
|
||||
@@ -333,7 +333,7 @@
|
||||
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]\"")
|
||||
DScommunications.soft_filtering = TRUE
|
||||
GLOB.communications_controller.soft_filtering = TRUE
|
||||
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
|
||||
@@ -344,13 +344,13 @@
|
||||
GLOB.admins,
|
||||
span_adminnotice( \
|
||||
"<b color='orange'>CROSS-SECTOR MESSAGE (OUTGOING):</b> [ADMIN_LOOKUPFLW(usr)] is about to send \
|
||||
the following message to <b>[destination]</b> (will autoapprove in [DScommunications.soft_filtering ? DisplayTimeText(EXTENDED_CROSS_SECTOR_CANCEL_TIME) : DisplayTimeText(CROSS_SECTOR_CANCEL_TIME)]): \
|
||||
the following message to <b>[destination]</b> (will autoapprove in [GLOB.communications_controller.soft_filtering ? DisplayTimeText(EXTENDED_CROSS_SECTOR_CANCEL_TIME) : DisplayTimeText(CROSS_SECTOR_CANCEL_TIME)]): \
|
||||
<b><a href='?src=[REF(src)];reject_cross_comms_message=1'>REJECT</a></b><br> \
|
||||
[html_encode(message)]" \
|
||||
)
|
||||
)
|
||||
|
||||
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)
|
||||
send_cross_comms_message_timer = addtimer(CALLBACK(src, PROC_REF(send_cross_comms_message), usr, destination, message), GLOB.communications_controller.soft_filtering ? EXTENDED_CROSS_SECTOR_CANCEL_TIME : CROSS_SECTOR_CANCEL_TIME, TIMER_STOPPABLE)
|
||||
|
||||
COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN)
|
||||
if ("setState")
|
||||
@@ -487,7 +487,7 @@
|
||||
var/network_name = CONFIG_GET(string/cross_comms_network)
|
||||
if(network_name)
|
||||
payload["network"] = network_name
|
||||
if(DScommunications.soft_filtering)
|
||||
if(GLOB.communications_controller.soft_filtering)
|
||||
payload["is_filtered"] = TRUE
|
||||
|
||||
send2otherserver(html_decode(station_name()), message, "Comms_Console", destination == "all" ? null : list(destination), additional_data = payload)
|
||||
@@ -495,7 +495,7 @@
|
||||
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).</span>", "<span class='bold'>[usr.real_name]", usr, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
DScommunications.soft_filtering = FALSE // set it to false at the end of the proc to ensure that everything prior reads as intended
|
||||
GLOB.communications_controller.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(
|
||||
@@ -655,7 +655,7 @@
|
||||
return
|
||||
|
||||
deltimer(send_cross_comms_message_timer)
|
||||
DScommunications.soft_filtering = FALSE
|
||||
GLOB.communications_controller.soft_filtering = FALSE
|
||||
send_cross_comms_message_timer = null
|
||||
|
||||
log_admin("[key_name(usr)] has cancelled the outgoing cross-comms message.")
|
||||
@@ -728,7 +728,7 @@
|
||||
|
||||
/obj/machinery/computer/communications/proc/make_announcement(mob/living/user)
|
||||
var/is_ai = HAS_SILICON_ACCESS(user)
|
||||
if(!DScommunications.can_announce(user, is_ai))
|
||||
if(!GLOB.communications_controller.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")
|
||||
@@ -749,7 +749,7 @@
|
||||
)
|
||||
|
||||
var/list/players = get_communication_players()
|
||||
DScommunications.make_announcement(user, is_ai, input, syndicate || (obj_flags & EMAGGED), players)
|
||||
GLOB.communications_controller.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()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/machinery/recycler/Initialize(mapload)
|
||||
materials = AddComponent(
|
||||
/datum/component/material_container, \
|
||||
DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
INFINITY, \
|
||||
MATCONTAINER_NO_INSERT \
|
||||
)
|
||||
|
||||
@@ -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 DSmaterials.dimensional_themes)
|
||||
for(var/datum/dimension_theme/theme as anything in SSmaterials.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(DSmaterials.dimensional_themes)
|
||||
var/theme_count = length(SSmaterials.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 = DSmaterials.dimensional_themes[DSmaterials.dimensional_themes[rand(1, theme_count)]]
|
||||
theme_to_use = SSmaterials.dimensional_themes[SSmaterials.dimensional_themes[rand(1, theme_count)]]
|
||||
else
|
||||
theme_to_use = DSmaterials.dimensional_themes[chosen_theme]
|
||||
theme_to_use = SSmaterials.dimensional_themes[chosen_theme]
|
||||
if(!theme_to_use.can_convert(affected))
|
||||
continue
|
||||
num_affected++
|
||||
|
||||
@@ -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 = DSmaterials.dimensional_themes[new_theme_path]
|
||||
theme = SSmaterials.dimensional_themes[new_theme_path]
|
||||
apply_theme_icon()
|
||||
|
||||
target_turfs = list()
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
break
|
||||
return
|
||||
|
||||
var/datum/move_loop/loop = DSmove_manager.move(src, direction, delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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)
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
break
|
||||
return
|
||||
|
||||
var/datum/move_loop/loop = DSmove_manager.move_to(src, get_step(src, direction), delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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 = DSmove_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 = GLOB.move_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))
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
break
|
||||
return
|
||||
|
||||
var/datum/move_loop/loop = DSmove_manager.move(src, direction, delay = delay, timeout = range * delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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)
|
||||
|
||||
@@ -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 = DSmove_manager.move(effect, direction, step_delay, timeout = step_delay * step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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)
|
||||
|
||||
@@ -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 = DSmove_manager.move(src, pick(GLOB.alldirs), 1, timeout = step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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)
|
||||
|
||||
@@ -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 = DSmove_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 = GLOB.move_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 = DSmove_manager.move_towards(src, target, delay, timeout = delay * lifetime, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
/obj/structure/alien/egg/delivery/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
DScommunications.xenomorph_egg_delivered = TRUE
|
||||
DScommunications.captivity_area = get_area(src)
|
||||
GLOB.communications_controller.xenomorph_egg_delivered = TRUE
|
||||
GLOB.communications_controller.captivity_area = get_area(src)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
ADD_TRAIT(AM, TRAIT_IMMOBILIZED, REF(src))
|
||||
|
||||
affecting[AM] = AM.dir
|
||||
var/datum/move_loop/loop = DSmove_manager.move(AM, direction, speed, tiles ? tiles * speed : INFINITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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))
|
||||
|
||||
@@ -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 = DSmove_manager.move_towards(src, chasing = target, delay = move_speed, home = homing, timeout = duration, flags = MOVEMENT_LOOP_START_FAST)
|
||||
movement = GLOB.move_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))
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/// Global list of areas which are considered to be inside the same department for our purposes
|
||||
GLOBAL_LIST_INIT(battle_royale_regions, list(
|
||||
"Medical Bay" = list(
|
||||
/area/station/command/heads_quarters/cmo,
|
||||
/area/station/medical,
|
||||
/area/station/security/checkpoint/medical,
|
||||
),
|
||||
"Research Division" = list(
|
||||
/area/station/command/heads_quarters/rd,
|
||||
/area/station/security/checkpoint/science,
|
||||
/area/station/science,
|
||||
),
|
||||
"Engineering Bay" = list(
|
||||
/area/station/command/heads_quarters/ce,
|
||||
/area/station/engineering,
|
||||
/area/station/maintenance/disposal/incinerator,
|
||||
/area/station/security/checkpoint/engineering,
|
||||
),
|
||||
"Cargo Bay" = list(
|
||||
/area/station/cargo,
|
||||
/area/station/command/heads_quarters/qm,
|
||||
/area/station/security/checkpoint/supply,
|
||||
),
|
||||
))
|
||||
|
||||
/// Quietly implants people with battle royale implants
|
||||
/obj/item/royale_implanter
|
||||
name = "royale implanter"
|
||||
@@ -78,7 +103,7 @@
|
||||
balloon_alert(user, "[required_contestants - contestant_count] contestants needed!")
|
||||
return
|
||||
|
||||
DSbattle_royale.start_battle(implanted_implants)
|
||||
GLOB.battle_royale_master.start_battle(implanted_implants)
|
||||
|
||||
for (var/obj/implanter as anything in linked_implanters)
|
||||
do_sparks(3, cardinal_only = FALSE, source = implanter)
|
||||
@@ -115,3 +140,208 @@
|
||||
/obj/item/royale_remote/proc/implant_destroyed(obj/item/implant)
|
||||
SIGNAL_HANDLER
|
||||
implanted_implants -= implant
|
||||
|
||||
GLOBAL_DATUM_INIT(battle_royale_master, /datum/battle_royale_master, new)
|
||||
|
||||
/// Basically just exists to hold references to datums so that they don't GC
|
||||
/datum/battle_royale_master
|
||||
/// List of battle royale datums currently running
|
||||
var/list/active_battles
|
||||
|
||||
/// Start a new battle royale using a passed list of implants
|
||||
/datum/battle_royale_master/proc/start_battle(list/competitors)
|
||||
var/datum/battle_royale_controller/controller = new()
|
||||
if (!controller.start(competitors))
|
||||
return FALSE
|
||||
LAZYADD(active_battles, controller)
|
||||
if (LAZYLEN(active_battles) == 1)
|
||||
start_broadcasting_network(BATTLE_ROYALE_CAMERA_NET)
|
||||
RegisterSignal(controller, COMSIG_QDELETING, PROC_REF(battle_ended))
|
||||
return TRUE
|
||||
|
||||
/// Drop reference when it kills itself
|
||||
/datum/battle_royale_master/proc/battle_ended(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
LAZYREMOVE(active_battles, source)
|
||||
if (!LAZYLEN(active_battles))
|
||||
stop_broadcasting_network(BATTLE_ROYALE_CAMERA_NET)
|
||||
|
||||
/// Datum which controls the conflict
|
||||
/datum/battle_royale_controller
|
||||
/// Where is our battle taking place?
|
||||
var/chosen_area
|
||||
/// Is the battle currently in progress?
|
||||
var/battle_running = TRUE
|
||||
/// Should we let everyone know that someone has died?
|
||||
var/announce_deaths = TRUE
|
||||
/// List of implants involved
|
||||
var/list/contestant_implants = list()
|
||||
/// Ways to describe that someone has died
|
||||
var/static/list/euphemisms = list(
|
||||
"cashed their last paycheque.",
|
||||
"didn't make it...",
|
||||
"didn't make the cut.",
|
||||
"had their head blown clean off!",
|
||||
"has been killed!",
|
||||
"has failed the challenge!",
|
||||
"has passed away.",
|
||||
"has died.",
|
||||
"is in a better place now.",
|
||||
"isn't going to be clocking in tomorrow!",
|
||||
"just flatlined.",
|
||||
"isn't today's winner.",
|
||||
"seems to have exploded!",
|
||||
"was just murdered on live tv!",
|
||||
"won't be making it to retirement.",
|
||||
"won't be getting back up after that one.",
|
||||
)
|
||||
/// Ways to tell people not to salt in deadchat, surely effective
|
||||
var/static/list/condolences = list(
|
||||
"Better luck next time!",
|
||||
"But stay tuned, there's still everything to play for!",
|
||||
"Did you catch who did it?",
|
||||
"It looked like that one really hurt...",
|
||||
"Let's get that one on action replay!",
|
||||
"Let's have a moment of silence, please.",
|
||||
"Let's hope the next one does better.",
|
||||
"Someone please notify their next of kin.",
|
||||
"They had a good run.",
|
||||
"Too bad!",
|
||||
"What a shame!",
|
||||
"What an upset!",
|
||||
"What's going to happen next?",
|
||||
"Who could have seen that coming?",
|
||||
"Who will be next?",
|
||||
)
|
||||
|
||||
/datum/battle_royale_controller/Destroy(force)
|
||||
contestant_implants = null
|
||||
return ..()
|
||||
|
||||
/// Start a battle royale with the list of provided implants
|
||||
/datum/battle_royale_controller/proc/start(list/implants, battle_time = 10 MINUTES)
|
||||
chosen_area = pick(GLOB.battle_royale_regions)
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant in implants)
|
||||
contestant_implant.start_battle(chosen_area, GLOB.battle_royale_regions[chosen_area])
|
||||
if (isnull(contestant_implant))
|
||||
continue // Might have exploded if it was removed from a person
|
||||
RegisterSignal(contestant_implant, COMSIG_QDELETING, PROC_REF(implant_destroyed))
|
||||
contestant_implants |= contestant_implant
|
||||
|
||||
if (length(contestant_implants) <= 1)
|
||||
return FALSE // Well there's not much point is there
|
||||
|
||||
priority_announce(
|
||||
text = "Congratulations [station_name()], you have been chosen as the next site of the Rumble Royale! \n\
|
||||
Viewers across the sector will watch our [convert_integer_to_words(length(contestant_implants))] lucky contestants battle their way into your [chosen_area] and fight until only one is left standing! \n\
|
||||
If they don't make it in five minutes, they'll be disqualified. If you see one of our players struggling to get in, do lend them a hand... or don't, if you can live with the consequences! \n\
|
||||
As a gesture of gratitude, we will be providing our premium broadcast to your entertainment monitors at no cost so that you can watch the excitement. \n\
|
||||
Bystanders are advised not to intervene... but if you do, make it look good for the camera!",
|
||||
title = "Rumble Royale Beginning",
|
||||
sound = 'sound/machines/alarm.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant as anything in contestant_implants)
|
||||
contestant_implant.announce()
|
||||
addtimer(CALLBACK(src, PROC_REF(limit_area)), battle_time / 2, TIMER_DELETE_ME)
|
||||
addtimer(CALLBACK(src, PROC_REF(finish)), battle_time, TIMER_DELETE_ME)
|
||||
return TRUE
|
||||
|
||||
/// An implant was destroyed, hopefully because it exploded. Count how many competitors remain.
|
||||
/datum/battle_royale_controller/proc/implant_destroyed(obj/item/implant/implant)
|
||||
SIGNAL_HANDLER
|
||||
contestant_implants -= implant
|
||||
if (!battle_running)
|
||||
return
|
||||
|
||||
if (length(contestant_implants) <= 1)
|
||||
announce_winner(implant)
|
||||
else if (announce_deaths)
|
||||
var/message = ""
|
||||
if (isnull(implant.imp_in))
|
||||
message = "Looks like someone removed and destroyed their implant, that's cheating!"
|
||||
else
|
||||
message = "[implant.imp_in.real_name] [pick(euphemisms)] [pick(condolences)]"
|
||||
priority_announce(
|
||||
text = message,
|
||||
title = "Rumble Royale Casualty Report",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
/// There's only one person left, we have a winner!
|
||||
/datum/battle_royale_controller/proc/announce_winner(obj/item/implant/losing_implant)
|
||||
battle_running = FALSE
|
||||
if (length(contestant_implants) > 1)
|
||||
return
|
||||
|
||||
var/message = ""
|
||||
var/mob/living/loser = losing_implant.imp_in
|
||||
var/obj/item/implant/winning_implant = pop(contestant_implants)
|
||||
var/mob/living/winner = winning_implant?.imp_in
|
||||
|
||||
if (isnull(winner) && isnull(loser))
|
||||
message = "Somehow, it seems like there's no winner tonight. What a disappointment!"
|
||||
else
|
||||
var/loser_text = isnull(loser) ? "With the disqualification of the other remaining contestant" : "With the death of [loser.real_name]"
|
||||
var/winner_text = isnull(winner) ? "we must sadly announce that the would-be winner has also been disqualified. Such bad showmanship!" : "only [winner.real_name] remains. Congratulations, we have a winner!"
|
||||
message = "[loser_text], [winner_text]"
|
||||
|
||||
if (!isnull(winner))
|
||||
podspawn(list(
|
||||
"target" = get_turf(winner),
|
||||
"style" = STYLE_SYNDICATE,
|
||||
"spawn" = /obj/item/food/roast_dinner,
|
||||
))
|
||||
|
||||
priority_announce(
|
||||
text = message,
|
||||
title = "Rumble Royale Winner",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
qdel(winning_implant) // You get to live!
|
||||
winner?.mind?.remove_antag_datum(/datum/antagonist/survivalist/battle_royale)
|
||||
qdel(src)
|
||||
|
||||
/// Called halfway through the battle, if you've not made it to the designated battle zone we kill you
|
||||
/datum/battle_royale_controller/proc/limit_area()
|
||||
priority_announce(
|
||||
text = "We're halfway done folks! And bad news to anyone who hasn't made it to the [chosen_area]... you're out!",
|
||||
title = "Rumble Royale Update",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant as anything in contestant_implants)
|
||||
contestant_implant.limit_areas()
|
||||
|
||||
/// Well you're out of time, bad luck
|
||||
/datum/battle_royale_controller/proc/finish()
|
||||
battle_running = FALSE
|
||||
|
||||
priority_announce(
|
||||
text = "Sorry remaining contestants, your time is up. \
|
||||
We're sorry to announce that this edition of Royal Rumble has no winner. \n\
|
||||
Better luck next time!",
|
||||
title = "Rumble Royale Concluded",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
has_important_message = TRUE,
|
||||
sender_override = "Rumble Royale Pirate Broadcast Station",
|
||||
color_override = "red",
|
||||
)
|
||||
|
||||
for (var/obj/item/implant/explosive/battle_royale/contestant_implant as anything in contestant_implants)
|
||||
contestant_implant.explode()
|
||||
|
||||
qdel(src)
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
|
||||
//Chair movement loop
|
||||
/obj/item/extinguisher/proc/move_chair(obj/buckled_object, movementdirection)
|
||||
var/datum/move_loop/loop = DSmove_manager.move(buckled_object, movementdirection, 1, timeout = 9, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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))
|
||||
|
||||
@@ -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 = DSmove_manager.home_onto(src, thing_moving_towards, delay = 5, flags = MOVEMENT_LOOP_NO_DIR_UPDATE)
|
||||
var/datum/move_loop/loop = GLOB.move_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))
|
||||
|
||||
|
||||
@@ -110,9 +110,9 @@
|
||||
for(var/category in what_are_we_made_of.categories)
|
||||
switch(category)
|
||||
if(MAT_CATEGORY_BASE_RECIPES)
|
||||
recipes |= DSmaterials.base_stack_recipes.Copy()
|
||||
recipes |= SSmaterials.base_stack_recipes.Copy()
|
||||
if(MAT_CATEGORY_RIGID)
|
||||
recipes |= DSmaterials.rigid_stack_recipes.Copy()
|
||||
recipes |= SSmaterials.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 = DSmaterials.FindOrCreateMaterialCombo(mats, multiplier)
|
||||
mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(mats, multiplier)
|
||||
update_custom_materials()
|
||||
|
||||
/** Updates the custom materials list of this stack.
|
||||
|
||||
@@ -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 = DSmove_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 = GLOB.move_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))
|
||||
|
||||
|
||||
@@ -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 = DSmove_manager.move_towards(resin, target, delay, timeout = delay * 5, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/loop = GLOB.move_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
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
moving = TRUE
|
||||
current_tube = tube
|
||||
|
||||
var/datum/move_loop/engine = DSmove_manager.force_move_dir(src, dir, 0, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
var/datum/move_loop/engine = GLOB.move_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))
|
||||
|
||||
@@ -17,7 +17,6 @@ GLOBAL_VAR(restart_counter)
|
||||
* - world.init_byond_tracy()
|
||||
* - (Start native profiling)
|
||||
* - world.init_debugger()
|
||||
* - SysMgr (all data systems)
|
||||
* - Master =>
|
||||
* - config *unloaded
|
||||
* - (all subsystems) PreInit()
|
||||
@@ -85,9 +84,6 @@ 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
|
||||
|
||||
|
||||
@@ -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()
|
||||
DScommunications.block_command_report += 1 //Add a blocking condition to the counter until the inputs are done.
|
||||
GLOB.communications_controller.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)
|
||||
DScommunications.block_command_report -= 1
|
||||
GLOB.communications_controller.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"
|
||||
|
||||
DScommunications.command_report_footnotes += command_report_footnote
|
||||
DScommunications.block_command_report--
|
||||
GLOB.communications_controller.command_report_footnotes += command_report_footnote
|
||||
GLOB.communications_controller.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)
|
||||
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.")
|
||||
GLOB.communications_controller.block_command_report = !GLOB.communications_controller.block_command_report
|
||||
message_admins("[key_name_admin(user)] has [(GLOB.communications_controller.block_command_report ? "delayed" : "sent")] the roundstart command report.")
|
||||
|
||||
@@ -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)
|
||||
DScommunications.send_message(threat, unique = TRUE)
|
||||
GLOB.communications_controller.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)
|
||||
|
||||
@@ -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)
|
||||
DSmove_manager.move_to(src, get_step(src, rand_dir), 1)
|
||||
GLOB.move_manager.move_to(src, get_step(src, rand_dir), 1)
|
||||
return
|
||||
|
||||
// Increase time trackers and check for any updated states.
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
RegisterSignal(src, COMSIG_MOVABLE_CROSS_OVER, PROC_REF(check_teleport))
|
||||
DSmove_manager.move_towards(src, get_turf(whistle.whistler))
|
||||
GLOB.move_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)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
explanation_text = "Escape from captivity."
|
||||
|
||||
/datum/objective/escape_captivity/check_completion()
|
||||
if(!istype(get_area(owner), DScommunications.captivity_area))
|
||||
if(!istype(get_area(owner), GLOB.communications_controller.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), DScommunications.captivity_area))
|
||||
if(istype(get_area(captive_alien), GLOB.communications_controller.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(DScommunications.xenomorph_egg_delivered && istype(get_area(src), DScommunications.captivity_area))
|
||||
if(GLOB.communications_controller.xenomorph_egg_delivered && istype(get_area(src), GLOB.communications_controller.captivity_area))
|
||||
mind.add_antag_datum(/datum/antagonist/xeno/captive)
|
||||
else
|
||||
mind.add_antag_datum(/datum/antagonist/xeno)
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
RegisterSignal(src, COMSIG_ATOM_ENTERING, PROC_REF(on_entering_atom))
|
||||
|
||||
if(special_target)
|
||||
DSmove_manager.home_onto(src, special_target)
|
||||
GLOB.move_manager.home_onto(src, special_target)
|
||||
else
|
||||
DSmove_manager.move_towards(src, real_destination)
|
||||
GLOB.move_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."))
|
||||
DSmove_manager.home_onto(src, special_target)
|
||||
GLOB.move_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()
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_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
|
||||
DSmove_manager.home_onto(src, special_target)
|
||||
GLOB.move_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)
|
||||
DSmove_manager.move_towards(src, destination_turf)
|
||||
GLOB.move_manager.move_towards(src, destination_turf)
|
||||
|
||||
/**
|
||||
* Rod will push the tram to a landmark if it hits the tram from the front/back
|
||||
|
||||
@@ -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))
|
||||
DScommunications.send_message(insurance_message, unique = TRUE)
|
||||
GLOB.communications_controller.send_message(insurance_message, unique = TRUE)
|
||||
|
||||
/datum/round_event/shuttle_insurance/proc/answered()
|
||||
if(EMERGENCY_AT_LEAST_DOCKED)
|
||||
|
||||
@@ -45,5 +45,5 @@
|
||||
|
||||
else if(isliving(hit_atom))
|
||||
var/mob/living/hit_mob = hit_atom
|
||||
DSmove_manager.stop_looping(hit_mob) //stops them mid pathing even if they're stunimmune
|
||||
GLOB.move_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)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/obj/effect/meteor/proc/chase_target(atom/chasing, delay, home)
|
||||
if(!isatom(chasing))
|
||||
return
|
||||
var/datum/move_loop/new_loop = DSmove_manager.move_towards(src, chasing, delay, home, lifetime)
|
||||
var/datum/move_loop/new_loop = GLOB.move_manager.move_towards(src, chasing, delay, home, lifetime)
|
||||
if(!new_loop)
|
||||
return
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
materials = AddComponent( \
|
||||
/datum/component/material_container, \
|
||||
DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
INFINITY, \
|
||||
MATCONTAINER_EXAMINE, \
|
||||
allowed_items = accepted_type \
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
materials = AddComponent( \
|
||||
/datum/component/material_container, \
|
||||
DSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
|
||||
INFINITY, \
|
||||
MATCONTAINER_EXAMINE, \
|
||||
container_signals = list( \
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
SIGNAL_HANDLER
|
||||
mobility_flags &= ~MOBILITY_MOVE
|
||||
if(living_flags & MOVES_ON_ITS_OWN)
|
||||
DSmove_manager.stop_looping(src) //stop mid walk //This is also really dumb
|
||||
GLOB.move_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)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
switch(mode)
|
||||
if(BOT_IDLE) // idle
|
||||
update_appearance()
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_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)
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_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)
|
||||
DSmove_manager.move_to(src, target, 1, 4)
|
||||
GLOB.move_manager.move_to(src, target, 1, 4)
|
||||
if((get_dist(src, target)) >= (olddist))
|
||||
frustration++
|
||||
else
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
target = null
|
||||
oldtarget_name = null
|
||||
set_anchored(FALSE)
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_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
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_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)
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_manager.stop_looping(src)
|
||||
back_to_idle()
|
||||
return
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
|
||||
// not next to perp
|
||||
var/turf/olddist = get_dist(src, target)
|
||||
DSmove_manager.move_to(src, target, 1, 4)
|
||||
GLOB.move_manager.move_to(src, target, 1, 4)
|
||||
if((get_dist(src, target)) >= (olddist))
|
||||
frustration++
|
||||
else
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
/mob/living/simple_animal/hostile/Life(seconds_per_tick = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!.) //dead
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_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
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_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
|
||||
DSmove_manager.move_away(src, target, retreat_distance, move_to_delay, flags = MOVEMENT_LOOP_IGNORE_GLIDE)
|
||||
GLOB.move_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
|
||||
DSmove_manager.move_to(src, target, minimum_distance, delay, flags = MOVEMENT_LOOP_IGNORE_GLIDE)
|
||||
GLOB.move_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
|
||||
DSmove_manager.stop_looping(src)
|
||||
GLOB.move_manager.stop_looping(src)
|
||||
LoseAggro()
|
||||
|
||||
//////////////END HOSTILE MOB TARGETING AND AGGRESSION////////////
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
|
||||
/obj/machinery/anomalous_crystal/theme_warp/Initialize(mapload)
|
||||
. = ..()
|
||||
terrain_theme = DSmaterials.dimensional_themes[pick(subtypesof(/datum/dimension_theme))]
|
||||
terrain_theme = SSmaterials.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)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/curseblob/proc/move_loop(move_target, delay)
|
||||
if(our_loop)
|
||||
return
|
||||
our_loop = DSmove_manager.force_move(src, move_target, delay, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
our_loop = GLOB.move_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))
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
/mob/living/simple_animal/proc/Goto(target, delay, minimum_distance)
|
||||
if(prevent_goto_movement)
|
||||
return FALSE
|
||||
DSmove_manager.move_to(src, target, minimum_distance, delay)
|
||||
GLOB.move_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.
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
if(rebound.last_pushoff == world.time)
|
||||
continue
|
||||
if(continuous_move && !pass_allowed)
|
||||
var/datum/move_loop/move/rebound_engine = DSmove_manager.processing_on(rebound, SSspacedrift)
|
||||
var/datum/move_loop/move/rebound_engine = GLOB.move_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
|
||||
|
||||
@@ -834,7 +834,7 @@
|
||||
. = ..()
|
||||
|
||||
if(!length(accepted_mats))
|
||||
accepted_mats = DSmaterials.materials_by_category[MAT_CATEGORY_SILO]
|
||||
accepted_mats = SSmaterials.materials_by_category[MAT_CATEGORY_SILO]
|
||||
|
||||
container = AddComponent( \
|
||||
/datum/component/material_container, \
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/item/ammo_box/Initialize(mapload)
|
||||
. = ..()
|
||||
custom_materials = DSmaterials.FindOrCreateMaterialCombo(custom_materials, 0.1)
|
||||
custom_materials = SSmaterials.FindOrCreateMaterialCombo(custom_materials, 0.1)
|
||||
if(!start_empty)
|
||||
top_off(starting=TRUE)
|
||||
update_icon_state()
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
reagent_puff.end_life()
|
||||
return
|
||||
|
||||
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)
|
||||
var/datum/move_loop/our_loop = GLOB.move_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))
|
||||
|
||||
|
||||
@@ -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)
|
||||
DSmove_manager.stop_looping(convayable, SSconveyors)
|
||||
GLOB.move_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
|
||||
DSmove_manager.stop_looping(convayable, SSconveyors)
|
||||
GLOB.move_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 = DSmove_manager.processing_on(moving, SSconveyors)
|
||||
var/datum/move_loop/move/moving_loop = GLOB.move_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
|
||||
DSmove_manager.stop_looping(thing, SSconveyors)
|
||||
GLOB.move_manager.stop_looping(thing, SSconveyors)
|
||||
|
||||
// attack with item, place item on conveyor
|
||||
/obj/machinery/conveyor/attackby(obj/item/attacking_item, mob/living/user, params)
|
||||
|
||||
@@ -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 = DSmove_manager.move_disposals(src, delay = delay, timeout = delay * count)
|
||||
var/datum/move_loop/our_loop = GLOB.move_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))
|
||||
|
||||
@@ -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 DSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL]))
|
||||
if(!(GET_MATERIAL_REF(could_blade.material_type) in SSmaterials.materials_by_category[MAT_CATEGORY_ITEM_MATERIAL]))
|
||||
continue
|
||||
if(could_blade.amount < 5)
|
||||
continue
|
||||
|
||||
@@ -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
|
||||
DSmove_manager.move_away(scatter, target, delay = delay, timeout = delay * dist, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
GLOB.move_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(
|
||||
|
||||
+3
-6
@@ -657,6 +657,7 @@
|
||||
#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"
|
||||
@@ -768,6 +769,7 @@
|
||||
#include "code\datums\chat_payload.dm"
|
||||
#include "code\datums\chatmessage.dm"
|
||||
#include "code\datums\cogbar.dm"
|
||||
#include "code\datums\communications.dm"
|
||||
#include "code\datums\dash_weapon.dm"
|
||||
#include "code\datums\datum.dm"
|
||||
#include "code\datums\datumvars.dm"
|
||||
@@ -788,6 +790,7 @@
|
||||
#include "code\datums\map_config.dm"
|
||||
#include "code\datums\minigames_menu.dm"
|
||||
#include "code\datums\mood.dm"
|
||||
#include "code\datums\move_manager.dm"
|
||||
#include "code\datums\movement_detector.dm"
|
||||
#include "code\datums\mutable_appearance.dm"
|
||||
#include "code\datums\numbered_display.dm"
|
||||
@@ -1851,12 +1854,6 @@
|
||||
#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"
|
||||
|
||||
Reference in New Issue
Block a user