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:
@@ -132,7 +132,7 @@
|
||||
to_chat(user, "<span class='warning'>Nothing interesting happens!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You emag the barsign. Takeover in progress...</span>")
|
||||
addtimer(CALLBACK(src, .proc/post_emag), 100)
|
||||
addtimer(CALLBACK(src, PROC_REF(post_emag)), 100)
|
||||
|
||||
/obj/structure/sign/barsign/proc/post_emag()
|
||||
if(broken || emagged)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
// This includes maint loot spawners. The problem with that is if a closet loads before a spawner,
|
||||
// the loot will just be in a pile. Adding a timer with 0 delay will cause it to only take in contents once the MC has loaded,
|
||||
// therefore solving the issue on mapload. During rounds, everything will happen as normal
|
||||
addtimer(CALLBACK(src, .proc/take_contents), 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(take_contents)), 0)
|
||||
populate_contents() // Spawn all its stuff
|
||||
update_icon() // Set it to the right icon if needed
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
var/oldloc = loc
|
||||
step(src, direction)
|
||||
if(oldloc != loc)
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), GLOB.configuration.movement.base_walk_speed)
|
||||
addtimer(CALLBACK(src, PROC_REF(ResetMoveDelay)), GLOB.configuration.movement.base_walk_speed)
|
||||
else
|
||||
move_delay = FALSE
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
locked = FALSE
|
||||
add_overlay("sparking")
|
||||
to_chat(user, "<span class='notice'>You break the lock on [src].</span>")
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon)), 1 SECONDS)
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
return
|
||||
shock(user, 70)
|
||||
shock_cooldown = TRUE // We do not want bump shock spam!
|
||||
addtimer(CALLBACK(src, .proc/shock_cooldown), 1 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
addtimer(CALLBACK(src, PROC_REF(shock_cooldown)), 1 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
|
||||
/obj/structure/fence/proc/shock_cooldown()
|
||||
shock_cooldown = FALSE
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
if(GUILLOTINE_BLADE_DROPPED)
|
||||
blade_status = GUILLOTINE_BLADE_MOVING
|
||||
icon_state = "guillotine_raise"
|
||||
addtimer(CALLBACK(src, .proc/raise_blade), GUILLOTINE_ANIMATION_LENGTH)
|
||||
addtimer(CALLBACK(src, PROC_REF(raise_blade)), GUILLOTINE_ANIMATION_LENGTH)
|
||||
return
|
||||
if(GUILLOTINE_BLADE_RAISED)
|
||||
if(has_buckled_mobs())
|
||||
@@ -82,7 +82,7 @@
|
||||
blade_status = GUILLOTINE_BLADE_MOVING
|
||||
icon_state = "guillotine_drop"
|
||||
playsound(src, 'sound/items/unsheath.ogg', 100, 1)
|
||||
addtimer(CALLBACK(src, .proc/drop_blade, user), GUILLOTINE_ANIMATION_LENGTH - 2) // Minus two so we play the sound and decap faster
|
||||
addtimer(CALLBACK(src, PROC_REF(drop_blade), user), GUILLOTINE_ANIMATION_LENGTH - 2) // Minus two so we play the sound and decap faster
|
||||
else
|
||||
current_action = 0
|
||||
else
|
||||
@@ -91,7 +91,7 @@
|
||||
blade_status = GUILLOTINE_BLADE_MOVING
|
||||
icon_state = "guillotine_drop"
|
||||
playsound(src, 'sound/items/unsheath.ogg', 100, 1)
|
||||
addtimer(CALLBACK(src, .proc/drop_blade), GUILLOTINE_ANIMATION_LENGTH)
|
||||
addtimer(CALLBACK(src, PROC_REF(drop_blade)), GUILLOTINE_ANIMATION_LENGTH)
|
||||
|
||||
/obj/structure/guillotine/proc/raise_blade()
|
||||
blade_status = GUILLOTINE_BLADE_RAISED
|
||||
@@ -137,7 +137,7 @@
|
||||
// The delay is to make large crowds have a longer lasting applause
|
||||
var/delay_offset = 0
|
||||
for(var/mob/living/carbon/human/HM in viewers(src, 7))
|
||||
addtimer(CALLBACK(HM, /mob/.proc/emote, "clap"), delay_offset * 0.3)
|
||||
addtimer(CALLBACK(HM, TYPE_PROC_REF(/mob, emote), "clap"), delay_offset * 0.3)
|
||||
delay_offset++
|
||||
else
|
||||
H.apply_damage(15 * blade_sharpness, BRUTE, head)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
icon_state = "holosign"
|
||||
|
||||
/obj/structure/holosign/wetsign/proc/wet_timer_start(obj/item/holosign_creator/HS_C)
|
||||
addtimer(CALLBACK(src, .proc/wet_timer_finish, HS_C), 82 SECONDS, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(wet_timer_finish), HS_C), 82 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
/obj/structure/holosign/wetsign/proc/wet_timer_finish(obj/item/holosign_creator/HS_C)
|
||||
playsound(HS_C.loc, 'sound/machines/chime.ogg', 20, 1)
|
||||
@@ -131,7 +131,7 @@
|
||||
var/mob/living/M = user
|
||||
M.electrocute_act(15, "Energy Barrier")
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(cooldown)), 5)
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/Bumped(atom/movable/AM)
|
||||
if(shockcd)
|
||||
@@ -143,4 +143,4 @@
|
||||
var/mob/living/M = AM
|
||||
M.electrocute_act(15, "Energy Barrier")
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(cooldown)), 5)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
qdel(src)
|
||||
else
|
||||
visible_message("[src] slowly deflates.")
|
||||
addtimer(CALLBACK(src, .proc/deflate), 5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(deflate)), 5 SECONDS)
|
||||
|
||||
/obj/structure/inflatable/proc/deflate()
|
||||
var/obj/item/inflatable/R = new intact(loc)
|
||||
|
||||
@@ -80,7 +80,7 @@ GLOBAL_LIST_INIT(tendrils, list())
|
||||
visible_message("<span class='boldannounce'>The tendril writhes in fury as the earth around it begins to crack and break apart! Get back!</span>")
|
||||
visible_message("<span class='warning'>Something falls free of the tendril!</span>")
|
||||
playsound(loc, 'sound/effects/tendril_destroyed.ogg', 200, FALSE, 50, TRUE, TRUE)
|
||||
addtimer(CALLBACK(src, .proc/collapse), 50)
|
||||
addtimer(CALLBACK(src, PROC_REF(collapse)), 50)
|
||||
|
||||
/obj/effect/collapse/Destroy()
|
||||
QDEL_NULL(emitted_light)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
is_operating = FALSE
|
||||
|
||||
if(state_open && close_delay != -1)
|
||||
addtimer(CALLBACK(src, .proc/operate), close_delay)
|
||||
addtimer(CALLBACK(src, PROC_REF(operate)), close_delay)
|
||||
|
||||
/obj/structure/mineral_door/update_icon_state()
|
||||
if(state_open)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, 1)
|
||||
for(var/obj/structure/nest/N in range(spawn_trigger_distance, src))
|
||||
N.spawn_is_triggered = TRUE
|
||||
addtimer(CALLBACK(N, /obj/structure/nest/.proc/spawn_mob, chosen_mob), rand(2, 5) SECONDS)
|
||||
addtimer(CALLBACK(N, TYPE_PROC_REF(/obj/structure/nest, spawn_mob), chosen_mob), rand(2, 5) SECONDS)
|
||||
|
||||
/obj/structure/nest/proc/spawn_mob(mob/M)
|
||||
var/byproduct = pick(spawn_byproduct)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unfasten the railing from":"fasten the railing to"] the floor...</span>")
|
||||
if(I.use_tool(src, user, volume = 75, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
|
||||
if(I.use_tool(src, user, volume = 75, extra_checks = CALLBACK(src, PROC_REF(check_anchored), anchored)))
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the railing to":"unfasten the railing from"] the floor.</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -145,7 +145,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
switch(alert("What would you like to do?", "Thermal Drill", "Turn [drill_timer ? "Off" : "On"]", "Remove Drill", "Cancel"))
|
||||
if("Turn On")
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
drill_timer = addtimer(CALLBACK(src, .proc/drill_open), time_to_drill, TIMER_STOPPABLE)
|
||||
drill_timer = addtimer(CALLBACK(src, PROC_REF(drill_open)), time_to_drill, TIMER_STOPPABLE)
|
||||
drill_start_time = world.time
|
||||
drill.soundloop.start()
|
||||
update_icon()
|
||||
|
||||
@@ -433,7 +433,7 @@
|
||||
|
||||
// Don't break if they're just flying past
|
||||
if(AM.throwing)
|
||||
addtimer(CALLBACK(src, .proc/throw_check, AM), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(throw_check), AM), 5)
|
||||
else
|
||||
check_break(AM)
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(hatch_state == TRANSIT_TUBE_CLOSED)
|
||||
icon_state = "opening"
|
||||
hatch_state = TRANSIT_TUBE_OPENING
|
||||
addtimer(CALLBACK(src, .proc/open_hatch_callback), OPEN_DURATION)
|
||||
addtimer(CALLBACK(src, PROC_REF(open_hatch_callback)), OPEN_DURATION)
|
||||
|
||||
/obj/structure/transit_tube/station/proc/open_hatch_callback()
|
||||
if(hatch_state == TRANSIT_TUBE_OPENING)
|
||||
@@ -103,7 +103,7 @@
|
||||
if(hatch_state == TRANSIT_TUBE_OPEN)
|
||||
icon_state = "closing"
|
||||
hatch_state = TRANSIT_TUBE_CLOSING
|
||||
addtimer(CALLBACK(src, .proc/close_hatch_calllback), CLOSE_DURATION)
|
||||
addtimer(CALLBACK(src, PROC_REF(close_hatch_calllback)), CLOSE_DURATION)
|
||||
|
||||
/obj/structure/transit_tube/station/proc/close_hatch_calllback()
|
||||
if(hatch_state == TRANSIT_TUBE_CLOSING)
|
||||
@@ -113,7 +113,7 @@
|
||||
/obj/structure/transit_tube/station/proc/launch_pod()
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && (pod.dir in directions()))
|
||||
addtimer(CALLBACK(src, .proc/launch_pod_callback, pod), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(launch_pod_callback), pod), 5)
|
||||
return
|
||||
|
||||
/obj/structure/transit_tube/station/proc/launch_pod_callback(obj/structure/transit_tube_pod/pod)
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
/obj/structure/transit_tube/station/pod_stopped(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
pod_moving = TRUE
|
||||
addtimer(CALLBACK(src, .proc/pod_stopped_callback, pod), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(pod_stopped_callback), pod), 5)
|
||||
|
||||
/obj/structure/transit_tube/station/proc/pod_stopped_callback(obj/structure/transit_tube_pod/pod)
|
||||
launch_cooldown = world.time + LAUNCH_COOLDOWN
|
||||
|
||||
@@ -351,10 +351,10 @@
|
||||
// If there was already mist, and the shower was turned off (or made cold): remove the existing mist in 25 sec
|
||||
var/obj/effect/mist/mist = locate() in loc
|
||||
if(!mist && on && current_temperature != SHOWER_FREEZING)
|
||||
addtimer(CALLBACK(src, .proc/make_mist), 5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(make_mist)), 5 SECONDS)
|
||||
|
||||
if(mist && (!on || current_temperature == SHOWER_FREEZING))
|
||||
addtimer(CALLBACK(src, .proc/clear_mist), 25 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(clear_mist)), 25 SECONDS)
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/make_mist()
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
return
|
||||
if(decon_speed) // Only show this if it actually takes time
|
||||
to_chat(user, "<span class='notice'>You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
return
|
||||
state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.</span>")
|
||||
@@ -240,7 +240,7 @@
|
||||
if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME)
|
||||
if(decon_speed)
|
||||
to_chat(user, "<span class='notice'>You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
return
|
||||
state = (state == WINDOW_IN_FRAME ? WINDOW_SCREWED_TO_FRAME : WINDOW_IN_FRAME)
|
||||
to_chat(user, "<span class='notice'>You [state == WINDOW_IN_FRAME ? "unfasten the window from":"fasten the window to"] the frame.</span>")
|
||||
@@ -248,7 +248,7 @@
|
||||
else if(state == WINDOW_OUT_OF_FRAME)
|
||||
if(decon_speed)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
return
|
||||
anchored = !anchored
|
||||
air_update_turf(TRUE)
|
||||
@@ -258,7 +258,7 @@
|
||||
else //if we're not reinforced, we don't need to check or update state
|
||||
if(decon_speed)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, PROC_REF(check_anchored), anchored)))
|
||||
return
|
||||
anchored = !anchored
|
||||
air_update_turf(TRUE)
|
||||
@@ -275,7 +275,7 @@
|
||||
return
|
||||
if(decon_speed)
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
return
|
||||
var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
|
||||
G.add_fingerprint(user)
|
||||
|
||||
Reference in New Issue
Block a user