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

View File

@@ -114,7 +114,7 @@
D.fire()
charged = FALSE
update_icon()
addtimer(CALLBACK(src, .proc/Recharge), charge_time)
addtimer(CALLBACK(src, PROC_REF(Recharge)), charge_time)
return
if(proximity_flag && isliving(target))
var/mob/living/L = target
@@ -392,7 +392,7 @@
continue
playsound(L, 'sound/magic/fireball.ogg', 20, 1)
new /obj/effect/temp_visual/fire(L.loc)
addtimer(CALLBACK(src, .proc/pushback, L, user), 1) //no free backstabs, we push AFTER module stuff is done
addtimer(CALLBACK(src, PROC_REF(pushback), L, user), 1) //no free backstabs, we push AFTER module stuff is done
L.adjustFireLoss(bonus_value)
/obj/item/crusher_trophy/tail_spike/proc/pushback(mob/living/target, mob/living/user)
@@ -458,7 +458,7 @@
/obj/item/crusher_trophy/blaster_tubes/on_mark_detonation(mob/living/target, mob/living/user)
deadly_shot = TRUE
addtimer(CALLBACK(src, .proc/reset_deadly_shot), 300, TIMER_UNIQUE|TIMER_OVERRIDE)
addtimer(CALLBACK(src, PROC_REF(reset_deadly_shot)), 300, TIMER_UNIQUE|TIMER_OVERRIDE)
/obj/item/crusher_trophy/blaster_tubes/proc/reset_deadly_shot()
deadly_shot = FALSE

View File

@@ -32,7 +32,7 @@
/obj/item/organ/internal/regenerative_core/Initialize(mapload)
. = ..()
addtimer(CALLBACK(src, .proc/inert_check), 2400)
addtimer(CALLBACK(src, PROC_REF(inert_check)), 2400)
/obj/item/organ/internal/regenerative_core/proc/inert_check()
if(!preserved)
@@ -122,7 +122,7 @@
/obj/item/organ/internal/regenerative_core/legion/update_icon_state()
icon_state = inert ? "legion_soul_inert" : "legion_soul"
/obj/item/organ/internal/regenerative_core/legion/update_overlays()
. = ..()
if(!inert && !preserved)

View File

@@ -70,7 +70,7 @@
transform = matrix() * 0.75
animate(src, transform = matrix() * 1.5, time = duration)
deltimer(timerid)
timerid = addtimer(CALLBACK(src, .proc/burst), duration, TIMER_STOPPABLE)
timerid = addtimer(CALLBACK(src, PROC_REF(burst)), duration, TIMER_STOPPABLE)
/obj/effect/temp_visual/resonance/Destroy()
if(res)

View File

@@ -88,7 +88,7 @@
L.Weaken(12 SECONDS)
if(ishuman(L))
shake_camera(L, 20, 1)
addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)
addtimer(CALLBACK(L, TYPE_PROC_REF(/mob/living/carbon, vomit)), 20)
/obj/item/wormhole_jaunter/contractor
name = "emergency extraction flare"
@@ -140,7 +140,7 @@
"<span class='notice'>You light an emergency extraction flare, initiating the extraction process.</span>")
user.drop_item()
forceMove(F)
addtimer(CALLBACK(src, .proc/create_portal, destination), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(create_portal), destination), 5 SECONDS)
/obj/item/wormhole_jaunter/contractor/proc/create_portal(turf/destination)
new /obj/effect/decal/cleanable/ash(get_turf(src))

View File

@@ -46,7 +46,7 @@
name = harvested_name
desc = harvested_desc
harvested = TRUE
addtimer(CALLBACK(src, .proc/regrow), rand(regrowth_time_low, regrowth_time_high))
addtimer(CALLBACK(src, PROC_REF(regrow)), rand(regrowth_time_low, regrowth_time_high))
return 1
/obj/structure/flora/ash/proc/regrow()

View File

