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
+2 -2
View File
@@ -1,12 +1,12 @@
/datum/event/abductor
/datum/event/abductor/start()
INVOKE_ASYNC(src, .proc/try_makeAbductorTeam)
INVOKE_ASYNC(src, PROC_REF(try_makeAbductorTeam))
/datum/event/abductor/proc/try_makeAbductorTeam()
if(!makeAbductorTeam())
message_admins("Abductor event failed to find players. Retrying in 30s.")
addtimer(CALLBACK(src, .proc/makeAbductorTeam), 30 SECONDS)
addtimer(CALLBACK(src, PROC_REF(makeAbductorTeam)), 30 SECONDS)
/datum/event/abductor/proc/makeAbductorTeam()
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for an Abductor Team?", ROLE_ABDUCTOR, TRUE)
+1 -1
View File
@@ -18,7 +18,7 @@
playercount = length(GLOB.clients)//grab playercount when event starts not when game starts
if(playercount >= highpop_trigger) //spawn with 4 if highpop
spawncount = 4
INVOKE_ASYNC(src, .proc/spawn_xenos)
INVOKE_ASYNC(src, PROC_REF(spawn_xenos))
/datum/event/alien_infestation/proc/spawn_xenos()
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as an alien?", ROLE_ALIEN, TRUE, source = /mob/living/carbon/alien/larva)
+1 -1
View File
@@ -10,7 +10,7 @@
log_and_message_admins("Warning: Could not spawn any mobs for event Blob")
/datum/event/blob/start()
INVOKE_ASYNC(src, .proc/make_blob)
INVOKE_ASYNC(src, PROC_REF(make_blob))
/datum/event/blob/proc/make_blob()
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a blob infested mouse?", ROLE_BLOB, TRUE, source = /mob/living/simple_animal/mouse/blobinfected)
+1 -1
View File
@@ -20,7 +20,7 @@
for(var/obj/machinery/vending/V in GLOB.machines)
if(!is_station_level(V.z))
continue
RegisterSignal(V, COMSIG_PARENT_QDELETING, .proc/vendor_destroyed)
RegisterSignal(V, COMSIG_PARENT_QDELETING, PROC_REF(vendor_destroyed))
vendingMachines.Add(V)
if(!length(vendingMachines))
@@ -20,4 +20,4 @@
T.start_ion()
// Bring it back sometime between 3-5 minutes. This uses deciseconds, so 1800 and 3000 respecticely.
// The AI cannot disable this, it must be waited for
addtimer(CALLBACK(T, /obj/machinery/tcomms.proc/end_ion), rand(1800, 3000))
addtimer(CALLBACK(T, TYPE_PROC_REF(/obj/machinery/tcomms, end_ion)), rand(1800, 3000))
+3 -3
View File
@@ -7,9 +7,9 @@
for(var/obj/machinery/door/D in GLOB.airlocks)
if(!is_station_level(D.z))
continue
INVOKE_ASYNC(D, /obj/machinery/door.proc/hostile_lockdown)
addtimer(CALLBACK(D, /obj/machinery/door.proc/disable_lockdown), 90 SECONDS)
addtimer(CALLBACK(src, .proc/reboot), 90 SECONDS)
INVOKE_ASYNC(D, TYPE_PROC_REF(/obj/machinery/door, hostile_lockdown))
addtimer(CALLBACK(D, TYPE_PROC_REF(/obj/machinery/door, disable_lockdown)), 90 SECONDS)
addtimer(CALLBACK(src, PROC_REF(reboot)), 90 SECONDS)
post_status(STATUS_DISPLAY_ALERT, "lockdown")
/datum/event/door_runtime/proc/reboot()
+1 -1
View File
@@ -77,7 +77,7 @@
shake_camera(M, 3, 1)
playsound(loc, 'sound/effects/meteorimpact.ogg', 40, 1)
INVOKE_ASYNC(src, .proc/impact_meteor, A) // ex_act can have some sleeps in it
INVOKE_ASYNC(src, PROC_REF(impact_meteor), A) // ex_act can have some sleeps in it
/obj/effect/space_dust/proc/impact_meteor(atom/A)
var/turf/where = get_turf(A)
+1 -1
View File
@@ -24,4 +24,4 @@
for(var/thing in epicentreList)
var/obj/effect/landmark/epicentre = thing
for(var/obj/machinery/power/apc/apc in range(epicentre, lightsoutRange))
INVOKE_ASYNC(apc, /obj/machinery/power/apc.proc/overload_lighting)
INVOKE_ASYNC(apc, TYPE_PROC_REF(/obj/machinery/power/apc, overload_lighting))
+1 -1
View File
@@ -8,7 +8,7 @@
qnty = rand(45,125)
/datum/event/dust/meaty/start()
INVOKE_ASYNC(src, .proc/spawn_meaty_ores)
INVOKE_ASYNC(src, PROC_REF(spawn_meaty_ores))
/datum/event/dust/meaty/proc/spawn_meaty_ores()
while(qnty-- > 0)
+1 -1
View File
@@ -17,7 +17,7 @@
//meteor showers are lighter and more common,
/datum/event/meteor_wave/tick()
if(waves && activeFor >= next_meteor)
INVOKE_ASYNC(GLOBAL_PROC, .proc/spawn_meteors, get_meteor_count(), get_meteors())
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(spawn_meteors), get_meteor_count(), get_meteors())
next_meteor += rand(15, 30) / severity
waves--
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
+1 -1
View File
@@ -1,7 +1,7 @@
/datum/event/sentience
/datum/event/sentience/start()
INVOKE_ASYNC(src, .proc/make_sentient_mob)
INVOKE_ASYNC(src, PROC_REF(make_sentient_mob))
/datum/event/sentience/proc/make_sentient_mob()
var/list/potential = list()
+1 -1
View File
@@ -35,7 +35,7 @@
log_game("[key_name_admin(S)] was spawned as a Slaughter Demon by an event.")
/datum/event/spawn_slaughter/start()
INVOKE_ASYNC(src, .proc/get_slaughter)
INVOKE_ASYNC(src, PROC_REF(get_slaughter))
/datum/event/spawn_slaughter/greater
demon = /mob/living/simple_animal/slaughter
+1 -1
View File
@@ -230,7 +230,7 @@
if(explosion_severity < 3)
qdel(holder)
else
addtimer(CALLBACK(holder, /obj/structure/spacevine.proc/wither), 5)
addtimer(CALLBACK(holder, TYPE_PROC_REF(/obj/structure/spacevine, wither)), 5)
return TRUE
/datum/spacevine_mutation/explosive/on_death(obj/structure/spacevine/holder, mob/hitter, obj/item/I)
+1 -1
View File
@@ -22,7 +22,7 @@
/datum/event/spider_terror/start()
// It is necessary to wrap this to avoid the event triggering repeatedly.
INVOKE_ASYNC(src, .proc/wrappedstart)
INVOKE_ASYNC(src, PROC_REF(wrappedstart))
/datum/event/spider_terror/proc/wrappedstart()
var/spider_type
+4 -4
View File
@@ -23,11 +23,11 @@
// Give ghosts some time to jump there before it begins.
var/image/alert_overlay = image('icons/mob/animal.dmi', notify_image)
notify_ghosts("\A [src] is about to open in [get_area(T)].", title = notify_title, source = T, alert_overlay = alert_overlay, action = NOTIFY_FOLLOW)
addtimer(CALLBACK(src, .proc/spawn_tear, T), 4 SECONDS)
addtimer(CALLBACK(src, PROC_REF(spawn_tear), T), 4 SECONDS)
// Energy overload; we mess with machines as an early warning and for extra spookiness.
for(var/obj/machinery/M in range(8, T))
INVOKE_ASYNC(M, /atom/.proc/get_spooked)
INVOKE_ASYNC(M, TYPE_PROC_REF(/atom, get_spooked))
/datum/event/tear/proc/spawn_tear(location)
TE = new /obj/effect/tear(location)
@@ -62,8 +62,8 @@
playsound(get_turf(src), 'sound/magic/drum_heartbeat.ogg', 100)
// We spawn the minions first, then the boss.
addtimer(CALLBACK(src, .proc/spawn_mobs), 2 SECONDS)
addtimer(CALLBACK(src, .proc/spawn_leader), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(spawn_mobs)), 2 SECONDS)
addtimer(CALLBACK(src, PROC_REF(spawn_leader)), 5 SECONDS)
/obj/effect/tear/proc/spawn_mobs()
// We break some of those flickering consoles from earlier.
+2 -2
View File
@@ -31,7 +31,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
trader_objectives = forge_trader_objectives()
INVOKE_ASYNC(src, .proc/spawn_traders, spawnlocs)
INVOKE_ASYNC(src, PROC_REF(spawn_traders), spawnlocs)
/datum/event/traders/proc/spawn_traders(list/spawnlocs)
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a Sol Trader?", ROLE_TRADER, TRUE)
@@ -63,7 +63,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
to_chat(M, "<span class='boldnotice'>You are a trader!</span>")
to_chat(M, "<span class='notice'>You are currently docked at [get_area(M)].</span>")
to_chat(M, "<span class='notice'>You are about to trade with [station_name()].</span>")
addtimer(CALLBACK(GLOBAL_PROC, .proc/show_objectives, M.mind), 25)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(show_objectives), M.mind), 25)
/datum/event/traders/proc/forge_trader_objectives()
var/list/objs = list()
+1 -1
View File
@@ -1,5 +1,5 @@
/datum/event/wallrot/start()
INVOKE_ASYNC(src, .proc/spawn_wallrot)
INVOKE_ASYNC(src, PROC_REF(spawn_wallrot))
/datum/event/wallrot/proc/spawn_wallrot()
var/turf/simulated/wall/center = null