mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
515 Compat (#17465)
* ONLY SKYRAT CHANGES * ACTUALLY SKYRAT CHANGES * yolo, revert later * Update alternate_byond_versions.txt Co-authored-by: AnturK <AnturK@users.noreply.github.com>
This commit is contained in:
@@ -11,7 +11,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
|
||||
name = text
|
||||
src.target = target
|
||||
if(isdatum(target)) //Harddel man bad
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/cleanup)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(cleanup))
|
||||
|
||||
/obj/effect/statclick/Destroy()
|
||||
target = null
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
. &= !(protection & CONFIG_ENTRY_HIDDEN)
|
||||
|
||||
/datum/config_entry/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list(NAMEOF(src, name), NAMEOF(src, vv_VAS), NAMEOF(src, default), NAMEOF(src, resident_file), NAMEOF(src, protection), NAMEOF(src, abstract_type), NAMEOF(src, modified), NAMEOF(src, dupes_allowed))
|
||||
var/static/list/banned_edits = list(NAMEOF_STATIC(src, name), NAMEOF_STATIC(src, vv_VAS), NAMEOF_STATIC(src, default), NAMEOF_STATIC(src, resident_file), NAMEOF_STATIC(src, protection), NAMEOF_STATIC(src, abstract_type), NAMEOF_STATIC(src, modified), NAMEOF_STATIC(src, dupes_allowed))
|
||||
if(var_name == NAMEOF(src, config_entry_value))
|
||||
if(protection & CONFIG_ENTRY_LOCKED)
|
||||
return FALSE
|
||||
@@ -129,7 +129,7 @@
|
||||
return FALSE
|
||||
|
||||
/datum/config_entry/number/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list(NAMEOF(src, max_val), NAMEOF(src, min_val), NAMEOF(src, integer))
|
||||
var/static/list/banned_edits = list(NAMEOF_STATIC(src, max_val), NAMEOF_STATIC(src, min_val), NAMEOF_STATIC(src, integer))
|
||||
return !(var_name in banned_edits) && ..()
|
||||
|
||||
/datum/config_entry/flag
|
||||
|
||||
@@ -499,4 +499,4 @@ Example config:
|
||||
|
||||
//Message admins when you can.
|
||||
/datum/controller/configuration/proc/DelayedMessageAdmins(text)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, text), 0)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(message_admins), text), 0)
|
||||
|
||||
@@ -148,7 +148,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
/proc/recover_all_SS_and_recreate_master()
|
||||
del(Master)
|
||||
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
|
||||
sortTim(subsytem_types, /proc/cmp_subsystem_init)
|
||||
sortTim(subsytem_types, GLOBAL_PROC_REF(cmp_subsystem_init))
|
||||
for(var/I in subsytem_types)
|
||||
new I
|
||||
. = Recreate_MC()
|
||||
|
||||
@@ -105,7 +105,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
//Code used for first master on game boot or if existing master got deleted
|
||||
Master = src
|
||||
var/list/subsystem_types = subtypesof(/datum/controller/subsystem)
|
||||
sortTim(subsystem_types, /proc/cmp_subsystem_init)
|
||||
sortTim(subsystem_types, GLOBAL_PROC_REF(cmp_subsystem_init))
|
||||
|
||||
//Find any abandoned subsystem from the previous master (if there was any)
|
||||
var/list/existing_subsystems = list()
|
||||
@@ -131,7 +131,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
|
||||
/datum/controller/master/Shutdown()
|
||||
processing = FALSE
|
||||
sortTim(subsystems, /proc/cmp_subsystem_init)
|
||||
sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))
|
||||
reverse_range(subsystems)
|
||||
for(var/datum/controller/subsystem/ss in subsystems)
|
||||
log_world("Shutting down [ss.name] subsystem...")
|
||||
@@ -226,7 +226,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
stage_sorted_subsystems[i] = list()
|
||||
|
||||
// Sort subsystems by init_order, so they initialize in the correct order.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_init)
|
||||
sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))
|
||||
|
||||
for (var/datum/controller/subsystem/subsystem as anything in subsystems)
|
||||
var/subsystem_init_stage = subsystem.init_stage
|
||||
@@ -236,7 +236,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
stage_sorted_subsystems[subsystem_init_stage] += subsystem
|
||||
|
||||
// Sort subsystems by display setting for easy access.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_display)
|
||||
sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_display))
|
||||
var/start_timeofday = REALTIMEOFDAY
|
||||
for (var/current_init_stage in 1 to INITSTAGE_MAX)
|
||||
|
||||
@@ -430,9 +430,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
queue_tail = null
|
||||
//these sort by lower priorities first to reduce the number of loops needed to add subsequent SS's to the queue
|
||||
//(higher subsystems will be sooner in the queue, adding them later in the loop means we don't have to loop thru them next queue add)
|
||||
sortTim(tickersubsystems, /proc/cmp_subsystem_priority)
|
||||
sortTim(tickersubsystems, GLOBAL_PROC_REF(cmp_subsystem_priority))
|
||||
for(var/I in runlevel_sorted_subsystems)
|
||||
sortTim(I, /proc/cmp_subsystem_priority)
|
||||
sortTim(I, GLOBAL_PROC_REF(cmp_subsystem_priority))
|
||||
I += tickersubsystems
|
||||
|
||||
var/cached_runlevel = current_runlevel
|
||||
|
||||
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(augury)
|
||||
|
||||
/datum/controller/subsystem/augury/proc/register_doom(atom/A, severity)
|
||||
doombringers[A] = severity
|
||||
RegisterSignal(A, COMSIG_PARENT_QDELETING, .proc/unregister_doom)
|
||||
RegisterSignal(A, COMSIG_PARENT_QDELETING, PROC_REF(unregister_doom))
|
||||
|
||||
/datum/controller/subsystem/augury/proc/unregister_doom(atom/A)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -345,9 +345,9 @@ SUBSYSTEM_DEF(dbcore)
|
||||
continue
|
||||
|
||||
if (warn)
|
||||
INVOKE_ASYNC(query, /datum/db_query.proc/warn_execute)
|
||||
INVOKE_ASYNC(query, TYPE_PROC_REF(/datum/db_query, warn_execute))
|
||||
else
|
||||
INVOKE_ASYNC(query, /datum/db_query.proc/Execute)
|
||||
INVOKE_ASYNC(query, TYPE_PROC_REF(/datum/db_query, Execute))
|
||||
|
||||
for (var/datum/db_query/query as anything in queries)
|
||||
query.sync()
|
||||
|
||||
@@ -54,7 +54,7 @@ PROCESSING_SUBSYSTEM_DEF(dcs)
|
||||
fullid += REF(key)
|
||||
|
||||
if(length(named_arguments))
|
||||
named_arguments = sortTim(named_arguments, /proc/cmp_text_asc)
|
||||
named_arguments = sortTim(named_arguments, GLOBAL_PROC_REF(cmp_text_asc))
|
||||
fullid += named_arguments
|
||||
|
||||
return list2params(fullid)
|
||||
|
||||
@@ -37,9 +37,9 @@ SUBSYSTEM_DEF(eigenstates)
|
||||
for(var/atom/target as anything in targets)
|
||||
eigen_targets["[id_counter]"] += target
|
||||
eigen_id[target] = "[id_counter]"
|
||||
RegisterSignal(target, COMSIG_CLOSET_INSERT, .proc/use_eigenlinked_atom)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/remove_eigen_entry)
|
||||
RegisterSignal(target, COMSIG_ATOM_TOOL_ACT(TOOL_WELDER), .proc/tool_interact)
|
||||
RegisterSignal(target, COMSIG_CLOSET_INSERT, PROC_REF(use_eigenlinked_atom))
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_eigen_entry))
|
||||
RegisterSignal(target, COMSIG_ATOM_TOOL_ACT(TOOL_WELDER), PROC_REF(tool_interact))
|
||||
target.RegisterSignal(target, COMSIG_EIGENSTATE_ACTIVATE, /obj/structure/closet/proc/bust_open)
|
||||
ADD_TRAIT(target, TRAIT_BANNED_FROM_CARGO_SHUTTLE, REF(src))
|
||||
var/obj/item = target
|
||||
|
||||
@@ -146,7 +146,7 @@ SUBSYSTEM_DEF(explosions)
|
||||
else
|
||||
continue
|
||||
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/wipe_color_and_text, wipe_colours), 100)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(wipe_color_and_text), wipe_colours), 100)
|
||||
|
||||
/proc/wipe_color_and_text(list/atom/wiping)
|
||||
for(var/i in wiping)
|
||||
|
||||
@@ -153,22 +153,22 @@ SUBSYSTEM_DEF(job)
|
||||
new_joinable_departments_by_type[department_type] = department
|
||||
department.add_job(job)
|
||||
|
||||
sortTim(new_all_occupations, /proc/cmp_job_display_asc)
|
||||
sortTim(new_all_occupations, GLOBAL_PROC_REF(cmp_job_display_asc))
|
||||
for(var/datum/job/job as anything in new_all_occupations)
|
||||
if(!job.exp_granted_type)
|
||||
continue
|
||||
new_experience_jobs_map[job.exp_granted_type] += list(job)
|
||||
|
||||
sortTim(new_joinable_departments_by_type, /proc/cmp_department_display_asc, associative = TRUE)
|
||||
sortTim(new_joinable_departments_by_type, GLOBAL_PROC_REF(cmp_department_display_asc), associative = TRUE)
|
||||
for(var/department_type in new_joinable_departments_by_type)
|
||||
var/datum/job_department/department = new_joinable_departments_by_type[department_type]
|
||||
sortTim(department.department_jobs, /proc/cmp_job_display_asc)
|
||||
sortTim(department.department_jobs, GLOBAL_PROC_REF(cmp_job_display_asc))
|
||||
new_joinable_departments += department
|
||||
if(department.department_experience_type)
|
||||
new_experience_jobs_map[department.department_experience_type] = department.department_jobs.Copy()
|
||||
|
||||
all_occupations = new_all_occupations
|
||||
joinable_occupations = sortTim(new_joinable_occupations, /proc/cmp_job_display_asc)
|
||||
joinable_occupations = sortTim(new_joinable_occupations, GLOBAL_PROC_REF(cmp_job_display_asc))
|
||||
joinable_departments = new_joinable_departments
|
||||
joinable_departments_by_type = new_joinable_departments_by_type
|
||||
experience_jobs_map = new_experience_jobs_map
|
||||
@@ -882,7 +882,7 @@ SUBSYSTEM_DEF(job)
|
||||
var/oldjobs = SSjob.all_occupations
|
||||
sleep(2 SECONDS)
|
||||
for (var/datum/job/job as anything in oldjobs)
|
||||
INVOKE_ASYNC(src, .proc/RecoverJob, job)
|
||||
INVOKE_ASYNC(src, PROC_REF(RecoverJob), job)
|
||||
|
||||
/datum/controller/subsystem/job/proc/RecoverJob(datum/job/J)
|
||||
var/datum/job/newjob = GetJob(J.title)
|
||||
|
||||
@@ -23,7 +23,7 @@ SUBSYSTEM_DEF(lag_switch)
|
||||
if(auto_switch_pop)
|
||||
auto_switch = TRUE
|
||||
trigger_pop = auto_switch_pop
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_CONNECT, .proc/client_connected)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_CONNECT, PROC_REF(client_connected))
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/lag_switch/proc/client_connected(datum/source, client/connected)
|
||||
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(lag_switch)
|
||||
|
||||
auto_switch = FALSE
|
||||
UnregisterSignal(SSdcs, COMSIG_GLOB_CLIENT_CONNECT)
|
||||
veto_timer_id = addtimer(CALLBACK(src, .proc/set_all_measures, TRUE, TRUE), 20 SECONDS, TIMER_STOPPABLE)
|
||||
veto_timer_id = addtimer(CALLBACK(src, PROC_REF(set_all_measures), TRUE, TRUE), 20 SECONDS, TIMER_STOPPABLE)
|
||||
message_admins("Lag Switch population threshold reached. Automatic activation of lag mitigation measures occuring in 20 seconds. (<a href='?_src_=holder;[HrefToken()];change_lag_switch_option=CANCEL'>CANCEL</a>)")
|
||||
log_admin("Lag Switch population threshold reached. Automatic activation of lag mitigation measures occuring in 20 seconds.")
|
||||
|
||||
@@ -41,7 +41,7 @@ SUBSYSTEM_DEF(lag_switch)
|
||||
/datum/controller/subsystem/lag_switch/proc/toggle_auto_enable()
|
||||
auto_switch = !auto_switch
|
||||
if(auto_switch)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_CONNECT, .proc/client_connected)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_CONNECT, PROC_REF(client_connected))
|
||||
else
|
||||
UnregisterSignal(SSdcs, COMSIG_GLOB_CLIENT_CONNECT)
|
||||
|
||||
|
||||
@@ -132,4 +132,4 @@ SUBSYSTEM_DEF(lua)
|
||||
|
||||
// Update every lua editor TGUI open for each state that had a task awakened or resumed
|
||||
for(var/datum/lua_state/state in affected_states)
|
||||
INVOKE_ASYNC(state, /datum/lua_state.proc/update_editors)
|
||||
INVOKE_ASYNC(state, TYPE_PROC_REF(/datum/lua_state, update_editors))
|
||||
|
||||
@@ -261,7 +261,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
message_admins("Shuttles in transit detected. Attempting to fast travel. Timeout is [wipe_safety_delay/10] seconds.")
|
||||
var/list/cleared = list()
|
||||
for(var/i in in_transit)
|
||||
INVOKE_ASYNC(src, .proc/safety_clear_transit_dock, i, in_transit[i], cleared)
|
||||
INVOKE_ASYNC(src, PROC_REF(safety_clear_transit_dock), i, in_transit[i], cleared)
|
||||
UNTIL((go_ahead < world.time) || (cleared.len == in_transit.len))
|
||||
do_wipe_turf_reservations()
|
||||
clearing_reserved_turfs = FALSE
|
||||
@@ -542,7 +542,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
banned += generateMapList("spaceruinblacklist.txt")
|
||||
banned += generateMapList("iceruinblacklist.txt")
|
||||
|
||||
for(var/item in sort_list(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
|
||||
for(var/item in sort_list(subtypesof(/datum/map_template/ruin), GLOBAL_PROC_REF(cmp_ruincost_priority)))
|
||||
var/datum/map_template/ruin/ruin_type = item
|
||||
// screen out the abstract subtypes
|
||||
if(!initial(ruin_type.id))
|
||||
|
||||
@@ -155,7 +155,7 @@ SUBSYSTEM_DEF(materials)
|
||||
for(var/x in materials_declaration)
|
||||
var/datum/material/mat = x
|
||||
combo_params += "[istype(mat) ? mat.id : mat]=[materials_declaration[mat] * multiplier]"
|
||||
sortTim(combo_params, /proc/cmp_text_asc) // We have to sort now in case the declaration was not in order
|
||||
sortTim(combo_params, GLOBAL_PROC_REF(cmp_text_asc)) // We have to sort now in case the declaration was not in order
|
||||
var/combo_index = combo_params.Join("-")
|
||||
var/list/combo = material_combos[combo_index]
|
||||
if(!combo)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
src.controller = controller
|
||||
src.extra_info = extra_info
|
||||
if(extra_info)
|
||||
RegisterSignal(extra_info, COMSIG_PARENT_QDELETING, .proc/info_deleted)
|
||||
RegisterSignal(extra_info, COMSIG_PARENT_QDELETING, PROC_REF(info_deleted))
|
||||
src.moving = moving
|
||||
src.priority = priority
|
||||
src.flags = flags
|
||||
@@ -240,7 +240,7 @@
|
||||
target = chasing
|
||||
|
||||
if(!isturf(target))
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/handle_no_target) //Don't do this for turfs, because we don't care
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(handle_no_target)) //Don't do this for turfs, because we don't care
|
||||
|
||||
/datum/move_loop/has_target/compare_loops(datum/move_loop/loop_type, priority, flags, extra_info, delay, timeout, atom/chasing)
|
||||
if(..() && chasing == target)
|
||||
@@ -369,7 +369,7 @@
|
||||
src.avoid = avoid
|
||||
src.skip_first = skip_first
|
||||
if(isidcard(id))
|
||||
RegisterSignal(id, COMSIG_PARENT_QDELETING, .proc/handle_no_id) //I prefer erroring to harddels. If this breaks anything consider making id info into a datum or something
|
||||
RegisterSignal(id, COMSIG_PARENT_QDELETING, PROC_REF(handle_no_id)) //I prefer erroring to harddels. If this breaks anything consider making id info into a datum or something
|
||||
|
||||
/datum/move_loop/has_target/jps/compare_loops(datum/move_loop/loop_type, priority, flags, extra_info, delay, timeout, atom/chasing, repath_delay, max_path_length, minimum_distance, obj/item/card/id/id, simulated_only, turf/avoid, skip_first)
|
||||
if(..() && repath_delay == src.repath_delay && max_path_length == src.max_path_length && minimum_distance == src.minimum_distance && id == src.id && simulated_only == src.simulated_only && avoid == src.avoid)
|
||||
@@ -378,7 +378,7 @@
|
||||
|
||||
/datum/move_loop/has_target/jps/start_loop()
|
||||
. = ..()
|
||||
INVOKE_ASYNC(src, .proc/recalculate_path)
|
||||
INVOKE_ASYNC(src, PROC_REF(recalculate_path))
|
||||
|
||||
/datum/move_loop/has_target/jps/Destroy()
|
||||
id = null //Kill me
|
||||
@@ -399,7 +399,7 @@
|
||||
|
||||
/datum/move_loop/has_target/jps/move()
|
||||
if(!length(movement_path))
|
||||
INVOKE_ASYNC(src, .proc/recalculate_path)
|
||||
INVOKE_ASYNC(src, PROC_REF(recalculate_path))
|
||||
if(!length(movement_path))
|
||||
return FALSE
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
if(get_turf(moving) == next_step)
|
||||
movement_path.Cut(1,2)
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/recalculate_path)
|
||||
INVOKE_ASYNC(src, PROC_REF(recalculate_path))
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -572,8 +572,8 @@
|
||||
|
||||
if(home)
|
||||
if(ismovable(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/update_slope) //If it can move, update your slope when it does
|
||||
RegisterSignal(moving, COMSIG_MOVABLE_MOVED, .proc/handle_move)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(update_slope)) //If it can move, update your slope when it does
|
||||
RegisterSignal(moving, COMSIG_MOVABLE_MOVED, PROC_REF(handle_move))
|
||||
update_slope()
|
||||
|
||||
/datum/move_loop/has_target/move_towards/compare_loops(datum/move_loop/loop_type, priority, flags, extra_info, delay, timeout, atom/chasing, home = FALSE)
|
||||
|
||||
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(pathfinder)
|
||||
while(flow[free])
|
||||
CHECK_TICK
|
||||
free = (free % lcount) + 1
|
||||
var/t = addtimer(CALLBACK(src, /datum/flowcache.proc/toolong, free), 150, TIMER_STOPPABLE)
|
||||
var/t = addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/flowcache, toolong), free), 150, TIMER_STOPPABLE)
|
||||
flow[free] = t
|
||||
flow[t] = M
|
||||
return free
|
||||
|
||||
@@ -221,7 +221,7 @@ SUBSYSTEM_DEF(points_of_interest)
|
||||
else
|
||||
return sort_difference
|
||||
|
||||
/// Priority list broadly stolen from /proc/sortmobs. Lower numbers are higher priorities when sorted and appear closer to the top or start of lists.
|
||||
/// Priority list broadly stolen from /proc/sortmobs(). Lower numbers are higher priorities when sorted and appear closer to the top or start of lists.
|
||||
/datum/point_of_interest/mob_poi/proc/get_type_sort_priority()
|
||||
if(isAI(target))
|
||||
return 0
|
||||
|
||||
@@ -51,7 +51,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
|
||||
// Sort by Positive, Negative, Neutral; and then by name
|
||||
var/list/quirk_list = sort_list(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
|
||||
var/list/quirk_list = sort_list(subtypesof(/datum/quirk), GLOBAL_PROC_REF(cmp_quirk_asc))
|
||||
|
||||
for(var/type in quirk_list)
|
||||
var/datum/quirk/quirk_type = type
|
||||
|
||||
@@ -244,10 +244,10 @@ SUBSYSTEM_DEF(shuttle)
|
||||
/datum/controller/subsystem/shuttle/proc/block_recall(lockout_timer)
|
||||
if(admin_emergency_no_recall)
|
||||
priority_announce("Error!", "Emergency Shuttle Uplink Alert", 'sound/misc/announce_dig.ogg')
|
||||
addtimer(CALLBACK(src, .proc/unblock_recall), lockout_timer)
|
||||
addtimer(CALLBACK(src, PROC_REF(unblock_recall)), lockout_timer)
|
||||
return
|
||||
emergency_no_recall = TRUE
|
||||
addtimer(CALLBACK(src, .proc/unblock_recall), lockout_timer)
|
||||
addtimer(CALLBACK(src, PROC_REF(unblock_recall)), lockout_timer)
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/unblock_recall()
|
||||
if(admin_emergency_no_recall)
|
||||
|
||||
@@ -125,13 +125,13 @@ SUBSYSTEM_DEF(spatial_grid)
|
||||
|
||||
pregenerate_more_oranges_ears(NUMBER_OF_PREGENERATED_ORANGES_EARS)
|
||||
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_NEW_Z, .proc/propogate_spatial_grid_to_new_z)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_EXPANDED_WORLD_BOUNDS, .proc/after_world_bounds_expanded)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_NEW_Z, PROC_REF(propogate_spatial_grid_to_new_z))
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_EXPANDED_WORLD_BOUNDS, PROC_REF(after_world_bounds_expanded))
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
///add a movable to the pre init queue for whichever type is specified so that when the subsystem initializes they get added to the grid
|
||||
/datum/controller/subsystem/spatial_grid/proc/enter_pre_init_queue(atom/movable/waiting_movable, type)
|
||||
RegisterSignal(waiting_movable, COMSIG_PARENT_QDELETING, .proc/queued_item_deleted, override = TRUE)
|
||||
RegisterSignal(waiting_movable, COMSIG_PARENT_QDELETING, PROC_REF(queued_item_deleted), override = TRUE)
|
||||
//override because something can enter the queue for two different types but that is done through unrelated procs that shouldnt know about eachother
|
||||
waiting_to_add_by_type[type] += waiting_movable
|
||||
|
||||
|
||||
@@ -382,8 +382,8 @@ SUBSYSTEM_DEF(statpanels)
|
||||
if(actively_tracking)
|
||||
stop_turf_tracking()
|
||||
var/static/list/connections = list(
|
||||
COMSIG_MOVABLE_MOVED = .proc/on_mob_move,
|
||||
COMSIG_MOB_LOGOUT = .proc/on_mob_logout,
|
||||
COMSIG_MOVABLE_MOVED = PROC_REF(on_mob_move),
|
||||
COMSIG_MOB_LOGOUT = PROC_REF(on_mob_logout),
|
||||
)
|
||||
AddComponent(/datum/component/connect_mob_behalf, parent, connections)
|
||||
actively_tracking = TRUE
|
||||
|
||||
@@ -180,7 +180,7 @@ SUBSYSTEM_DEF(trading_card_game)
|
||||
totalCards++
|
||||
cardsByCount[id] += 1
|
||||
var/toSend = "Out of [totalCards] cards"
|
||||
for(var/id in sort_list(cardsByCount, /proc/cmp_num_string_asc))
|
||||
for(var/id in sort_list(cardsByCount, GLOBAL_PROC_REF(cmp_num_string_asc)))
|
||||
if(id)
|
||||
var/datum/card/template = cached_cards[pack.series]["ALL"][id]
|
||||
toSend += "\nID:[id] [template.name] [(cardsByCount[id] * 100) / totalCards]% Total:[cardsByCount[id]]"
|
||||
|
||||
@@ -94,7 +94,7 @@ SUBSYSTEM_DEF(throwing)
|
||||
/datum/thrownthing/New(thrownthing, target, init_dir, maxrange, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
|
||||
. = ..()
|
||||
src.thrownthing = thrownthing
|
||||
RegisterSignal(thrownthing, COMSIG_PARENT_QDELETING, .proc/on_thrownthing_qdel)
|
||||
RegisterSignal(thrownthing, COMSIG_PARENT_QDELETING, PROC_REF(on_thrownthing_qdel))
|
||||
src.starting_turf = get_turf(thrownthing)
|
||||
src.target_turf = get_turf(target)
|
||||
if(target_turf != target)
|
||||
|
||||
@@ -161,7 +161,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
send2chat("<@&[CONFIG_GET(string/game_alert_role_id)]> New round starting on [SSmapping.config.map_name], [CONFIG_GET(string/servername)]! \nIf you wish to be pinged for game related stuff, go to <#[CONFIG_GET(string/role_assign_channel_id)]> and assign yourself the roles.", CONFIG_GET(string/chat_announce_new_game)) // Skyrat EDIT -- role pingcurrent_state = GAME_STATE_PREGAME
|
||||
current_state = GAME_STATE_PREGAME
|
||||
SStitle.change_title_screen() //SKYRAT EDIT ADDITION - Title screen
|
||||
addtimer(CALLBACK(SStitle, /datum/controller/subsystem/title/.proc/change_title_screen), 1 SECONDS) //SKYRAT EDIT ADDITION - Title screen
|
||||
addtimer(CALLBACK(SStitle, TYPE_PROC_REF(/datum/controller/subsystem/title, change_title_screen)), 1 SECONDS) //SKYRAT EDIT ADDITION - Title screen
|
||||
//Everyone who wants to be an observer is now spawned
|
||||
SEND_SIGNAL(src, COMSIG_TICKER_ENTER_PREGAME)
|
||||
fire()
|
||||
@@ -424,7 +424,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
captainless = FALSE
|
||||
var/acting_captain = !is_captain_job(player_assigned_role)
|
||||
SSjob.promote_to_captain(new_player_living, acting_captain)
|
||||
OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/minor_announce, player_assigned_role.get_captaincy_announcement(new_player_living)))
|
||||
OnRoundstart(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(minor_announce), player_assigned_role.get_captaincy_announcement(new_player_living)))
|
||||
if((player_assigned_role.job_flags & JOB_ASSIGN_QUIRKS) && ishuman(new_player_living) && CONFIG_GET(flag/roundstart_traits))
|
||||
if(new_player_mob.client?.prefs?.should_be_random_hardcore(player_assigned_role, new_player_living.mind))
|
||||
new_player_mob.client.prefs.hardcore_random_setup(new_player_living)
|
||||
@@ -486,7 +486,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
living.client.init_verbs()
|
||||
livings += living
|
||||
if(livings.len)
|
||||
addtimer(CALLBACK(src, .proc/release_characters, livings), 30, TIMER_CLIENT_TIME)
|
||||
addtimer(CALLBACK(src, PROC_REF(release_characters), livings), 30, TIMER_CLIENT_TIME)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/release_characters(list/livings)
|
||||
for(var/I in livings)
|
||||
@@ -531,7 +531,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
return
|
||||
if(world.time - SSticker.round_start_time < 10 MINUTES) //Not forcing map rotation for very short rounds.
|
||||
return
|
||||
INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate)
|
||||
INVOKE_ASYNC(SSmapping, TYPE_PROC_REF(/datum/controller/subsystem/mapping/, maprotate))
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/HasRoundStarted()
|
||||
return current_state >= GAME_STATE_PLAYING
|
||||
|
||||
@@ -101,7 +101,13 @@ SUBSYSTEM_DEF(time_track)
|
||||
last_tick_tickcount = current_tickcount
|
||||
|
||||
var/sendmaps_json = world.Profile(PROFILE_REFRESH, type = "sendmaps", format="json")
|
||||
var/list/send_maps_data = json_decode(sendmaps_json)
|
||||
var/list/send_maps_data = null
|
||||
try
|
||||
send_maps_data = json_decode(sendmaps_json)
|
||||
catch
|
||||
text2file(sendmaps_json,"bad_sendmaps.json")
|
||||
can_fire = FALSE
|
||||
return
|
||||
var/send_maps_sort = send_maps_data.Copy() //Doing it like this guarentees us a properly sorted list
|
||||
|
||||
for(var/list/packet in send_maps_data)
|
||||
|
||||
@@ -277,7 +277,7 @@ SUBSYSTEM_DEF(timer)
|
||||
return
|
||||
|
||||
// Sort all timers by time to run
|
||||
sortTim(alltimers, .proc/cmp_timer)
|
||||
sortTim(alltimers, GLOBAL_PROC_REF(cmp_timer))
|
||||
|
||||
// Get the earliest timer, and if the TTR is earlier than the current world.time,
|
||||
// then set the head offset appropriately to be the earliest time tracked by the
|
||||
|
||||
@@ -89,7 +89,7 @@ SUBSYSTEM_DEF(traitor)
|
||||
uplink_handlers |= uplink_handler
|
||||
// An uplink handler can be registered multiple times if they get assigned to new uplinks, so
|
||||
// override is set to TRUE here because it is intentional that they could get added multiple times.
|
||||
RegisterSignal(uplink_handler, COMSIG_PARENT_QDELETING, .proc/uplink_handler_deleted, override = TRUE)
|
||||
RegisterSignal(uplink_handler, COMSIG_PARENT_QDELETING, PROC_REF(uplink_handler_deleted), override = TRUE)
|
||||
|
||||
/datum/controller/subsystem/traitor/proc/uplink_handler_deleted(datum/uplink_handler/uplink_handler)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -81,7 +81,7 @@ SUBSYSTEM_DEF(verb_manager)
|
||||
#ifdef UNIT_TESTS
|
||||
if(QDELETED(usr) && ismob(incoming_callback.object))
|
||||
incoming_callback.user = WEAKREF(incoming_callback.object)
|
||||
var/datum/callback/new_us = CALLBACK(arglist(list(GLOBAL_PROC, /proc/_queue_verb) + args.Copy()))
|
||||
var/datum/callback/new_us = CALLBACK(arglist(list(GLOBAL_PROC, GLOBAL_PROC_REF(_queue_verb)) + args.Copy()))
|
||||
return world.push_usr(incoming_callback.object, new_us)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ SUBSYSTEM_DEF(weather)
|
||||
run_weather(our_event, list(text2num(z)))
|
||||
eligible_zlevels -= z
|
||||
var/randTime = rand(3000, 6000)
|
||||
next_hit_by_zlevel["[z]"] = addtimer(CALLBACK(src, .proc/make_eligible, z, possible_weather), randTime + initial(our_event.weather_duration_upper), TIMER_UNIQUE|TIMER_STOPPABLE) //Around 5-10 minutes between weathers
|
||||
next_hit_by_zlevel["[z]"] = addtimer(CALLBACK(src, PROC_REF(make_eligible), z, possible_weather), randTime + initial(our_event.weather_duration_upper), TIMER_UNIQUE|TIMER_STOPPABLE) //Around 5-10 minutes between weathers
|
||||
|
||||
/datum/controller/subsystem/weather/Initialize()
|
||||
for(var/V in subtypesof(/datum/weather))
|
||||
|
||||
Reference in New Issue
Block a user