@@ -44,7 +44,7 @@
..()
spirits = list()
register_signals(src)
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/on_move)
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
GLOB.poi_list |= src
/obj/item/melee/ghost_sword/Destroy()
@@ -113,8 +113,8 @@
UnregisterSignal(A, COMSIG_ATOM_ORBIT_BEGIN)
/obj/item/melee/ghost_sword/proc/register_signals(atom/A)
RegisterSignal(A, COMSIG_ATOM_ORBIT_BEGIN, .proc/add_ghost, override = TRUE)
RegisterSignal(A, COMSIG_ATOM_ORBIT_STOP, .proc/remove_ghost, override = TRUE)
RegisterSignal(A, COMSIG_ATOM_ORBIT_BEGIN, PROC_REF(add_ghost), override = TRUE)
RegisterSignal(A, COMSIG_ATOM_ORBIT_STOP, PROC_REF(remove_ghost), override = TRUE)
/**
* When moving into something's contents

View File

@@ -64,14 +64,14 @@
calculate_anger_mod(user)
timer = world.time + CLICK_CD_MELEE //by default, melee attacks only cause melee blasts, and have an accordingly short cooldown
if(proximity_flag)
INVOKE_ASYNC(src, .proc/aoe_burst, T, user)
INVOKE_ASYNC(src, PROC_REF(aoe_burst), T, user)
if(is_station_level(T.z))
add_attack_logs(user, target, "Fired 3x3 blast at [src]")
else
add_attack_logs(user, target, "Fired 3x3 blast at [src]", ATKLOG_ALL)
else
if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
INVOKE_ASYNC(src, .proc/cardinal_blasts, T, user)
INVOKE_ASYNC(src, PROC_REF(cardinal_blasts), T, user)
timer = world.time + cooldown_time
else if(target in view(5, get_turf(user))) //if the target is in view, hit it
timer = world.time + cooldown_time
@@ -85,7 +85,7 @@
else
add_attack_logs(user, target, "Fired a chaser at [src]", ATKLOG_ALL)
else
INVOKE_ASYNC(src, .proc/cardinal_blasts, T, user) //otherwise, just do cardinal blast
INVOKE_ASYNC(src, PROC_REF(cardinal_blasts), T, user) //otherwise, just do cardinal blast
if(is_station_level(T.z))
add_attack_logs(user, target, "Fired cardinal blast at [src]")
else
@@ -93,7 +93,7 @@
else
to_chat(user, "<span class='warning'>That target is out of range!</span>" )
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
/obj/item/hierophant_club/proc/calculate_anger_mod(mob/user) //we get stronger as the user loses health
chaser_cooldown = initial(chaser_cooldown)
@@ -140,7 +140,7 @@
user.visible_message("<span class='hierophant_warning'>[user] starts fiddling with [src]'s pommel...</span>", \
"<span class='notice'>You start detaching the hierophant beacon...</span>")
timer = world.time + 51
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
if(do_after(user, 50, target = user) && !beacon)
var/turf/T = get_turf(user)
playsound(T,'sound/magic/blind.ogg', 200, TRUE, -4)
@@ -152,7 +152,7 @@
<span class='notice'>You can remove the beacon to place it again by striking it with the club.</span>")
else
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
else
to_chat(user, "<span class='warning'>You need to be on solid ground to detach the beacon!</span>")
return
@@ -172,7 +172,7 @@
user.update_action_buttons_icon()
user.visible_message("<span class='hierophant_warning'>[user] starts to glow faintly...</span>")
timer = world.time + 50
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
beacon.icon_state = "hierophant_tele_on"
var/obj/effect/temp_visual/hierophant/telegraph/edge/TE1 = new /obj/effect/temp_visual/hierophant/telegraph/edge(user.loc)
var/obj/effect/temp_visual/hierophant/telegraph/edge/TE2 = new /obj/effect/temp_visual/hierophant/telegraph/edge(beacon.loc)
@@ -184,7 +184,7 @@
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
user.update_action_buttons_icon()
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
beacon.icon_state = "hierophant_tele_off"
return
new /obj/effect/temp_visual/hierophant/telegraph(T, user)
@@ -196,7 +196,7 @@
if(user)
user.update_action_buttons_icon()
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
if(beacon)
beacon.icon_state = "hierophant_tele_off"
return
@@ -205,7 +205,7 @@
to_chat(user, "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>")
user.update_action_buttons_icon()
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
beacon.icon_state = "hierophant_tele_off"
return
add_attack_logs(user, beacon, "Teleported self from ([AREACOORD(source)]) to ([AREACOORD(beacon)])")
@@ -218,7 +218,7 @@
var/obj/effect/temp_visual/hierophant/blast/B = new /obj/effect/temp_visual/hierophant/blast(t, user, TRUE) //but absolutely will hurt enemies
B.damage = 30
for(var/mob/living/L in range(1, source))
INVOKE_ASYNC(src, .proc/teleport_mob, source, L, T, user) //regardless, take all mobs near us along
INVOKE_ASYNC(src, PROC_REF(teleport_mob), source, L, T, user) //regardless, take all mobs near us along
sleep(6) //at this point the blasts detonate
if(beacon)
beacon.icon_state = "hierophant_tele_off"
@@ -226,7 +226,7 @@
qdel(TE1)
qdel(TE2)
timer = world.time
INVOKE_ASYNC(src, .proc/prepare_icon_update)
INVOKE_ASYNC(src, PROC_REF(prepare_icon_update))
if(beacon)
beacon.icon_state = "hierophant_tele_off"
teleporting = FALSE
@@ -267,7 +267,7 @@
B.damage = HIEROPHANT_CLUB_CARDINAL_DAMAGE
B.monster_damage_boost = FALSE
for(var/d in GLOB.cardinal)
INVOKE_ASYNC(src, .proc/blast_wall, T, d, user)
INVOKE_ASYNC(src, PROC_REF(blast_wall), T, d, user)
/obj/item/hierophant_club/proc/blast_wall(turf/T, dir, mob/living/user) //make a wall of blasts blast_range tiles long
if(!T)

View File

@@ -260,7 +260,7 @@
return
if(wisp.loc == src)
RegisterSignal(user, COMSIG_MOB_UPDATE_SIGHT, .proc/update_user_sight)
RegisterSignal(user, COMSIG_MOB_UPDATE_SIGHT, PROC_REF(update_user_sight))
to_chat(user, "<span class='notice'>You release the wisp. It begins to bob around your head.</span>")
icon_state = "lantern"
@@ -349,7 +349,7 @@
smoke2.start()
cooldown = TRUE
linked.cooldown = TRUE
addtimer(CALLBACK(src, .proc/reset), 20 SECONDS)
addtimer(CALLBACK(src, PROC_REF(reset)), 20 SECONDS)
/obj/item/warp_cube/proc/reset()
cooldown = FALSE

View File

@@ -364,7 +364,7 @@
..()
if(!activated)
return
addtimer(CALLBACK(src, .proc/try_attach_to_owner), 0) // Do this once the drop call stack is done. The holding limb might be getting removed
addtimer(CALLBACK(src, PROC_REF(try_attach_to_owner)), 0) // Do this once the drop call stack is done. The holding limb might be getting removed
/obj/item/rod_of_asclepius/proc/try_attach_to_owner()
if(ishuman(owner) && !QDELETED(owner))
@@ -403,7 +403,7 @@
activated = TRUE
owner.apply_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH)
RegisterSignal(owner, COMSIG_PARENT_QDELETING, .proc/deactivate)
RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(deactivate))
/obj/item/rod_of_asclepius/proc/deactivate()
if(owner)
@@ -434,7 +434,7 @@
. = ..()
to_chat(user,"<span class='userdanger'>The mass goes up your arm and inside it!</span>")
playsound(user, 'sound/misc/demon_consume.ogg', 50, TRUE)
RegisterSignal(user, COMSIG_MOB_DEATH, .proc/user_death)
RegisterSignal(user, COMSIG_MOB_DEATH, PROC_REF(user_death))
user.drop_item()
insert(user)
@@ -464,7 +464,7 @@
/obj/item/organ/internal/cyberimp/arm/katana/proc/user_death(mob/user)
SIGNAL_HANDLER
INVOKE_ASYNC(src, .proc/user_death_async, user)
INVOKE_ASYNC(src, PROC_REF(user_death_async), user)
/obj/item/organ/internal/cyberimp/arm/katana/proc/user_death_async(mob/user)
Retract()
@@ -472,7 +472,7 @@
"<span class='userdanger'>You feel your body begin to turn to dust, your soul being drawn into [src]!</span>")
forceMove(get_turf(owner))
remove(user)
addtimer(CALLBACK(user, /mob/.proc/dust), 1 SECONDS)
addtimer(CALLBACK(user, TYPE_PROC_REF(/mob, dust)), 1 SECONDS)
/obj/item/organ/internal/cyberimp/arm/katana/remove(mob/living/carbon/M, special)
@@ -514,12 +514,12 @@
var/list/input_list = list()
var/list/combo_strings = list()
var/static/list/combo_list = list(
ATTACK_STRIKE = list(COMBO_STEPS = list(LEFT_SLASH, LEFT_SLASH, RIGHT_SLASH), COMBO_PROC = .proc/strike),
ATTACK_SLICE = list(COMBO_STEPS = list(RIGHT_SLASH, LEFT_SLASH, LEFT_SLASH), COMBO_PROC = .proc/slice),
ATTACK_DASH = list(COMBO_STEPS = list(LEFT_SLASH, RIGHT_SLASH, RIGHT_SLASH), COMBO_PROC = .proc/dash),
ATTACK_CUT = list(COMBO_STEPS = list(RIGHT_SLASH, RIGHT_SLASH, LEFT_SLASH), COMBO_PROC = .proc/cut),
ATTACK_HEAL = list(COMBO_STEPS = list(LEFT_SLASH, RIGHT_SLASH, LEFT_SLASH, RIGHT_SLASH), COMBO_PROC = .proc/heal),
ATTACK_SHATTER = list(COMBO_STEPS = list(RIGHT_SLASH, LEFT_SLASH, RIGHT_SLASH, LEFT_SLASH), COMBO_PROC = .proc/shatter),
ATTACK_STRIKE = list(COMBO_STEPS = list(LEFT_SLASH, LEFT_SLASH, RIGHT_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, strike)),
ATTACK_SLICE = list(COMBO_STEPS = list(RIGHT_SLASH, LEFT_SLASH, LEFT_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, slice)),
ATTACK_DASH = list(COMBO_STEPS = list(LEFT_SLASH, RIGHT_SLASH, RIGHT_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, dash)),
ATTACK_CUT = list(COMBO_STEPS = list(RIGHT_SLASH, RIGHT_SLASH, LEFT_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, cut)),
ATTACK_HEAL = list(COMBO_STEPS = list(LEFT_SLASH, RIGHT_SLASH, LEFT_SLASH, RIGHT_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, heal)),
ATTACK_SHATTER = list(COMBO_STEPS = list(RIGHT_SLASH, LEFT_SLASH, RIGHT_SLASH, LEFT_SLASH), COMBO_PROC = TYPE_PROC_REF(/obj/item/cursed_katana, shatter)),
)
/obj/item/cursed_katana/Initialize(mapload)
@@ -561,7 +561,7 @@
reset_inputs(null, TRUE)
return TRUE
else
timerid = addtimer(CALLBACK(src, .proc/reset_inputs, user, FALSE), 5 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)
timerid = addtimer(CALLBACK(src, PROC_REF(reset_inputs), user, FALSE), 5 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)
return ..()
/obj/item/cursed_katana/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
@@ -589,9 +589,9 @@
"<span class='notice'>You hilt strike [target]!</span>")
to_chat(target, "<span class='userdanger'>You've been struck by [user]!</span>")
playsound(src, 'sound/weapons/genhit3.ogg', 50, TRUE)
RegisterSignal(target, COMSIG_MOVABLE_IMPACT, .proc/strike_throw_impact)
RegisterSignal(target, COMSIG_MOVABLE_IMPACT, PROC_REF(strike_throw_impact))
var/atom/throw_target = get_edge_target_turf(target, user.dir)
target.throw_at(throw_target, 5, 3, user, FALSE, callback = CALLBACK(target, /datum/.proc/UnregisterSignal, target, COMSIG_MOVABLE_IMPACT))
target.throw_at(throw_target, 5, 3, user, FALSE, callback = CALLBACK(target, TYPE_PROC_REF(/datum, UnregisterSignal), target, COMSIG_MOVABLE_IMPACT))
target.apply_damage(17, BRUTE, BODY_ZONE_CHEST)
to_chat(target, "<span class='userdanger'>You've been struck by [user]!</span>")
user.do_attack_animation(target, ATTACK_EFFECT_PUNCH)
@@ -683,7 +683,7 @@
if(O.holder == src)
O.Retract()
shattered = TRUE
addtimer(CALLBACK(src, .proc/coagulate, user), 45 SECONDS)
addtimer(CALLBACK(src, PROC_REF(coagulate), user), 45 SECONDS)
/obj/item/cursed_katana/proc/coagulate(mob/user)
to_chat(user, "<span class='notice'>[src] reforms!</span>")

View File

@@ -58,7 +58,7 @@
/obj/machinery/mineral/ore_redemption/Initialize(mapload)
. = ..()
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE), INFINITY, FALSE, /obj/item/stack, null, CALLBACK(src, .proc/on_material_insert))
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE), INFINITY, FALSE, /obj/item/stack, null, CALLBACK(src, PROC_REF(on_material_insert)))
ore_buffer = list()
files = new /datum/research/smelter(src)
// Stock parts

View File

@@ -249,7 +249,7 @@
UnregisterSignal(user, COMSIG_MOB_UPDATE_SIGHT)
user.update_sight()
else
RegisterSignal(user, COMSIG_MOB_UPDATE_SIGHT, .proc/update_user_sight)
RegisterSignal(user, COMSIG_MOB_UPDATE_SIGHT, PROC_REF(update_user_sight))
user.update_sight()
to_chat(user, "<span class='notice'>You toggle your meson vision [!is_active ? "on" : "off"].</span>")