515 Compatibility (#19636)

* 515 compat

* double spaces

* Callback documentation, aa review

* spacing

* NAMEOF_STATIC

* big beta
This commit is contained in:
S34N
2022-11-08 23:08:40 +00:00
committed by GitHub
parent 2e7e556383
commit 667dd5d4ac
378 changed files with 928 additions and 919 deletions
+5 -5
View File
@@ -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 ..()
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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")
+3 -3
View File
@@ -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')
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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)
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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>")