mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-09 14:15:22 +01:00
515 Compatibility (#19636)
* 515 compat * double spaces * Callback documentation, aa review * spacing * NAMEOF_STATIC * big beta
This commit is contained in:
@@ -10,6 +10,6 @@ export STABLE_BYOND_MINOR=1589
|
||||
# Beta Byond Major
|
||||
export BETA_BYOND_MAJOR=515
|
||||
# Beta Byond Minor
|
||||
export BETA_BYOND_MINOR=1593
|
||||
export BETA_BYOND_MINOR=1594
|
||||
# Python version for mapmerge and other tools
|
||||
export PYTHON_VERSION=3.7.9
|
||||
|
||||
@@ -320,5 +320,3 @@
|
||||
*/
|
||||
#define rustg_worley_generate(region_size, threshold, node_per_region_chance, size, node_min, node_max) \
|
||||
RUSTG_CALL(RUST_G, "worley_generate")(region_size, threshold, node_per_region_chance, size, node_min, node_max)
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
/world/proc/enable_auxtools_debugger()
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
call(debug_server, "auxtools_init")()
|
||||
CALL_EXT(debug_server, "auxtools_init")()
|
||||
enable_debugging()
|
||||
|
||||
// Called in world/Del(). This is VERY important, otherwise you get phantom threads which try to lookup RAM they arent allowed to
|
||||
/world/proc/disable_auxtools_debugger()
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
call(debug_server, "auxtools_shutdown")()
|
||||
CALL_EXT(debug_server, "auxtools_shutdown")()
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
/proc/flick_overlay(image/I, list/show_to, duration)
|
||||
for(var/client/C in show_to)
|
||||
C.images += I
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/remove_images_from_clients, I, show_to), duration, TIMER_CLIENT_TIME)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(remove_images_from_clients), I, show_to), duration, TIMER_CLIENT_TIME)
|
||||
|
||||
/proc/flick_overlay_view(image/I, atom/target, duration) //wrapper for the above, flicks to everyone who can see the target atom
|
||||
var/list/viewing = list()
|
||||
|
||||
@@ -423,8 +423,8 @@
|
||||
// By default, checks for weakness and stunned get added to the extra_checks list.
|
||||
// Setting `use_default_checks` to FALSE means that you don't want the do_after to check for these statuses, or that you will be supplying your own checks.
|
||||
if(use_default_checks)
|
||||
extra_checks += CALLBACK(user, /mob/living.proc/IsWeakened)
|
||||
extra_checks += CALLBACK(user, /mob/living.proc/IsStunned)
|
||||
extra_checks += CALLBACK(user, TYPE_PROC_REF(/mob/living, IsWeakened))
|
||||
extra_checks += CALLBACK(user, TYPE_PROC_REF(/mob/living, IsStunned))
|
||||
|
||||
while(world.time < endtime)
|
||||
sleep(1)
|
||||
@@ -475,7 +475,7 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list())
|
||||
to_chat(user, "<span class='warning'>[attempt_cancel_message]</span>")
|
||||
return FALSE
|
||||
GLOB.do_after_once_tracker[cache_key] = TRUE
|
||||
. = do_after(user, delay, needhand, target, progress, extra_checks = list(CALLBACK(GLOBAL_PROC, .proc/do_after_once_checks, cache_key)))
|
||||
. = do_after(user, delay, needhand, target, progress, extra_checks = list(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(do_after_once_checks), cache_key)))
|
||||
GLOB.do_after_once_tracker[cache_key] = FALSE
|
||||
|
||||
/proc/do_after_once_checks(cache_key)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
|
||||
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
|
||||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE)
|
||||
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
|
||||
#define QDEL_NULL(item) if(item) { qdel(item); item = null }
|
||||
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
|
||||
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
|
||||
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE)
|
||||
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
|
||||
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//simple insertion sort - generally faster than merge for runs of 7 or smaller
|
||||
/proc/sortInsert(list/L, cmp = /proc/cmp_numeric_asc, associative, fromIndex = 1, toIndex = 0)
|
||||
/proc/sortInsert(list/L, cmp = GLOBAL_PROC_REF(cmp_numeric_asc), associative, fromIndex = 1, toIndex = 0)
|
||||
if(L && L.len >= 2)
|
||||
fromIndex = fromIndex % L.len
|
||||
toIndex = toIndex % (L.len + 1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//merge-sort - gernerally faster than insert sort, for runs of 7 or larger
|
||||
/proc/sortMerge(list/L, cmp = /proc/cmp_numeric_asc, associative, fromIndex = 1, toIndex)
|
||||
/proc/sortMerge(list/L, cmp = GLOBAL_PROC_REF(cmp_numeric_asc), associative, fromIndex = 1, toIndex)
|
||||
if(L && L.len >= 2)
|
||||
fromIndex = fromIndex % L.len
|
||||
toIndex = toIndex % (L.len + 1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//TimSort interface
|
||||
/proc/sortTim(list/L, cmp = /proc/cmp_numeric_asc, associative, fromIndex = 1, toIndex = 0)
|
||||
/proc/sortTim(list/L, cmp = GLOBAL_PROC_REF(cmp_numeric_asc), associative, fromIndex = 1, toIndex = 0)
|
||||
if(L && L.len >= 2)
|
||||
fromIndex = fromIndex % L.len
|
||||
toIndex = toIndex % (L.len + 1)
|
||||
|
||||
@@ -1459,9 +1459,9 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
//datum may be null, but it does need to be a typed var
|
||||
#define NAMEOF(datum, X) (#X || ##datum.##X)
|
||||
|
||||
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, /proc/___callbackvarset, ##target, ##var_name, ##var_value)
|
||||
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, PROC_REF(___callbackvarset), ##target, ##var_name, ##var_value)
|
||||
//dupe code because dm can't handle 3 level deep macros
|
||||
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, /proc/___callbackvarset, ##datum, NAMEOF(##datum, ##var), ##var_value)
|
||||
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##datum, NAMEOF(##datum, ##var), ##var_value)
|
||||
|
||||
/proc/___callbackvarset(list_or_datum, var_name, var_value)
|
||||
if(length(list_or_datum))
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// This file contains defines allowing targeting byond versions newer than the supported
|
||||
|
||||
// So we want to have compile time guarantees these procs exist on local type, unfortunately 515 killed the .proc/procname syntax so we have to use nameof()
|
||||
#if DM_VERSION < 515
|
||||
#define PROC_REF(X) (.proc/##X)
|
||||
#define TYPE_PROC_REF(TYPE, X) (##TYPE.proc/##X)
|
||||
#define GLOBAL_PROC_REF(X) (.proc/##X)
|
||||
#define NAMEOF_STATIC(datum, X) (#X || ##datum.##X)
|
||||
#define CALL_EXT call
|
||||
#else
|
||||
/// Validates the proc exists on this type (or global unfortunately)
|
||||
#define PROC_REF(X) (nameof(.proc/##X))
|
||||
#define TYPE_PROC_REF(TYPE, X) (nameof(##TYPE.proc/##X))
|
||||
#define GLOBAL_PROC_REF(X) (/proc/##X)
|
||||
#define NAMEOF_STATIC(datum, X) (#X || type::##X)
|
||||
#define CALL_EXT call_ext
|
||||
#endif
|
||||
@@ -12,7 +12,7 @@
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr)) // should stop you from dragging through windows
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(over, .proc/MouseDrop_T, src, usr)
|
||||
INVOKE_ASYNC(over, PROC_REF(MouseDrop_T), src, usr)
|
||||
|
||||
// recieve a mousedrop
|
||||
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
var/timeout = timeout_override || alert.timeout
|
||||
if(timeout)
|
||||
addtimer(CALLBACK(alert, /obj/screen/alert/.proc/do_timeout, src, category), timeout)
|
||||
addtimer(CALLBACK(alert, TYPE_PROC_REF(/obj/screen/alert, do_timeout), src, category), timeout)
|
||||
alert.timeout = world.time + timeout - world.tick_lag
|
||||
|
||||
return alert
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
C.parallax_movedir = new_parallax_movedir
|
||||
if(C.parallax_animate_timer)
|
||||
deltimer(C.parallax_animate_timer)
|
||||
var/datum/callback/CB = CALLBACK(src, .proc/update_parallax_motionblur, C, animatedir, new_parallax_movedir, newtransform)
|
||||
var/datum/callback/CB = CALLBACK(src, PROC_REF(update_parallax_motionblur), C, animatedir, new_parallax_movedir, newtransform)
|
||||
if(skip_windups)
|
||||
CB.Invoke()
|
||||
else
|
||||
|
||||
@@ -13,5 +13,5 @@ SUBSYSTEM_DEF(assets)
|
||||
preload = cache.Copy() //don't preload assets generated during the round
|
||||
|
||||
for(var/client/C in GLOB.clients)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, preload, FALSE), 10)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(getFilesSlow), C, preload, FALSE), 10)
|
||||
return ..()
|
||||
|
||||
@@ -284,9 +284,9 @@ SUBSYSTEM_DEF(dbcore)
|
||||
else
|
||||
query = thing
|
||||
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/thing in querys)
|
||||
var/datum/db_query/query
|
||||
|
||||
@@ -121,7 +121,7 @@ SUBSYSTEM_DEF(http)
|
||||
/client/verb/testing()
|
||||
set name = "Testing"
|
||||
|
||||
var/datum/callback/cb = CALLBACK(src, /client/.proc/response, usr)
|
||||
var/datum/callback/cb = CALLBACK(src, TYPE_PROC_REF(/client, response), usr)
|
||||
SShttp.create_async_request(RUSTG_HTTP_METHOD_GET, "http://site.domain/page.html", proc_callback=cb)
|
||||
|
||||
/client/proc/response(mob/user, datum/http_response/response)
|
||||
|
||||
@@ -41,7 +41,7 @@ SUBSYSTEM_DEF(mob_hunt)
|
||||
recover_time = 3000
|
||||
if(recover_time > 0) //when provided with a negative or zero valued recover_time argument, the server won't auto-restart but can be manually rebooted still
|
||||
//set a timer to automatically recover after recover_time has passed (can be manually restarted if you get impatient too)
|
||||
addtimer(CALLBACK(src, .proc/auto_recover), recover_time, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(auto_recover)), recover_time, TIMER_UNIQUE)
|
||||
|
||||
/datum/controller/subsystem/mob_hunt/proc/client_mob_update()
|
||||
var/list/ex_players = list()
|
||||
|
||||
@@ -133,7 +133,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
Master.SetRunLevel(RUNLEVEL_POSTGAME) // This shouldnt process more than once, but you never know
|
||||
auto_toggle_ooc(TRUE) // Turn it on
|
||||
declare_completion()
|
||||
addtimer(CALLBACK(src, .proc/call_reboot), 5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(call_reboot)), 5 SECONDS)
|
||||
// Start a map vote IF
|
||||
// - Map rotate doesnt have a mode for today and map voting is enabled
|
||||
// - Map rotate has a mode for the day and it ISNT full random
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -38,7 +38,7 @@ SUBSYSTEM_DEF(weather)
|
||||
run_weather(W, list(text2num(z)))
|
||||
eligible_zlevels -= z
|
||||
var/randTime = rand(3000, 6000)
|
||||
addtimer(CALLBACK(src, .proc/make_eligible, z, possible_weather), randTime + initial(W.weather_duration_upper), TIMER_UNIQUE) //Around 5-10 minutes between weathers
|
||||
addtimer(CALLBACK(src, PROC_REF(make_eligible), z, possible_weather), randTime + initial(W.weather_duration_upper), TIMER_UNIQUE) //Around 5-10 minutes between weathers
|
||||
next_hit_by_zlevel["[z]"] = world.time + randTime + initial(W.telegraph_duration)
|
||||
|
||||
/datum/controller/subsystem/weather/Initialize(start_timeofday)
|
||||
|
||||
+1
-1
@@ -160,5 +160,5 @@
|
||||
|
||||
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10,beam_type=/obj/effect/ebeam,beam_sleep_time=3)
|
||||
var/datum/beam/newbeam = new(src,BeamTarget,icon,icon_state,time,maxdistance,beam_type,beam_sleep_time)
|
||||
INVOKE_ASYNC(newbeam, /datum/beam.proc/Start)
|
||||
INVOKE_ASYNC(newbeam, TYPE_PROC_REF(/datum/beam, Start))
|
||||
return newbeam
|
||||
|
||||
+11
-19
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
USAGE:
|
||||
|
||||
var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn)
|
||||
var/datum/callback/C = new(object|null, PROC_REF(procname)|GLOBAL_PROC_REF(procname)|TYPE_PROC_REF(type, procname), arg1, arg2, ... argn)
|
||||
var/timerid = addtimer(C, time, timertype)
|
||||
OR
|
||||
var/timerid = addtimer(CALLBACK(object|null, /proc/type/path|procstring, arg1, arg2, ... argn), time, timertype)
|
||||
var/timerid = addtimer(CALLBACK(object|null, PROC_REF(procname)|GLOBAL_PROC_REF(procname)|TYPE_PROC_REF(type, procname), arg1, arg2, ... argn), time, timertype)
|
||||
|
||||
Note: proc strings can only be given for datum proc calls, global procs must be proc paths
|
||||
Also proc strings are strongly advised against because they don't compile error if the proc stops existing
|
||||
@@ -19,28 +19,20 @@
|
||||
|
||||
PROC TYPEPATH SHORTCUTS (these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...)
|
||||
|
||||
global proc while in another global proc:
|
||||
.procname
|
||||
global proc:
|
||||
GLOBAL_PROC_REF(procname)
|
||||
Example:
|
||||
CALLBACK(GLOBAL_PROC, .some_proc_here)
|
||||
CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(some_proc_here))
|
||||
|
||||
proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents:
|
||||
.procname
|
||||
proc defined on current(src) object:
|
||||
PROC_REF(procname)
|
||||
Example:
|
||||
CALLBACK(src, .some_proc_here)
|
||||
CALLBACK(src, PROC_REF(some_proc_here))
|
||||
|
||||
|
||||
when the above doesn't apply:
|
||||
.proc/procname
|
||||
proc defined on some other type:
|
||||
TYPE_PROC_REF(some_type, procname)
|
||||
Example:
|
||||
CALLBACK(src, .proc/some_proc_here)
|
||||
|
||||
proc defined on a parent of a some type:
|
||||
/some/type/.proc/some_proc_here
|
||||
|
||||
|
||||
|
||||
Other wise you will have to do the full typepath of the proc (/type/of/thing/proc/procname)
|
||||
CALLBACK(other_atom, TYPE_PROC_REF(other_atom_type, procname)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
stack_trace("/datum/chatmessage created with [isnull(owner) ? "null" : "invalid"] mob owner")
|
||||
qdel(src)
|
||||
return
|
||||
INVOKE_ASYNC(src, .proc/generate_image, text, target, owner, lifespan, italics, size, symbol)
|
||||
INVOKE_ASYNC(src, PROC_REF(generate_image), text, target, owner, lifespan, italics, size, symbol)
|
||||
|
||||
/datum/chatmessage/Destroy()
|
||||
if (owned_by)
|
||||
@@ -100,7 +100,7 @@
|
||||
/datum/chatmessage/proc/generate_image(text, atom/target, mob/owner, lifespan, italics, size, symbol)
|
||||
// Register client who owns this message
|
||||
owned_by = owner.client
|
||||
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, .proc/on_parent_qdel)
|
||||
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, PROC_REF(on_parent_qdel))
|
||||
|
||||
// Clip message
|
||||
var/maxlen = CHAT_MESSAGE_MAX_LENGTH
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
probability = _probability
|
||||
flags = _flags
|
||||
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED), .proc/Crossed)
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED), PROC_REF(Crossed))
|
||||
|
||||
/datum/component/caltrop/proc/Crossed(datum/source, atom/movable/AM)
|
||||
var/atom/A = parent
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
/datum/component/decal/RegisterWithParent()
|
||||
if(first_dir)
|
||||
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_react)
|
||||
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, PROC_REF(rotate_react))
|
||||
if(cleanable)
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react)
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_react))
|
||||
if(description)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(examine))
|
||||
|
||||
/datum/component/decal/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE))
|
||||
@@ -52,13 +52,13 @@
|
||||
var/atom/master = thing || parent
|
||||
master.add_overlay(pic, TRUE)
|
||||
if(isitem(master))
|
||||
addtimer(CALLBACK(master, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(master, TYPE_PROC_REF(/obj/item, update_slot_icon)), 0, TIMER_UNIQUE)
|
||||
|
||||
/datum/component/decal/proc/remove(atom/thing)
|
||||
var/atom/master = thing || parent
|
||||
master.cut_overlay(pic, TRUE)
|
||||
if(isitem(master))
|
||||
addtimer(CALLBACK(master, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(master, TYPE_PROC_REF(/obj/item, update_slot_icon)), 0, TIMER_UNIQUE)
|
||||
|
||||
/datum/component/decal/proc/rotate_react(datum/source, old_dir, new_dir)
|
||||
if(old_dir == new_dir)
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
if(!istype(I)) //Something went wrong
|
||||
return
|
||||
if(!hide_tape) //if TRUE this hides the tape overlay and added examine text
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/add_tape_overlay)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/add_tape_text)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(add_tape_overlay))
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(add_tape_text))
|
||||
x_offset = x
|
||||
y_offset = y
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/afterattack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_PICKUP, .proc/pick_up)
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, PROC_REF(afterattack))
|
||||
RegisterSignal(parent, COMSIG_ITEM_PICKUP, PROC_REF(pick_up))
|
||||
I.update_icon() //Do this first so the action button properly shows the icon
|
||||
if(!hide_tape) //the tape can no longer be removed if TRUE
|
||||
var/datum/action/item_action/remove_tape/RT = new(I)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
)
|
||||
say_lines = text || default_lines
|
||||
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_VAR_EDIT, .proc/var_edit_react)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_VAR_EDIT, PROC_REF(var_edit_react))
|
||||
|
||||
/datum/component/edit_complainer/proc/var_edit_react(datum/source, list/arguments)
|
||||
var/atom/movable/master = parent
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/datum/component/emissive_blocker/Initialize(_stored_blocker)
|
||||
var/atom/movable/A = parent
|
||||
stored_blocker = _stored_blocker
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_ICON_STATE, .proc/update_generic_block)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_ICON_STATE, PROC_REF(update_generic_block))
|
||||
A.add_overlay(stored_blocker)
|
||||
|
||||
/datum/component/emissive_blocker/Destroy()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if(FOOTSTEP_MOB_HUMAN)
|
||||
if(!ishuman(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_humanstep)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(play_humanstep))
|
||||
return
|
||||
if(FOOTSTEP_MOB_CLAW)
|
||||
footstep_sounds = GLOB.clawfootstep
|
||||
@@ -38,13 +38,13 @@
|
||||
footstep_sounds = 'sound/effects/footstep/slime1.ogg'
|
||||
if(FOOTSTEP_OBJ_MACHINE)
|
||||
footstep_sounds = 'sound/effects/bang.ogg'
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_simplestep_machine) //Note that this doesn't get called for humans.
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(play_simplestep_machine)) //Note that this doesn't get called for humans.
|
||||
return
|
||||
if(FOOTSTEP_OBJ_ROBOT)
|
||||
footstep_sounds = 'sound/effects/tank_treads.ogg'
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_simplestep_machine) //Note that this doesn't get called for humans.
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(play_simplestep_machine)) //Note that this doesn't get called for humans.
|
||||
return
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_simplestep) //Note that this doesn't get called for humans.
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(play_simplestep)) //Note that this doesn't get called for humans.
|
||||
|
||||
///Prepares a footstep. Determines if it should get played. Returns the turf it should get played on. Note that it is always a /turf/simulated/floor (eventually /turf/open)
|
||||
/datum/component/footstep/proc/prepare_step()
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
apply_label()
|
||||
|
||||
/datum/component/label/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/OnAttackby)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/Examine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(OnAttackby))
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(Examine))
|
||||
|
||||
/datum/component/label/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_PARENT_ATTACKBY, COMSIG_PARENT_EXAMINE))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/component/largetransparency/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/OnMove)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(OnMove))
|
||||
RegisterWithTurfs()
|
||||
|
||||
/datum/component/largetransparency/UnregisterFromParent()
|
||||
@@ -52,9 +52,9 @@
|
||||
registered_turfs = block(lowleft_turf, upright_turf) //small problems with z level edges due to object size offsets, but nothing truly problematic.
|
||||
//register the signals
|
||||
for(var/registered_turf in registered_turfs)
|
||||
RegisterSignal(registered_turf, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_INITIALIZED_ON), .proc/objectEnter)
|
||||
RegisterSignal(registered_turf, COMSIG_ATOM_EXITED, .proc/objectLeave)
|
||||
RegisterSignal(registered_turf, COMSIG_TURF_CHANGE, .proc/OnTurfChange)
|
||||
RegisterSignal(registered_turf, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_INITIALIZED_ON), PROC_REF(objectEnter))
|
||||
RegisterSignal(registered_turf, COMSIG_ATOM_EXITED, PROC_REF(objectLeave))
|
||||
RegisterSignal(registered_turf, COMSIG_TURF_CHANGE, PROC_REF(OnTurfChange))
|
||||
for(var/thing in registered_turf)
|
||||
var/atom/check_atom = thing
|
||||
if(!(check_atom.flags_2 & CRITICAL_ATOM_2))
|
||||
@@ -76,7 +76,7 @@
|
||||
RegisterWithTurfs()
|
||||
|
||||
/datum/component/largetransparency/proc/OnTurfChange()
|
||||
addtimer(CALLBACK(src, .proc/OnMove), 0, TIMER_UNIQUE|TIMER_OVERRIDE) //*pain
|
||||
addtimer(CALLBACK(src, PROC_REF(OnMove)), 0, TIMER_UNIQUE|TIMER_OVERRIDE) //*pain
|
||||
|
||||
/datum/component/largetransparency/proc/objectEnter(datum/source, atom/enterer)
|
||||
if(!(enterer.flags_2 & CRITICAL_ATOM_2))
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
precondition = _precondition
|
||||
after_insert = _after_insert
|
||||
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/OnExamine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(OnAttackBy))
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(OnExamine))
|
||||
|
||||
var/list/possible_mats = list()
|
||||
for(var/mat_type in subtypesof(/datum/material))
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
orbiter_list += orbiter
|
||||
|
||||
// make sure orbits get cleaned up nicely if the parent qdels
|
||||
RegisterSignal(orbiter, COMSIG_PARENT_QDELETING, .proc/end_orbit)
|
||||
RegisterSignal(orbiter, COMSIG_PARENT_QDELETING, PROC_REF(end_orbit))
|
||||
|
||||
var/orbit_flags = 0
|
||||
if(lock_in_orbit)
|
||||
@@ -115,7 +115,7 @@
|
||||
store_orbit_data(orbiter, orbit_flags)
|
||||
|
||||
if(!lock_in_orbit)
|
||||
RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, .proc/orbiter_move_react)
|
||||
RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, PROC_REF(orbiter_move_react))
|
||||
|
||||
// Head first!
|
||||
if(pre_rotation)
|
||||
@@ -274,13 +274,13 @@
|
||||
return
|
||||
var/atom/cur_atom = start
|
||||
while(cur_atom.loc && !isturf(cur_atom.loc) && !(cur_atom.loc in orbiter_list))
|
||||
RegisterSignal(cur_atom, COMSIG_MOVABLE_MOVED, .proc/on_intermediate_move, TRUE)
|
||||
RegisterSignal(cur_atom, COMSIG_ATOM_EXITED, .proc/on_remove_child, TRUE)
|
||||
RegisterSignal(cur_atom, COMSIG_MOVABLE_MOVED, PROC_REF(on_intermediate_move), TRUE)
|
||||
RegisterSignal(cur_atom, COMSIG_ATOM_EXITED, PROC_REF(on_remove_child), TRUE)
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
// Set the topmost atom (right before the turf) to be our new leader
|
||||
RegisterSignal(cur_atom, COMSIG_MOVABLE_MOVED, .proc/parent_move_react, TRUE)
|
||||
RegisterSignal(cur_atom, COMSIG_ATOM_EXITED, .proc/on_remove_child, TRUE)
|
||||
RegisterSignal(cur_atom, COMSIG_MOVABLE_MOVED, PROC_REF(parent_move_react), TRUE)
|
||||
RegisterSignal(cur_atom, COMSIG_ATOM_EXITED, PROC_REF(on_remove_child), TRUE)
|
||||
return cur_atom
|
||||
|
||||
/**
|
||||
@@ -296,9 +296,9 @@
|
||||
return
|
||||
// Remove all signals upwards of the child and re-register them as the new parent
|
||||
remove_signals(exiting)
|
||||
RegisterSignal(exiting, COMSIG_MOVABLE_MOVED, .proc/parent_move_react, TRUE)
|
||||
RegisterSignal(exiting, COMSIG_ATOM_EXITED, .proc/on_remove_child, TRUE)
|
||||
INVOKE_ASYNC(src, .proc/handle_parent_move, exiting, exiting.loc, new_loc)
|
||||
RegisterSignal(exiting, COMSIG_MOVABLE_MOVED, PROC_REF(parent_move_react), TRUE)
|
||||
RegisterSignal(exiting, COMSIG_ATOM_EXITED, PROC_REF(on_remove_child), TRUE)
|
||||
INVOKE_ASYNC(src, PROC_REF(handle_parent_move), exiting, exiting.loc, new_loc)
|
||||
|
||||
/**
|
||||
* Called when an intermediate (somewhere between the topmost and the orbited) atom moves.
|
||||
@@ -312,9 +312,9 @@
|
||||
return
|
||||
|
||||
remove_signals(old_loc) // TODO this doesn't work if something's removed from hand
|
||||
RegisterSignal(tracked, COMSIG_MOVABLE_MOVED, .proc/parent_move_react, TRUE)
|
||||
RegisterSignal(tracked, COMSIG_ATOM_EXITED, .proc/on_remove_child, TRUE)
|
||||
INVOKE_ASYNC(src, .proc/handle_parent_move, tracked, old_loc, tracked.loc)
|
||||
RegisterSignal(tracked, COMSIG_MOVABLE_MOVED, PROC_REF(parent_move_react), TRUE)
|
||||
RegisterSignal(tracked, COMSIG_ATOM_EXITED, PROC_REF(on_remove_child), TRUE)
|
||||
INVOKE_ASYNC(src, PROC_REF(handle_parent_move), tracked, old_loc, tracked.loc)
|
||||
|
||||
/**
|
||||
* Returns TRUE if atom_to_find is transitively a parent of src.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/current_paint
|
||||
|
||||
/datum/component/spraycan_paintable/Initialize()
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/Repaint)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(Repaint))
|
||||
|
||||
/datum/component/spraycan_paintable/Destroy()
|
||||
RemoveCurrentCoat()
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
persistent_overlay = image_overlay
|
||||
target = _target
|
||||
if(timer)
|
||||
addtimer(CALLBACK(src, .proc/remove_persistent_overlay), timer)
|
||||
addtimer(CALLBACK(src, PROC_REF(remove_persistent_overlay)), timer)
|
||||
if(target)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/remove_persistent_overlay)
|
||||
RegisterSignal(parent, COMSIG_PARENT_QDELETING, .proc/remove_persistent_overlay)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_persistent_overlay))
|
||||
RegisterSignal(parent, COMSIG_PARENT_QDELETING, PROC_REF(remove_persistent_overlay))
|
||||
add_persistent_overlay()
|
||||
|
||||
/datum/component/persistent_overlay/Destroy()
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
|
||||
/datum/component/proximity_monitor/RegisterWithParent()
|
||||
if(ismovable(hasprox_receiver))
|
||||
RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_MOVED, .proc/on_receiver_move)
|
||||
RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_DISPOSING, .proc/on_disposal_enter)
|
||||
RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_EXIT_DISPOSALS, .proc/on_disposal_exit)
|
||||
RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_MOVED, PROC_REF(on_receiver_move))
|
||||
RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_DISPOSING, PROC_REF(on_disposal_enter))
|
||||
RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_EXIT_DISPOSALS, PROC_REF(on_disposal_exit))
|
||||
map_nested_locs()
|
||||
|
||||
/datum/component/proximity_monitor/UnregisterFromParent()
|
||||
@@ -148,9 +148,9 @@
|
||||
if(loc_to_check in nested_receiver_locs)
|
||||
continue
|
||||
nested_receiver_locs += loc_to_check
|
||||
RegisterSignal(loc_to_check, COMSIG_MOVABLE_MOVED, .proc/on_nested_loc_move)
|
||||
RegisterSignal(loc_to_check, COMSIG_MOVABLE_DISPOSING, .proc/on_disposal_enter)
|
||||
RegisterSignal(loc_to_check, COMSIG_MOVABLE_EXIT_DISPOSALS, .proc/on_disposal_exit)
|
||||
RegisterSignal(loc_to_check, COMSIG_MOVABLE_MOVED, PROC_REF(on_nested_loc_move))
|
||||
RegisterSignal(loc_to_check, COMSIG_MOVABLE_DISPOSING, PROC_REF(on_disposal_enter))
|
||||
RegisterSignal(loc_to_check, COMSIG_MOVABLE_EXIT_DISPOSALS, PROC_REF(on_disposal_exit))
|
||||
loc_to_check = loc_to_check.loc
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
hl3_release_date = _half_life
|
||||
can_contaminate = _can_contaminate
|
||||
if(istype(parent, /atom))
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/rad_examine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(rad_examine))
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/rad_attack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_OBJ, .proc/rad_attack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(rad_attack))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_OBJ, PROC_REF(rad_attack))
|
||||
else
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
if(strength > RAD_MINIMUM_CONTAMINATION)
|
||||
@@ -30,7 +30,7 @@
|
||||
//This relies on parent not being a turf or something. IF YOU CHANGE THAT, CHANGE THIS
|
||||
var/atom/movable/master = parent
|
||||
master.add_filter("rad_glow", 2, list("type" = "outline", "color" = "#39ff1430", "size" = 2))
|
||||
addtimer(CALLBACK(src, .proc/glow_loop, master), rand(1, 19)) //Things should look uneven
|
||||
addtimer(CALLBACK(src, PROC_REF(glow_loop), master), rand(1, 19)) //Things should look uneven
|
||||
START_PROCESSING(SSradiation, src)
|
||||
|
||||
/datum/component/radioactive/Destroy()
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
slip_verb = _slip_verb
|
||||
|
||||
/datum/component/slippery/RegisterWithParent()
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), .proc/Slip)
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), PROC_REF(Slip))
|
||||
|
||||
/datum/component/slippery/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED))
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(_max_mobs)
|
||||
max_mobs=_max_mobs
|
||||
|
||||
RegisterSignal(parent, list(COMSIG_PARENT_QDELETING), .proc/stop_spawning)
|
||||
RegisterSignal(parent, list(COMSIG_PARENT_QDELETING), PROC_REF(stop_spawning))
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/datum/component/spawner/process()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/too_spooky = TRUE //will it spawn a new instrument?
|
||||
|
||||
/datum/component/spooky/Initialize()
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/spectral_attack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(spectral_attack))
|
||||
|
||||
/datum/component/spooky/proc/spectral_attack(datum/source, mob/living/carbon/C, mob/user)
|
||||
if(ishuman(user)) //this weapon wasn't meant for mortals.
|
||||
|
||||
@@ -22,20 +22,20 @@
|
||||
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move, extrarange, falloff_exponent, fallof_distance)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
|
||||
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), PROC_REF(play_squeak))
|
||||
if(ismovable(parent))
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), .proc/play_squeak)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/play_squeak_crossed)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react)
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), PROC_REF(play_squeak))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, PROC_REF(play_squeak_crossed))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, PROC_REF(disposing_react))
|
||||
if(squeak_on_move)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_squeak)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(play_squeak))
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), .proc/play_squeak)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/use_squeak)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), PROC_REF(play_squeak))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(use_squeak))
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip))
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop))
|
||||
if(istype(parent, /obj/item/clothing/shoes))
|
||||
RegisterSignal(parent, COMSIG_SHOES_STEP_ACTION, .proc/step_squeak)
|
||||
RegisterSignal(parent, COMSIG_SHOES_STEP_ACTION, PROC_REF(step_squeak))
|
||||
|
||||
override_squeak_sounds = custom_sounds
|
||||
if(chance_override)
|
||||
@@ -98,7 +98,7 @@
|
||||
play_squeak()
|
||||
|
||||
/datum/component/squeak/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
RegisterSignal(equipper, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react, TRUE)
|
||||
RegisterSignal(equipper, COMSIG_MOVABLE_DISPOSING, PROC_REF(disposing_react), TRUE)
|
||||
|
||||
/datum/component/squeak/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_DISPOSING)
|
||||
@@ -106,7 +106,7 @@
|
||||
// Disposal pipes related shit
|
||||
/datum/component/squeak/proc/disposing_react(datum/source, obj/structure/disposalholder/disposal_holder, obj/machinery/disposal/disposal_source)
|
||||
//We don't need to worry about unregistering this signal as it will happen for us automaticaly when the holder is qdeleted
|
||||
RegisterSignal(disposal_holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
|
||||
RegisterSignal(disposal_holder, COMSIG_ATOM_DIR_CHANGE, PROC_REF(holder_dir_change))
|
||||
|
||||
/datum/component/squeak/proc/holder_dir_change(datum/source, old_dir, new_dir)
|
||||
//If the dir changes it means we're going through a bend in the pipes, let's pretend we bumped the wall
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
src.forced_surgery = forced_surgery
|
||||
|
||||
/datum/component/surgery_initiator/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/initiate_surgery_moment)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_SHARPNESS, .proc/on_parent_sharpness_change)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(initiate_surgery_moment))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_SHARPNESS, PROC_REF(on_parent_sharpness_change))
|
||||
|
||||
/datum/component/surgery_initiator/UnregisterFromParent()
|
||||
UnregisterSignal(parent, COMSIG_ITEM_ATTACK)
|
||||
@@ -83,7 +83,7 @@
|
||||
if(L.has_status_effect(STATUS_EFFECT_SUMMONEDGHOST))
|
||||
to_chat(user, "<span class='notice'>You realise that a ghost probably doesn't have any useful organs.</span>")
|
||||
return //no cult ghost surgery please
|
||||
INVOKE_ASYNC(src, .proc/do_initiate_surgery_moment, target, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(do_initiate_surgery_moment), target, user)
|
||||
// This signal is actually part of the attack chain, so it needs to return true to stop it
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
offset_x = rand(-max_x, max_x)
|
||||
offset_y = rand(-max_y, max_y)
|
||||
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/join_swarm)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, PROC_REF(join_swarm))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, PROC_REF(leave_swarm))
|
||||
|
||||
/datum/component/swarming/Destroy()
|
||||
for(var/other in swarm_members)
|
||||
|
||||
@@ -38,11 +38,11 @@ BONUS
|
||||
if(3, 4)
|
||||
if(!(head_organ.h_style == "Bald") && !(head_organ.h_style == "Balding Hair"))
|
||||
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
|
||||
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, null, "Balding Hair"), 5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(change_hair), H, head_organ, null, "Balding Hair"), 5 SECONDS)
|
||||
if(5)
|
||||
if(!(head_organ.f_style == "Shaved") || !(head_organ.h_style == "Bald"))
|
||||
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
|
||||
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, "Shaved", "Bald"), 5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(change_hair), H, head_organ, "Shaved", "Bald"), 5 SECONDS)
|
||||
|
||||
/datum/symptom/shedding/proc/change_hair(mob/living/carbon/human/H, obj/item/organ/external/head/head_organ, f_style, h_style)
|
||||
if(!H || !head_organ)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"<span class='userdanger'>You cough up butterflies!</span>")
|
||||
for(var/i in 1 to 2)
|
||||
var/mob/living/simple_animal/butterfly/B = new(affected_mob.loc)
|
||||
addtimer(CALLBACK(B, /mob/living/simple_animal/butterfly/.proc/decompose), rand(5, 25) SECONDS)
|
||||
addtimer(CALLBACK(B, TYPE_PROC_REF(/mob/living/simple_animal/butterfly, decompose)), rand(5, 25) SECONDS)
|
||||
|
||||
/**
|
||||
* Made so severe anxiety does not overload the SSmob while keeping it's effect
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
SEND_SIGNAL(target, COMSIG_ELEMENT_ATTACH, src)
|
||||
if(element_flags & ELEMENT_DETACH)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/Detach, override = TRUE)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(Detach), override = TRUE)
|
||||
|
||||
/// Deactivates the functionality defines by the element on the given datum
|
||||
/datum/element/proc/Detach(datum/source, force)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(!isitem(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
RegisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), .proc/equippedChanged)
|
||||
RegisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), PROC_REF(equippedChanged))
|
||||
|
||||
/datum/element/earhealing/Detach(datum/target)
|
||||
. = ..()
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
if(protects) // Does this protect things in its contents from being affected?
|
||||
RegisterSignal(target, COMSIG_ATOM_RAD_PROBE, .proc/rad_probe_react)
|
||||
RegisterSignal(target, COMSIG_ATOM_RAD_PROBE, PROC_REF(rad_probe_react))
|
||||
if(contamination_proof) // Can this object be contaminated?
|
||||
RegisterSignal(target, COMSIG_ATOM_RAD_CONTAMINATING, .proc/rad_contaminating)
|
||||
RegisterSignal(target, COMSIG_ATOM_RAD_CONTAMINATING, PROC_REF(rad_contaminating))
|
||||
if(_amount != 1) // If it's 1 it won't have any impact on radiation passing through anyway
|
||||
RegisterSignal(target, COMSIG_ATOM_RAD_WAVE_PASSING, .proc/rad_pass)
|
||||
RegisterSignal(target, COMSIG_ATOM_RAD_WAVE_PASSING, PROC_REF(rad_pass))
|
||||
|
||||
amount = _amount
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
if(isliving(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/LivingWaddle)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(LivingWaddle))
|
||||
else
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/Waddle)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(Waddle))
|
||||
|
||||
/datum/element/waddling/Detach(datum/source, force)
|
||||
. = ..()
|
||||
|
||||
@@ -252,12 +252,12 @@ if(!result || result.ckey != __ckey){\
|
||||
if(href_list["add_mob"])
|
||||
var/list/mobs = getpois(TRUE, TRUE)
|
||||
var/datum/async_input/A = input_autocomplete_async(usr, "Please, select a mob: ", mobs)
|
||||
A.on_close(CALLBACK(src, .proc/add_mob, usr))
|
||||
A.on_close(CALLBACK(src, PROC_REF(add_mob), usr))
|
||||
return
|
||||
if(href_list["add_ckey"])
|
||||
var/list/ckeys = GLOB.logging.get_ckeys_logged()
|
||||
var/datum/async_input/A = input_autocomplete_async(usr, "Please, select a ckey: ", ckeys)
|
||||
A.on_close(CALLBACK(src, .proc/add_ckey, usr))
|
||||
A.on_close(CALLBACK(src, PROC_REF(add_ckey), usr))
|
||||
return
|
||||
if(href_list["remove_mob"])
|
||||
var/mob/M = locate(href_list["remove_mob"])
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
return
|
||||
if(!chance || prob(chance))
|
||||
play(get_sound(looped))
|
||||
addtimer(CALLBACK(src, .proc/sound_loop, ++looped), mid_length)
|
||||
addtimer(CALLBACK(src, PROC_REF(sound_loop), ++looped), mid_length)
|
||||
|
||||
/datum/looping_sound/proc/play(soundfile)
|
||||
var/list/atoms_cache = output_atoms
|
||||
@@ -102,7 +102,7 @@
|
||||
if(start_sound)
|
||||
play(start_sound)
|
||||
start_wait = start_length
|
||||
addtimer(CALLBACK(src, .proc/sound_loop), start_wait)
|
||||
addtimer(CALLBACK(src, PROC_REF(sound_loop)), start_wait)
|
||||
|
||||
/datum/looping_sound/proc/on_stop(looped)
|
||||
if(end_sound)
|
||||
|
||||
+3
-3
@@ -968,7 +968,7 @@
|
||||
log_admin("[key_name(usr)] has equipped [key_name(current)] as a wizard")
|
||||
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a wizard")
|
||||
if("name")
|
||||
INVOKE_ASYNC(SSticker.mode, /datum/game_mode/wizard.proc/name_wizard, current)
|
||||
INVOKE_ASYNC(SSticker.mode, TYPE_PROC_REF(/datum/game_mode/wizard, name_wizard), current)
|
||||
log_admin("[key_name(usr)] has allowed wizard [key_name(current)] to name themselves")
|
||||
message_admins("[key_name_admin(usr)] has allowed wizard [key_name_admin(current)] to name themselves")
|
||||
if("autoobjectives")
|
||||
@@ -1652,7 +1652,7 @@
|
||||
SSticker.mode.equip_wizard(current)
|
||||
for(var/obj/item/spellbook/S in current.contents)
|
||||
S.op = 0
|
||||
INVOKE_ASYNC(SSticker.mode, /datum/game_mode/wizard.proc/name_wizard, current)
|
||||
INVOKE_ASYNC(SSticker.mode, TYPE_PROC_REF(/datum/game_mode/wizard, name_wizard), current)
|
||||
SSticker.mode.forge_wizard_objectives(src)
|
||||
SSticker.mode.greet_wizard(src)
|
||||
SSticker.mode.update_wiz_icons_added(src)
|
||||
@@ -1787,7 +1787,7 @@
|
||||
H.update_inv_w_uniform()
|
||||
|
||||
add_attack_logs(missionary, current, "Converted to a zealot for [convert_duration/600] minutes")
|
||||
addtimer(CALLBACK(src, .proc/remove_zealot, jumpsuit), convert_duration) //deconverts after the timer expires
|
||||
addtimer(CALLBACK(src, PROC_REF(remove_zealot), jumpsuit), convert_duration) //deconverts after the timer expires
|
||||
return TRUE
|
||||
|
||||
/datum/mind/proc/remove_zealot(obj/item/clothing/under/jumpsuit = null)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/obj/effect/proc_holder/spell/charge_up/Click()
|
||||
if(cast_check(TRUE, FALSE, usr))
|
||||
if(!start_time)
|
||||
INVOKE_ASYNC(src, .proc/StartChargeup, usr)
|
||||
INVOKE_ASYNC(src, PROC_REF(StartChargeup), usr)
|
||||
else
|
||||
if(!try_stop_buildup(usr))
|
||||
return // Don't remove the click intercept
|
||||
@@ -52,7 +52,7 @@
|
||||
user.add_overlay(charge_up_overlay)
|
||||
playsound(user, charge_sound, 50, FALSE, channel = charge_sound.channel)
|
||||
start_time = world.time
|
||||
if(do_mob(user, user, max_charge_time, extra_checks = list(CALLBACK(src, .proc/stopped_casting)), only_use_extra_checks = TRUE))
|
||||
if(do_mob(user, user, max_charge_time, extra_checks = list(CALLBACK(src, PROC_REF(stopped_casting))), only_use_extra_checks = TRUE))
|
||||
if(start_time)
|
||||
Discharge(user)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(!target.can_safely_leave_loc()) // No more brainmobs hopping out of their brains
|
||||
to_chat(target, "<span class='warning'>You are somehow too bound to your current location to abandon it.</span>")
|
||||
continue
|
||||
INVOKE_ASYNC(src, .proc/do_jaunt, target)
|
||||
INVOKE_ASYNC(src, PROC_REF(do_jaunt), target)
|
||||
|
||||
/obj/effect/proc_holder/spell/ethereal_jaunt/proc/do_jaunt(mob/living/target)
|
||||
target.notransform = TRUE
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
active_on += target
|
||||
target.regenerate_icons()
|
||||
if(duration < base_cooldown)
|
||||
addtimer(CALLBACK(src, .proc/remove, target), duration, TIMER_OVERRIDE|TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(remove), target), duration, TIMER_OVERRIDE|TIMER_UNIQUE)
|
||||
|
||||
/obj/effect/proc_holder/spell/genetic/Destroy()
|
||||
for(var/V in active_on)
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets, mob/user = usr)
|
||||
for(var/turf/T in targets)
|
||||
for(var/obj/machinery/door/door in T.contents)
|
||||
INVOKE_ASYNC(src, .proc/try_open_airlock, door)
|
||||
INVOKE_ASYNC(src, PROC_REF(try_open_airlock), door)
|
||||
for(var/obj/structure/closet/C in T.contents)
|
||||
INVOKE_ASYNC(src, .proc/try_open_closet, C)
|
||||
INVOKE_ASYNC(src, PROC_REF(try_open_closet), C)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/proc/try_open_airlock(obj/machinery/door/door)
|
||||
if(istype(door, /obj/machinery/door/airlock/hatch/gamma))
|
||||
|
||||
@@ -44,4 +44,4 @@
|
||||
target.AdjustJitter(2000 SECONDS) //High numbers for violent convulsions
|
||||
target.AdjustStuttering(4 SECONDS)
|
||||
target.Slowed(6 SECONDS)
|
||||
addtimer(CALLBACK(target, /mob/living.proc/AdjustJitter, -2000 SECONDS, 10), 2 SECONDS) //Still jittery, but vastly less
|
||||
addtimer(CALLBACK(target, TYPE_PROC_REF(/mob/living, AdjustJitter), -2000 SECONDS, 10), 2 SECONDS) //Still jittery, but vastly less
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
/obj/effect/proc_holder/spell/mimic/cast(list/targets, mob/user)
|
||||
var/atom/movable/A = targets[1]
|
||||
if(A == user)
|
||||
INVOKE_ASYNC(src, .proc/pick_form, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(pick_form), user)
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(src, .proc/remember_form, A, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(remember_form), A, user)
|
||||
|
||||
/obj/effect/proc_holder/spell/mimic/proc/remember_form(atom/movable/A, mob/user)
|
||||
if(A.name in available_forms)
|
||||
@@ -127,8 +127,8 @@
|
||||
user.create_log(MISC_LOG, "Mimicked into [user]")
|
||||
|
||||
if(!selected_form)
|
||||
RegisterSignal(user, COMSIG_PARENT_EXAMINE, .proc/examine_override)
|
||||
RegisterSignal(user, COMSIG_MOB_DEATH, .proc/on_death)
|
||||
RegisterSignal(user, COMSIG_PARENT_EXAMINE, PROC_REF(examine_override))
|
||||
RegisterSignal(user, COMSIG_MOB_DEATH, PROC_REF(on_death))
|
||||
|
||||
selected_form = form
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
/datum/status_effect/stacking/ground_pound/stacks_consumed_effect()
|
||||
flick("legion-smash", latest_attacker)
|
||||
addtimer(CALLBACK(latest_attacker, /mob/living/simple_animal/hostile/asteroid/big_legion/.proc/throw_mobs), 1 SECONDS)
|
||||
addtimer(CALLBACK(latest_attacker, TYPE_PROC_REF(/mob/living/simple_animal/hostile/asteroid/big_legion, throw_mobs)), 1 SECONDS)
|
||||
|
||||
/datum/status_effect/stacking/ground_pound/on_remove()
|
||||
latest_attacker = null
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon_state = "frozen"
|
||||
|
||||
/datum/status_effect/freon/on_apply()
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist)
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESIST, PROC_REF(owner_resist))
|
||||
if(!owner.stat)
|
||||
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
|
||||
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
||||
|
||||
@@ -37,7 +37,7 @@ GLOBAL_VAR_INIT(slower_restart, FALSE)
|
||||
server_announce_global("Server update complete. Changes will be applied on the next round.")
|
||||
if(TGS_EVENT_WATCHDOG_DETACH)
|
||||
server_announce_adminonly("\[Info] Server manager restarting...")
|
||||
reattach_timer = addtimer(CALLBACK(src, .proc/LateOnReattach), 1 MINUTES, TIMER_STOPPABLE)
|
||||
reattach_timer = addtimer(CALLBACK(src, PROC_REF(LateOnReattach)), 1 MINUTES, TIMER_STOPPABLE)
|
||||
if(TGS_EVENT_WATCHDOG_REATTACH)
|
||||
var/datum/tgs_version/old_version = world.TgsVersion()
|
||||
var/datum/tgs_version/new_version = args[2]
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
to_chat(M, telegraph_message)
|
||||
if(telegraph_sound)
|
||||
SEND_SOUND(M, sound(telegraph_sound))
|
||||
addtimer(CALLBACK(src, .proc/start), telegraph_duration)
|
||||
addtimer(CALLBACK(src, PROC_REF(start)), telegraph_duration)
|
||||
|
||||
/datum/weather/proc/start()
|
||||
if(stage >= MAIN_STAGE)
|
||||
@@ -85,7 +85,7 @@
|
||||
to_chat(M, weather_message)
|
||||
if(weather_sound)
|
||||
SEND_SOUND(M, sound(weather_sound))
|
||||
addtimer(CALLBACK(src, .proc/wind_down), weather_duration)
|
||||
addtimer(CALLBACK(src, PROC_REF(wind_down)), weather_duration)
|
||||
|
||||
/datum/weather/proc/wind_down()
|
||||
if(stage >= WIND_DOWN_STAGE)
|
||||
@@ -99,7 +99,7 @@
|
||||
to_chat(M, end_message)
|
||||
if(end_sound)
|
||||
SEND_SOUND(M, sound(end_sound))
|
||||
addtimer(CALLBACK(src, .proc/end), end_duration)
|
||||
addtimer(CALLBACK(src, PROC_REF(end)), end_duration)
|
||||
|
||||
/datum/weather/proc/end()
|
||||
if(stage == END_STAGE)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
A.autoclose = mend
|
||||
if(mend)
|
||||
if(!A.density)
|
||||
INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/close)
|
||||
INVOKE_ASYNC(A, TYPE_PROC_REF(/obj/machinery/door/airlock, close))
|
||||
|
||||
if(WIRE_BOLT_LIGHT)
|
||||
A.lights = mend
|
||||
@@ -141,7 +141,7 @@
|
||||
else if(A.aiControlDisabled == AICONTROLDISABLED_PERMA)
|
||||
A.aiControlDisabled = AICONTROLDISABLED_BYPASS
|
||||
|
||||
addtimer(CALLBACK(A, /obj/machinery/door/airlock/.proc/ai_control_callback), 1 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/door/airlock, ai_control_callback)), 1 SECONDS)
|
||||
|
||||
if(WIRE_ELECTRIFY)
|
||||
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
|
||||
@@ -153,14 +153,14 @@
|
||||
if(A.emagged) return
|
||||
if(!A.requiresID() || A.check_access(null))
|
||||
if(A.density)
|
||||
INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/open)
|
||||
INVOKE_ASYNC(A, TYPE_PROC_REF(/obj/machinery/door/airlock, open))
|
||||
else
|
||||
INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/close)
|
||||
INVOKE_ASYNC(A, TYPE_PROC_REF(/obj/machinery/door/airlock, close))
|
||||
|
||||
if(WIRE_SAFETY)
|
||||
A.safe = !A.safe
|
||||
if(!A.density)
|
||||
INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/close)
|
||||
INVOKE_ASYNC(A, TYPE_PROC_REF(/obj/machinery/door/airlock, close))
|
||||
|
||||
if(WIRE_SPEED)
|
||||
A.normalspeed = !A.normalspeed
|
||||
|
||||
@@ -62,13 +62,13 @@
|
||||
if(!A.shorted)
|
||||
A.shorted = TRUE
|
||||
A.update_icon()
|
||||
addtimer(CALLBACK(A, /obj/machinery/alarm/.proc/unshort_callback), 120 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/alarm, unshort_callback)), 120 SECONDS)
|
||||
|
||||
if(WIRE_AI_CONTROL)
|
||||
if(!A.aidisabled)
|
||||
A.aidisabled = TRUE
|
||||
A.updateDialog()
|
||||
addtimer(CALLBACK(A, /obj/machinery/alarm/.proc/enable_ai_control_callback), 10 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/alarm, enable_ai_control_callback)), 10 SECONDS)
|
||||
|
||||
|
||||
if(WIRE_SYPHON)
|
||||
|
||||
@@ -30,19 +30,19 @@
|
||||
switch(wire)
|
||||
if(WIRE_IDSCAN)
|
||||
A.locked = FALSE
|
||||
addtimer(CALLBACK(A, /obj/machinery/power/apc/.proc/relock_callback), 30 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/power/apc, relock_callback)), 30 SECONDS)
|
||||
|
||||
|
||||
if(WIRE_MAIN_POWER1, WIRE_MAIN_POWER2)
|
||||
if(!A.shorted)
|
||||
A.shorted = TRUE
|
||||
addtimer(CALLBACK(A, /obj/machinery/power/apc/.proc/check_main_power_callback), 120 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/power/apc, check_main_power_callback)), 120 SECONDS)
|
||||
|
||||
|
||||
if(WIRE_AI_CONTROL)
|
||||
if(!A.aidisabled)
|
||||
A.aidisabled = TRUE
|
||||
addtimer(CALLBACK(A, /obj/machinery/power/apc/.proc/check_ai_control_callback), 1 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/power/apc, check_ai_control_callback)), 1 SECONDS)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
switch(wire)
|
||||
if(WIRE_AUTOLATHE_HACK)
|
||||
A.adjust_hacked(!A.hacked)
|
||||
addtimer(CALLBACK(A, /obj/machinery/autolathe/.proc/check_hacked_callback), 5 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/autolathe, check_hacked_callback)), 5 SECONDS)
|
||||
|
||||
if(WIRE_ELECTRIFY)
|
||||
A.shocked = !A.shocked
|
||||
addtimer(CALLBACK(A, /obj/machinery/autolathe/.proc/check_electrified_callback), 5 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/autolathe, check_electrified_callback)), 5 SECONDS)
|
||||
|
||||
if(WIRE_AUTOLATHE_DISABLE)
|
||||
A.disabled = !A.disabled
|
||||
addtimer(CALLBACK(A, /obj/machinery/autolathe/.proc/check_disabled_callback), 5 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/autolathe, check_disabled_callback)), 5 SECONDS)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
switch(wire)
|
||||
if(WIRE_BOMB_LIGHT)
|
||||
N.lighthack = !N.lighthack
|
||||
addtimer(CALLBACK(N, /obj/machinery/nuclearbomb/.proc/reset_lighthack_callback), 10 SECONDS)
|
||||
addtimer(CALLBACK(N, TYPE_PROC_REF(/obj/machinery/nuclearbomb, reset_lighthack_callback)), 10 SECONDS)
|
||||
|
||||
if(WIRE_BOMB_TIMING)
|
||||
if(N.timing)
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
if(WIRE_BOMB_SAFETY)
|
||||
N.safety = !N.safety
|
||||
addtimer(CALLBACK(N, /obj/machinery/nuclearbomb/.proc/reset_safety_callback), 10 SECONDS)
|
||||
addtimer(CALLBACK(N, TYPE_PROC_REF(/obj/machinery/nuclearbomb, reset_safety_callback)), 10 SECONDS)
|
||||
|
||||
/datum/wires/nuclearbomb/on_cut(wire, mend)
|
||||
var/obj/machinery/nuclearbomb/N = holder
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
A.shocked = !A.shocked
|
||||
if(A.shocked)
|
||||
A.shock(usr, 100)
|
||||
addtimer(CALLBACK(A, /obj/machinery/suit_storage_unit/.proc/check_electrified_callback), 5 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/suit_storage_unit, check_electrified_callback)), 5 SECONDS)
|
||||
|
||||
if(WIRE_SSU_UV)
|
||||
A.uv_super = !A.uv_super
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
if(D.operating && D.operating != DOOR_CLOSING)
|
||||
D.nextstate = FD_CLOSED
|
||||
else if(!D.density)
|
||||
INVOKE_ASYNC(D, /obj/machinery/door/firedoor.proc/close)
|
||||
INVOKE_ASYNC(D, TYPE_PROC_REF(/obj/machinery/door/firedoor, close))
|
||||
|
||||
/area/proc/air_doors_open()
|
||||
if(!air_doors_activated)
|
||||
@@ -173,7 +173,7 @@
|
||||
if(D.operating && D.operating != DOOR_OPENING)
|
||||
D.nextstate = FD_OPEN
|
||||
else if(D.density)
|
||||
INVOKE_ASYNC(D, /obj/machinery/door/firedoor.proc/open)
|
||||
INVOKE_ASYNC(D, TYPE_PROC_REF(/obj/machinery/door/firedoor, open))
|
||||
|
||||
/area/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -252,7 +252,7 @@
|
||||
|
||||
// At this point, the area is safe and the door is technically functional.
|
||||
|
||||
INVOKE_ASYNC(D, (opening ? /obj/machinery/door/firedoor.proc/deactivate_alarm : /obj/machinery/door/firedoor.proc/activate_alarm))
|
||||
INVOKE_ASYNC(D, (opening ? TYPE_PROC_REF(/obj/machinery/door/firedoor, deactivate_alarm) : TYPE_PROC_REF(/obj/machinery/door/firedoor, activate_alarm)))
|
||||
if(D.welded)
|
||||
continue // Alarm is toggled, but door stuck
|
||||
if(D.operating)
|
||||
@@ -261,7 +261,7 @@
|
||||
else
|
||||
D.nextstate = opening ? FD_OPEN : FD_CLOSED
|
||||
else if(D.density == opening)
|
||||
INVOKE_ASYNC(D, (opening ? /obj/machinery/door/firedoor.proc/open : /obj/machinery/door/firedoor.proc/close))
|
||||
INVOKE_ASYNC(D, (opening ? TYPE_PROC_REF(/obj/machinery/door/firedoor, open) : TYPE_PROC_REF(/obj/machinery/door/firedoor, close)))
|
||||
|
||||
/**
|
||||
* Generate a firealarm alert for this area
|
||||
@@ -354,7 +354,7 @@
|
||||
|
||||
if(SSalarm.triggerAlarm("Burglar", src, cameras, trigger))
|
||||
//Cancel silicon alert after 1 minute
|
||||
addtimer(CALLBACK(SSalarm, /datum/controller/subsystem/alarm.proc/cancelAlarm, "Burglar", src, trigger), 600)
|
||||
addtimer(CALLBACK(SSalarm, TYPE_PROC_REF(/datum/controller/subsystem/alarm, cancelAlarm), "Burglar", src, trigger), 600)
|
||||
|
||||
/**
|
||||
* Trigger the fire alarm visual affects in an area
|
||||
@@ -565,11 +565,11 @@
|
||||
|
||||
/area/proc/prison_break()
|
||||
for(var/obj/machinery/power/apc/temp_apc in src)
|
||||
INVOKE_ASYNC(temp_apc, /obj/machinery/power/apc.proc/overload_lighting, 70)
|
||||
INVOKE_ASYNC(temp_apc, TYPE_PROC_REF(/obj/machinery/power/apc, overload_lighting), 70)
|
||||
for(var/obj/machinery/door/airlock/temp_airlock in src)
|
||||
INVOKE_ASYNC(temp_airlock, /obj/machinery/door/airlock.proc/prison_open)
|
||||
INVOKE_ASYNC(temp_airlock, TYPE_PROC_REF(/obj/machinery/door/airlock, prison_open))
|
||||
for(var/obj/machinery/door/window/temp_windoor in src)
|
||||
INVOKE_ASYNC(temp_windoor, /obj/machinery/door.proc/open)
|
||||
INVOKE_ASYNC(temp_windoor, TYPE_PROC_REF(/obj/machinery/door, open))
|
||||
|
||||
/area/AllowDrop()
|
||||
CRASH("Bad op: area/AllowDrop() called")
|
||||
|
||||
+3
-3
@@ -543,7 +543,7 @@
|
||||
|
||||
/atom/proc/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(density && !has_gravity(AM)) //thrown stuff bounces off dense stuff in no grav, unless the thrown stuff ends up inside what it hit(embedding, bola, etc...).
|
||||
addtimer(CALLBACK(src, .proc/hitby_react, AM), 2)
|
||||
addtimer(CALLBACK(src, PROC_REF(hitby_react), AM), 2)
|
||||
|
||||
/atom/proc/hitby_react(atom/movable/AM)
|
||||
if(AM && isturf(AM.loc))
|
||||
@@ -559,7 +559,7 @@
|
||||
|
||||
/atom/proc/update_filters()
|
||||
filters = null
|
||||
filter_data = sortTim(filter_data, /proc/cmp_filter_data_priority, TRUE)
|
||||
filter_data = sortTim(filter_data, GLOBAL_PROC_REF(cmp_filter_data_priority), TRUE)
|
||||
for(var/f in filter_data)
|
||||
var/list/data = filter_data[f]
|
||||
var/list/arguments = data.Copy()
|
||||
@@ -1066,7 +1066,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
||||
if(length(speech_bubble_hearers))
|
||||
var/image/I = image('icons/mob/talk.dmi', src, "[bubble_icon][say_test(message)]", FLY_LAYER)
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_hearers, 30)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(flick_overlay), I, speech_bubble_hearers, 30)
|
||||
|
||||
/atom/proc/speech_bubble(bubble_state = "", bubble_loc = src, list/bubble_recipients = list())
|
||||
return
|
||||
|
||||
@@ -315,13 +315,13 @@
|
||||
|
||||
/mob/living/forceMove(atom/destination)
|
||||
if(buckled)
|
||||
addtimer(CALLBACK(src, .proc/check_buckled), 1, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(check_buckled)), 1, TIMER_UNIQUE)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
addtimer(CALLBACK(buckled_mob, .proc/check_buckled), 1, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(buckled_mob, PROC_REF(check_buckled)), 1, TIMER_UNIQUE)
|
||||
if(pulling)
|
||||
addtimer(CALLBACK(src, .proc/check_pull), 1, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(check_pull)), 1, TIMER_UNIQUE)
|
||||
. = ..()
|
||||
if(client)
|
||||
reset_perspective(destination)
|
||||
|
||||
@@ -376,8 +376,8 @@
|
||||
. = ..()
|
||||
for(var/i=0;i<3;i++)
|
||||
buffers[i+1]=new /datum/dna2/record
|
||||
addtimer(CALLBACK(src, .proc/find_machine), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/ready), 25 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(find_machine)), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(ready)), 25 SECONDS)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/find_machine()
|
||||
for(var/obj/machinery/dna_scannernew/scanner in orange(1, src))
|
||||
@@ -808,7 +808,7 @@
|
||||
|
||||
// Cooldown
|
||||
injector_ready = FALSE
|
||||
addtimer(CALLBACK(src, .proc/injector_cooldown_finish), 30 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(injector_cooldown_finish)), 30 SECONDS)
|
||||
|
||||
// Create it
|
||||
var/datum/dna2/record/buf = buffers[buffer_id]
|
||||
|
||||
@@ -970,7 +970,7 @@
|
||||
user.show_message("<span class='abductor'>You offer your mind to [(target in user.get_visible_mobs()) ? target.name : "the unknown entity"].</span>")
|
||||
target.show_message("<span class='abductor'><A href='?src=[UID()];target=[target.UID()];user=[user.UID()]'>[message]</a></span>")
|
||||
available_targets += target
|
||||
addtimer(CALLBACK(src, .proc/removeAvailability, target), 100)
|
||||
addtimer(CALLBACK(src, PROC_REF(removeAvailability), target), 100)
|
||||
|
||||
/obj/effect/proc_holder/spell/mindscan/proc/removeAvailability(mob/living/target)
|
||||
if(target in available_targets)
|
||||
|
||||
@@ -74,7 +74,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
log_game("[key_name(blob)] has been selected as a Blob")
|
||||
greet_blob(blobmind)
|
||||
to_chat(blob, "<span class='userdanger'>You feel very tired and bloated! You don't have long before you burst!</span>")
|
||||
addtimer(CALLBACK(src, .proc/burst_blob, blobmind), 60 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(burst_blob), blobmind), 60 SECONDS)
|
||||
return 1
|
||||
|
||||
/datum/game_mode/blob/proc/make_blobs(count)
|
||||
@@ -126,7 +126,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
if(!warned)
|
||||
to_chat(C, "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>")
|
||||
message_admins("[key_name_admin(C)] was in space when the blobs burst, and will die if [C.p_they()] [C.p_do()] not return to the station.")
|
||||
addtimer(CALLBACK(src, .proc/burst_blob, blob, 1), 30 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(burst_blob), blob, 1), 30 SECONDS)
|
||||
else
|
||||
burst++
|
||||
log_admin("[key_name(C)] was in space when attempting to burst as a blob.")
|
||||
@@ -170,13 +170,13 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
show_message("<span class='userdanger'>You feel like you are about to burst.</span>")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/burst_blobs), (wait_time / 2))
|
||||
addtimer(CALLBACK(src, PROC_REF(burst_blobs)), (wait_time / 2))
|
||||
|
||||
// Stage 1
|
||||
addtimer(CALLBACK(src, .proc/stage, 1), (wait_time * 2 + wait_time / 2))
|
||||
addtimer(CALLBACK(src, PROC_REF(stage), 1), (wait_time * 2 + wait_time / 2))
|
||||
|
||||
// Stage 2
|
||||
addtimer(CALLBACK(src, .proc/stage, 2), 50 MINUTES)
|
||||
addtimer(CALLBACK(src, PROC_REF(stage), 2), 50 MINUTES)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
if(overmind)
|
||||
qdel(overmind)
|
||||
|
||||
INVOKE_ASYNC(src, .proc/get_new_overmind, new_overmind)
|
||||
INVOKE_ASYNC(src, PROC_REF(get_new_overmind), new_overmind)
|
||||
|
||||
/obj/structure/blob/core/proc/get_new_overmind(client/new_overmind)
|
||||
var/mob/C = null
|
||||
@@ -126,7 +126,7 @@
|
||||
B.mind.make_Overmind()
|
||||
|
||||
/obj/structure/blob/core/proc/lateblobtimer()
|
||||
addtimer(CALLBACK(src, .proc/lateblobcheck), 50)
|
||||
addtimer(CALLBACK(src, PROC_REF(lateblobcheck)), 50)
|
||||
|
||||
/obj/structure/blob/core/proc/lateblobcheck()
|
||||
if(overmind)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
B.color = blob_reagent_datum?.complementary_color
|
||||
B.overmind = src
|
||||
blob_mobs += B
|
||||
RegisterSignal(B, COMSIG_PARENT_QDELETING, .proc/on_blob_mob_death)
|
||||
RegisterSignal(B, COMSIG_PARENT_QDELETING, PROC_REF(on_blob_mob_death))
|
||||
|
||||
/mob/camera/blob/proc/on_blob_mob_death(mob/living/simple_animal/hostile/blob/B)
|
||||
blob_mobs -= B
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
owner.visible_message("<span class='warning'>[owner]'s body flashes a bright blue!</span>", \
|
||||
"<span class='cultitalic'>You speak the cursed words, channeling an electromagnetic pulse from your body.</span>")
|
||||
owner.emp_act(2)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /proc/empulse, owner, 2, 5, TRUE, "cult")
|
||||
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(empulse), owner, 2, 5, TRUE, "cult")
|
||||
owner.whisper(invocation)
|
||||
charges--
|
||||
if(charges <= 0)
|
||||
@@ -517,7 +517,7 @@
|
||||
|
||||
var/turf/origin = get_turf(teleportee)
|
||||
var/turf/destination = get_turf(actual_selected_rune)
|
||||
INVOKE_ASYNC(actual_selected_rune, /obj/effect/rune/.proc/teleport_effect, teleportee, origin, destination)
|
||||
INVOKE_ASYNC(actual_selected_rune, TYPE_PROC_REF(/obj/effect/rune, teleport_effect), teleportee, origin, destination)
|
||||
|
||||
if(is_mining_level(user.z) && !is_mining_level(destination.z)) //No effect if you stay on lavaland
|
||||
actual_selected_rune.handle_portal("lava")
|
||||
|
||||
@@ -101,7 +101,7 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
cult_objs.study(cult_mind.current)
|
||||
to_chat(cult_mind.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Cultist)</span>")
|
||||
cult_threshold_check()
|
||||
addtimer(CALLBACK(src, .proc/cult_threshold_check), 2 MINUTES) // Check again in 2 minutes for latejoiners
|
||||
addtimer(CALLBACK(src, PROC_REF(cult_threshold_check)), 2 MINUTES) // Check again in 2 minutes for latejoiners
|
||||
..()
|
||||
|
||||
/datum/game_mode/proc/equip_cultist(mob/living/carbon/human/H, metal = TRUE)
|
||||
@@ -264,7 +264,7 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
continue
|
||||
SEND_SOUND(M.current, sound('sound/hallucinations/i_see_you2.ogg'))
|
||||
to_chat(M.current, "<span class='cultlarge'>The veil weakens as your cult grows, your eyes begin to glow...</span>")
|
||||
addtimer(CALLBACK(src, .proc/rise, M.current), 20 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(rise), M.current), 20 SECONDS)
|
||||
|
||||
else if(cult_players >= ascend_number)
|
||||
cult_ascendant = TRUE
|
||||
@@ -273,7 +273,7 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
continue
|
||||
SEND_SOUND(M.current, sound('sound/hallucinations/im_here1.ogg'))
|
||||
to_chat(M.current, "<span class='cultlarge'>Your cult is ascendant and the red harvest approaches - you cannot hide your true nature for much longer!")
|
||||
addtimer(CALLBACK(src, .proc/ascend, M.current), 20 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(ascend), M.current), 20 SECONDS)
|
||||
GLOB.major_announcement.Announce("Picking up extradimensional activity related to the Cult of [SSticker.cultdat ? SSticker.cultdat.entity_name : "Nar'Sie"] from your station. Data suggests that about [ascend_percent * 100]% of the station has been converted. Security staff are authorized to use lethal force freely against cultists. Non-security staff should be prepared to defend themselves and their work areas from hostile cultists. Self defense permits non-security staff to use lethal force as a last resort, but non-security staff should be defending their work areas, not hunting down cultists. Dead crewmembers must be revived and deconverted once the situation is under control.", "Central Command Higher Dimensional Affairs", 'sound/AI/commandreport.ogg')
|
||||
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@
|
||||
playsound(src, 'sound/weapons/parry.ogg', 100, TRUE)
|
||||
if(illusions > 0)
|
||||
illusions--
|
||||
addtimer(CALLBACK(src, .proc/readd), 45 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(readd)), 45 SECONDS)
|
||||
if(prob(60))
|
||||
spawn_illusion(owner, TRUE) // Hostile illusion
|
||||
else
|
||||
|
||||
@@ -494,9 +494,9 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
for(var/atom/movable/A in T)
|
||||
if(ishuman(A))
|
||||
if(A != user) // Teleporting someone else
|
||||
INVOKE_ASYNC(src, .proc/teleport_effect, A, T, target)
|
||||
INVOKE_ASYNC(src, PROC_REF(teleport_effect), A, T, target)
|
||||
else // Teleporting yourself
|
||||
INVOKE_ASYNC(src, .proc/teleport_effect, user, T, target)
|
||||
INVOKE_ASYNC(src, PROC_REF(teleport_effect), user, T, target)
|
||||
if(A.move_resist == INFINITY)
|
||||
continue //object cant move, shouldnt teleport
|
||||
if(A == user)
|
||||
@@ -546,7 +546,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
outer_portal = new(T, 60 SECONDS, color)
|
||||
light_range = 4
|
||||
update_light()
|
||||
addtimer(CALLBACK(src, .proc/close_portal), 60 SECONDS, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(close_portal)), 60 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
/obj/effect/rune/teleport/proc/close_portal()
|
||||
qdel(inner_portal)
|
||||
@@ -747,7 +747,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
cultist_to_summon.visible_message("<span class='warning'>[cultist_to_summon] suddenly disappears in a flash of red light!</span>", \
|
||||
"<span class='cultitalic'><b>Overwhelming vertigo consumes you as you are hurled through the air!</b></span>")
|
||||
..()
|
||||
INVOKE_ASYNC(src, .proc/teleport_effect, cultist_to_summon, get_turf(cultist_to_summon), src)
|
||||
INVOKE_ASYNC(src, PROC_REF(teleport_effect), cultist_to_summon, get_turf(cultist_to_summon), src)
|
||||
visible_message("<span class='warning'>[src] begins to bubble and rises into the form of [cultist_to_summon]!</span>")
|
||||
cultist_to_summon.forceMove(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
spawn (ROUNDSTART_LOGOUT_REPORT_TIME)
|
||||
display_roundstart_logout_report()
|
||||
|
||||
INVOKE_ASYNC(src, .proc/set_mode_in_db) // Async query, dont bother slowing roundstart
|
||||
INVOKE_ASYNC(src, PROC_REF(set_mode_in_db)) // Async query), dont bother slowing roundstart
|
||||
|
||||
generate_station_goals()
|
||||
GLOB.start_state = new /datum/station_state()
|
||||
|
||||
@@ -503,7 +503,7 @@
|
||||
attached_action.desc = "[initial(attached_action.desc)] It has [attached_action.uses] use\s remaining."
|
||||
attached_action.UpdateButtonIcon()
|
||||
target.audible_message("<span class='italics'>You hear a loud electrical buzzing sound coming from [target]!</span>")
|
||||
addtimer(CALLBACK(attached_action, /datum/action/innate/ai/ranged/overload_machine.proc/detonate_machine, target), 50) //kaboom!
|
||||
addtimer(CALLBACK(attached_action, TYPE_PROC_REF(/datum/action/innate/ai/ranged/overload_machine, detonate_machine), target), 50) //kaboom!
|
||||
remove_ranged_ability(ranged_ability_user, "<span class='warning'>Overloading machine circuitry...</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -558,7 +558,7 @@
|
||||
attached_action.desc = "[initial(attached_action.desc)] It has [attached_action.uses] use\s remaining."
|
||||
attached_action.UpdateButtonIcon()
|
||||
target.audible_message("<span class='userdanger'>You hear a loud electrical buzzing sound coming from [target]!</span>")
|
||||
addtimer(CALLBACK(attached_action, /datum/action/innate/ai/ranged/override_machine.proc/animate_machine, target), 50) //kabeep!
|
||||
addtimer(CALLBACK(attached_action, TYPE_PROC_REF(/datum/action/innate/ai/ranged/override_machine, animate_machine), target), 50) //kabeep!
|
||||
remove_ranged_ability(ranged_ability_user, "<span class='danger'>Sending override signal...</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -632,7 +632,7 @@
|
||||
I.loc = T
|
||||
client.images += I
|
||||
I.icon_state = "[success ? "green" : "red"]Overlay" //greenOverlay and redOverlay for success and failure respectively
|
||||
addtimer(CALLBACK(src, .proc/remove_transformer_image, client, I, T), 30)
|
||||
addtimer(CALLBACK(src, PROC_REF(remove_transformer_image), client, I, T), 30)
|
||||
if(!success)
|
||||
to_chat(src, "<span class='warning'>[alert_msg]</span>")
|
||||
return success
|
||||
@@ -662,7 +662,7 @@
|
||||
for(var/thing in GLOB.apcs)
|
||||
var/obj/machinery/power/apc/apc = thing
|
||||
if(prob(30 * apc.overload))
|
||||
INVOKE_ASYNC(apc, /obj/machinery/power/apc.proc/overload_lighting)
|
||||
INVOKE_ASYNC(apc, TYPE_PROC_REF(/obj/machinery/power/apc, overload_lighting))
|
||||
else
|
||||
apc.overload++
|
||||
to_chat(owner, "<span class='notice'>Overcurrent applied to the powernet.</span>")
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
owner.create_log(CONVERSION_LOG, "received an abductor mind control message: '[command]'", user)
|
||||
update_gland_hud()
|
||||
|
||||
addtimer(CALLBACK(src, .proc/clear_mind_control), mind_control_duration)
|
||||
addtimer(CALLBACK(src, PROC_REF(clear_mind_control)), mind_control_duration)
|
||||
|
||||
/obj/item/organ/internal/heart/gland/proc/clear_mind_control()
|
||||
if(!ownerCheck() || !active_mind_control)
|
||||
@@ -294,7 +294,7 @@
|
||||
owner.visible_message("<span class='danger'>[owner]'s skin starts emitting electric arcs!</span>",\
|
||||
"<span class='warning'>You feel electric energy building up inside you!</span>")
|
||||
playsound(get_turf(owner), "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
addtimer(CALLBACK(src, .proc/zap), rand(30, 100))
|
||||
addtimer(CALLBACK(src, PROC_REF(zap)), rand(30, 100))
|
||||
|
||||
/obj/item/organ/internal/heart/gland/electric/proc/zap()
|
||||
tesla_zap(owner, 4, 8000, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
return
|
||||
|
||||
// Do this immediately, so the user can't spam a bunch of polls.
|
||||
cooldown_timer = addtimer(CALLBACK(src, .proc/reset_cooldown), 5 MINUTES)
|
||||
cooldown_timer = addtimer(CALLBACK(src, PROC_REF(reset_cooldown)), 5 MINUTES)
|
||||
UpdateButtonIcon()
|
||||
|
||||
to_chat(owner, "<span class='danger'>Searching for a replacement ghost...</span>")
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
appearance = A.appearance
|
||||
dir = A.dir
|
||||
move_resist = A.move_resist
|
||||
addtimer(CALLBACK(src, .proc/disable), 600)
|
||||
addtimer(CALLBACK(src, PROC_REF(disable)), 600)
|
||||
|
||||
/obj/item/guardian_bomb/proc/disable()
|
||||
add_attack_logs(null, stored_obj, "booby trap expired")
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/charger/Shoot(atom/targeted_atom)
|
||||
charging = TRUE
|
||||
throw_at(targeted_atom, range, 1, src, 0, callback = CALLBACK(src, .proc/charging_end))
|
||||
throw_at(targeted_atom, range, 1, src, 0, callback = CALLBACK(src, PROC_REF(charging_end)))
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/charger/proc/charging_end()
|
||||
charging = FALSE
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
ambush_prepared = TRUE
|
||||
to_chat(src, "<span class='sinister'>You are ready to ambush any unsuspected target. Your next attack will hurt a lot more and weaken the target! Moving will break your focus. Standing still will perfect your disguise.</span>")
|
||||
apply_status_effect(/datum/status_effect/morph_ambush)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/on_move)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
|
||||
|
||||
/mob/living/simple_animal/hostile/morph/proc/failed_ambush()
|
||||
ambush_prepared = FALSE
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/morph_spell/ambush/cast(list/targets, mob/living/simple_animal/hostile/morph/user)
|
||||
to_chat(user, "<span class='sinister'>You start preparing an ambush.</span>")
|
||||
if(!do_after(user, 6 SECONDS, FALSE, user, TRUE, list(CALLBACK(src, .proc/prepare_check, user)), FALSE))
|
||||
if(!do_after(user, 6 SECONDS, FALSE, user, TRUE, list(CALLBACK(src, PROC_REF(prepare_check), user)), FALSE))
|
||||
if(!user.morphed)
|
||||
to_chat(user, "<span class='warning'>You need to stay morphed to prepare the ambush!</span>")
|
||||
return
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
for(var/thing in targets)
|
||||
var/obj/machinery/atmospherics/unary/U = thing
|
||||
U.add_overlay(GLOB.acid_overlay, TRUE)
|
||||
addtimer(CALLBACK(src, .proc/unweld_vent, U), 2 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(unweld_vent), U), 2 SECONDS)
|
||||
playsound(U, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/effect/proc_holder/spell/morph_spell/open_vent/proc/unweld_vent(obj/machinery/atmospherics/unary/U)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
revert_cast(user)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] starts pushing itself against [A]!</span>", "<span class='sinister'>You try to pry [A] open enough to get through.</span>")
|
||||
if(!do_after(user, 6 SECONDS, FALSE, user, TRUE, list(CALLBACK(src, .proc/pass_check, user, A)), FALSE))
|
||||
if(!do_after(user, 6 SECONDS, FALSE, user, TRUE, list(CALLBACK(src, PROC_REF(pass_check), user, A)), FALSE))
|
||||
if(user.morphed)
|
||||
to_chat(user, "<span class='warning'>You need to stay in your true form to pass through [A]!</span>")
|
||||
else if(A.locked)
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
remove_from_all_data_huds()
|
||||
random_revenant_name()
|
||||
|
||||
addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 15 seconds to put in a ghost (Or wait 15 seconds before giving it objectives)
|
||||
addtimer(CALLBACK(src, PROC_REF(firstSetupAttempt)), 15 SECONDS) // Give admin 15 seconds to put in a ghost (Or wait 15 seconds before giving it objectives)
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/random_revenant_name()
|
||||
var/built_name = ""
|
||||
@@ -153,7 +153,7 @@
|
||||
giveSpells()
|
||||
else
|
||||
message_admins("Revenant was created but has no mind. Put a ghost inside, or a poll will be made in one minute.")
|
||||
addtimer(CALLBACK(src, .proc/setupOrDelete), 1 MINUTES)
|
||||
addtimer(CALLBACK(src, PROC_REF(setupOrDelete)), 1 MINUTES)
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/setupOrDelete()
|
||||
if(mind)
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/revenant/overload/proc/select_lights(turf/T, mob/living/simple_animal/revenant/user)
|
||||
for(var/obj/machinery/light/L in T.contents)
|
||||
INVOKE_ASYNC(src, .proc/shock_lights, L, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(shock_lights), L, user)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/revenant/overload/proc/shock_lights(obj/machinery/light/L, mob/living/simple_animal/revenant/user)
|
||||
if(!L.on)
|
||||
@@ -276,7 +276,7 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction/cast(list/targets, mob/living/simple_animal/revenant/user = usr)
|
||||
if(attempt_cast(user))
|
||||
for(var/turf/T in targets)
|
||||
INVOKE_ASYNC(src, .proc/effect, user, T)
|
||||
INVOKE_ASYNC(src, PROC_REF(effect), user, T)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction/proc/effect(mob/living/simple_animal/revenant/user, turf/T)
|
||||
T.rev_malfunction(TRUE)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
whisper_action.Grant(src)
|
||||
if(istype(loc, /obj/effect/dummy/slaughter))
|
||||
bloodspell.phased = TRUE
|
||||
addtimer(CALLBACK(src, .proc/attempt_objectives), 5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(attempt_objectives)), 5 SECONDS)
|
||||
|
||||
|
||||
/mob/living/simple_animal/slaughter/Life(seconds, times_fired)
|
||||
|
||||
@@ -70,7 +70,7 @@ GLOBAL_VAR(bomb_set)
|
||||
GLOB.bomb_set = TRUE // So long as there is one nuke timing, it means one nuke is armed.
|
||||
timeleft = max(timeleft - 2, 0) // 2 seconds per process()
|
||||
if(timeleft <= 0)
|
||||
INVOKE_ASYNC(src, .proc/explode)
|
||||
INVOKE_ASYNC(src, PROC_REF(explode))
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/update_overlays()
|
||||
@@ -430,7 +430,7 @@ GLOBAL_VAR(bomb_set)
|
||||
if(exploded)
|
||||
return
|
||||
if(timing) //boom
|
||||
INVOKE_ASYNC(src, .proc/explode)
|
||||
INVOKE_ASYNC(src, PROC_REF(explode))
|
||||
return
|
||||
|
||||
//if no boom then we need to let the blob capture our nuke
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
target_set = TRUE
|
||||
mode = MODE_DET
|
||||
visible_message("<span class='notice'>The pinpointer flickers as it begins tracking a target relayed from a detective's revolver.</span>", "<span class='notice'>You hear a pinpointer flickering.</span>")
|
||||
addtimer(CALLBACK(src, .proc/stop_tracking), 1 MINUTES, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(stop_tracking)), 1 MINUTES, TIMER_UNIQUE)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/pinpointer/crew/proc/stop_tracking()
|
||||
|
||||
@@ -76,7 +76,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
|
||||
to_chat(owner.current, "<BR><span class='userdanger'>You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!</span>")
|
||||
SEND_SOUND(owner.current, sound('sound/ambience/alarm4.ogg'))
|
||||
target = null
|
||||
INVOKE_ASYNC(src, .proc/post_target_cryo)
|
||||
INVOKE_ASYNC(src, PROC_REF(post_target_cryo))
|
||||
|
||||
/**
|
||||
* Called a tick after when the objective's target goes to cryo.
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
for(var/datum/mind/head_mind in heads)
|
||||
mark_for_death(rev_mind, head_mind)
|
||||
|
||||
addtimer(CALLBACK(src, .proc/equip_revolutionary, rev_mind.current), rand(10, 100))
|
||||
addtimer(CALLBACK(src, PROC_REF(equip_revolutionary), rev_mind.current), rand(10, 100))
|
||||
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
greet_revolutionary(rev_mind)
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
"Artificer" = image(icon = 'icons/mob/cult.dmi', icon_state = SSticker.cultdat.get_icon("builder")))
|
||||
|
||||
if(shade)
|
||||
var/construct_choice = show_radial_menu(user, shell, construct_icons, custom_check = CALLBACK(src, .proc/radial_check, user), require_near = TRUE)
|
||||
var/construct_choice = show_radial_menu(user, shell, construct_icons, custom_check = CALLBACK(src, PROC_REF(radial_check), user), require_near = TRUE)
|
||||
var/picked_class = construct_types[construct_choice]
|
||||
if((picked_class && !QDELETED(shell) && !QDELETED(src)) && user.Adjacent(shell) && !user.incapacitated() && radial_check(user))
|
||||
var/mob/living/simple_animal/hostile/construct/C = new picked_class(shell.loc)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
log_game("[key_name(wizard)] has been selected as a Wizard")
|
||||
forge_wizard_objectives(wizard)
|
||||
equip_wizard(wizard.current)
|
||||
INVOKE_ASYNC(src, .proc/name_wizard, wizard.current)
|
||||
INVOKE_ASYNC(src, PROC_REF(name_wizard), wizard.current)
|
||||
greet_wizard(wizard)
|
||||
if(use_huds)
|
||||
update_wiz_icons_added(wizard)
|
||||
@@ -99,7 +99,7 @@
|
||||
wizard_mob.mind.name = newname
|
||||
|
||||
/datum/game_mode/proc/greet_wizard(datum/mind/wizard, you_are=1)
|
||||
addtimer(CALLBACK(wizard.current, /mob/.proc/playsound_local, null, 'sound/ambience/antag/ragesmages.ogg', 100, 0), 30)
|
||||
addtimer(CALLBACK(wizard.current, TYPE_PROC_REF(/mob, playsound_local), null, 'sound/ambience/antag/ragesmages.ogg', 100, 0), 30)
|
||||
if(you_are)
|
||||
to_chat(wizard.current, "<span class='danger'>You are the Space Wizard!</span>")
|
||||
to_chat(wizard.current, "<B>The Space Wizards Federation has given you the following tasks:</B>")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user