mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
515 Compatibility (#19636)
* 515 compat * double spaces * Callback documentation, aa review * spacing * NAMEOF_STATIC * big beta
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
/obj/effect/hallucination/chaser/Initialize(mapload, mob/living/carbon/target)
|
||||
. = ..()
|
||||
name = "\proper monkey ([rand(100, 999)])"
|
||||
think_timer = addtimer(CALLBACK(src, .proc/think), think_interval, TIMER_LOOP | TIMER_STOPPABLE)
|
||||
think_timer = addtimer(CALLBACK(src, PROC_REF(think)), think_interval, TIMER_LOOP | TIMER_STOPPABLE)
|
||||
|
||||
/obj/effect/hallucination/chaser/Destroy()
|
||||
deltimer(think_timer)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
teleport.plane = GAME_PLANE
|
||||
add_icon(teleport)
|
||||
clear_icon_in(teleport, 4 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/do_spawn_scientist, T), 4 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(do_spawn_scientist), T), 4 SECONDS)
|
||||
playsound(T, "sparks", 100, TRUE)
|
||||
|
||||
/**
|
||||
@@ -206,8 +206,8 @@
|
||||
/obj/effect/hallucination/loose_energy_ball/Initialize(mapload)
|
||||
. = ..()
|
||||
phase_1()
|
||||
addtimer(CALLBACK(src, .proc/phase_2), length_phase_1)
|
||||
addtimer(CALLBACK(src, .proc/phase_3), length_phase_1 + length_phase_2)
|
||||
addtimer(CALLBACK(src, PROC_REF(phase_2)), length_phase_1)
|
||||
addtimer(CALLBACK(src, PROC_REF(phase_3)), length_phase_1 + length_phase_2)
|
||||
|
||||
/**
|
||||
* First phase of the hallucination: intermittent, far-away explosion sounds.
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
var/steps = (length_phase_3 / 20) - 1
|
||||
for(var/i in 0 to steps)
|
||||
addtimer(CALLBACK(src, .proc/phase_3_inner, ball, steps - i, i), i * 2 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(phase_3_inner), ball, steps - i, i), i * 2 SECONDS)
|
||||
|
||||
/**
|
||||
* Called during phase 3 to approach the energy ball towards the target.
|
||||
@@ -359,7 +359,7 @@
|
||||
var/turf/T = get_turf(pick(vents))
|
||||
xeno = new(T, target)
|
||||
xeno.dir = get_dir(T, target)
|
||||
addtimer(CALLBACK(src, .proc/do_pounce), pounce_interval)
|
||||
addtimer(CALLBACK(src, PROC_REF(do_pounce)), pounce_interval)
|
||||
|
||||
/obj/effect/hallucination/xeno_pounce/proc/do_pounce()
|
||||
if(QDELETED(xeno) || QDELETED(target))
|
||||
@@ -367,7 +367,7 @@
|
||||
|
||||
xeno.leap_to(target)
|
||||
if(--num_pounces > 0)
|
||||
addtimer(CALLBACK(src, .proc/do_pounce), pounce_interval)
|
||||
addtimer(CALLBACK(src, PROC_REF(do_pounce)), pounce_interval)
|
||||
|
||||
/obj/effect/hallucination/xeno_pouncer
|
||||
hallucination_icon = 'icons/mob/alien.dmi'
|
||||
@@ -399,7 +399,7 @@
|
||||
images[1].icon = 'icons/mob/alienleap.dmi'
|
||||
images[1].icon_state = "alienh_leap"
|
||||
dir = get_dir(get_turf(src), dest)
|
||||
throw_at(dest, 7, 1, spin = FALSE, diagonals_first = TRUE, callback = CALLBACK(src, .proc/reset_icon))
|
||||
throw_at(dest, 7, 1, spin = FALSE, diagonals_first = TRUE, callback = CALLBACK(src, PROC_REF(reset_icon)))
|
||||
|
||||
/**
|
||||
* Resets the xeno's icon to a resting state.
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/obj/machinery/door/airlock/A = pick_n_take(airlocks)
|
||||
if(A.locked)
|
||||
continue
|
||||
addtimer(CALLBACK(src, .proc/do_bolt, A), num_bolted++ * rand(5, 7))
|
||||
addtimer(CALLBACK(src, PROC_REF(do_bolt), A), num_bolted++ * rand(5, 7))
|
||||
bolt_amount--
|
||||
|
||||
/**
|
||||
@@ -86,8 +86,8 @@
|
||||
target?.playsound_local(get_turf(A), A.boltDown, 30, FALSE, 3)
|
||||
LAZYSET(bolted, A, bolt_overlay)
|
||||
// Timer and signal to turn it off (only one can happen)
|
||||
RegisterSignal(A, COMSIG_AIRLOCK_OPEN, .proc/do_unbolt)
|
||||
addtimer(CALLBACK(src, .proc/do_unbolt, A, bolt_overlay), bolt_duration)
|
||||
RegisterSignal(A, COMSIG_AIRLOCK_OPEN, PROC_REF(do_unbolt))
|
||||
addtimer(CALLBACK(src, PROC_REF(do_unbolt), A, bolt_overlay), bolt_duration)
|
||||
|
||||
/**
|
||||
* Called in a timer to fake unbolt the given airlock.
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
create_plasma(T)
|
||||
expand_queue += T
|
||||
processed[T] = TRUE
|
||||
expand_timer = addtimer(CALLBACK(src, .proc/expand), expand_delay, TIMER_LOOP | TIMER_STOPPABLE)
|
||||
expand_timer = addtimer(CALLBACK(src, PROC_REF(expand)), expand_delay, TIMER_LOOP | TIMER_STOPPABLE)
|
||||
|
||||
/obj/effect/hallucination/plasma_flood/Destroy()
|
||||
deltimer(expand_timer)
|
||||
|
||||
@@ -114,7 +114,7 @@ GLOBAL_LIST_INIT(hallucinations, list(
|
||||
* * delay - Delay in deciseconds.
|
||||
*/
|
||||
/obj/effect/hallucination/proc/clear_icon_in(image/I, delay)
|
||||
addtimer(CALLBACK(src, .proc/clear_icon, I), delay)
|
||||
addtimer(CALLBACK(src, PROC_REF(clear_icon), I), delay)
|
||||
|
||||
/**
|
||||
* Clears all images from the hallucination.
|
||||
@@ -141,4 +141,4 @@ GLOBAL_LIST_INIT(hallucinations, list(
|
||||
if(time == 0) // whatever
|
||||
target?.playsound_local(source, snd, volume, vary, frequency)
|
||||
return
|
||||
addtimer(CALLBACK(target, /mob/.proc/playsound_local, source, snd, volume, vary, frequency), time)
|
||||
addtimer(CALLBACK(target, TYPE_PROC_REF(/mob, playsound_local), source, snd, volume, vary, frequency), time)
|
||||
|
||||
Reference in New Issue
Block a user