mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 22:54:32 +01:00
515 Compatibility (#19636)
* 515 compat * double spaces * Callback documentation, aa review * spacing * NAMEOF_STATIC * big beta
This commit is contained in:
@@ -253,7 +253,7 @@
|
||||
if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
|
||||
var/mob/M = A
|
||||
if(M.client)
|
||||
INVOKE_ASYNC(src, .proc/blue_effect, M)
|
||||
INVOKE_ASYNC(src, PROC_REF(blue_effect), M)
|
||||
|
||||
/obj/effect/anomaly/bluespace/proc/blue_effect(mob/M)
|
||||
var/obj/blueeffect = new /obj(src)
|
||||
@@ -300,7 +300,7 @@
|
||||
|
||||
/obj/effect/anomaly/pyro/detonate()
|
||||
if(produces_slime)
|
||||
INVOKE_ASYNC(src, .proc/makepyroslime)
|
||||
INVOKE_ASYNC(src, PROC_REF(makepyroslime))
|
||||
|
||||
/obj/effect/anomaly/pyro/proc/makepyroslime()
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
|
||||
@@ -38,7 +38,7 @@ GLOBAL_LIST_EMPTY(splatter_cache)
|
||||
if(type == /obj/effect/decal/cleanable/blood/gibs)
|
||||
return
|
||||
if(!.)
|
||||
dry_timer = addtimer(CALLBACK(src, .proc/dry), DRYING_TIME * (amount+1), TIMER_STOPPABLE)
|
||||
dry_timer = addtimer(CALLBACK(src, PROC_REF(dry)), DRYING_TIME * (amount+1), TIMER_STOPPABLE)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Destroy()
|
||||
if(dry_timer)
|
||||
|
||||
@@ -48,7 +48,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
for(var/i in 1 to number)
|
||||
if(total_effects > 20)
|
||||
return
|
||||
INVOKE_ASYNC(src, .proc/generate_effect)
|
||||
INVOKE_ASYNC(src, PROC_REF(generate_effect))
|
||||
|
||||
/datum/effect_system/proc/generate_effect()
|
||||
if(holder)
|
||||
@@ -65,7 +65,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
sleep(5)
|
||||
step(E,direction)
|
||||
if(!QDELETED(src))
|
||||
addtimer(CALLBACK(src, .proc/decrement_total_effect), 20)
|
||||
addtimer(CALLBACK(src, PROC_REF(decrement_total_effect)), 20)
|
||||
|
||||
/datum/effect_system/proc/decrement_total_effect()
|
||||
total_effects--
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
new /obj/effect/particle_effect/chem_smoke(location, color)
|
||||
|
||||
if(x % 10 == 0) //Once every 10 ticks.
|
||||
INVOKE_ASYNC(src, .proc/SmokeEm, effect_range)
|
||||
INVOKE_ASYNC(src, PROC_REF(SmokeEm), effect_range)
|
||||
|
||||
sleep(1)
|
||||
qdel(src)
|
||||
|
||||
@@ -56,4 +56,4 @@
|
||||
|
||||
/datum/effect_system/explosion/smoke/start()
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/create_smoke), 5)
|
||||
addtimer(CALLBACK(src, PROC_REF(create_smoke)), 5)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/kill_smoke()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
INVOKE_ASYNC(src, .proc/fade_out)
|
||||
INVOKE_ASYNC(src, PROC_REF(fade_out))
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/particle_effect/smoke/process()
|
||||
@@ -67,7 +67,7 @@
|
||||
if(C.smoke_delay)
|
||||
return FALSE
|
||||
C.smoke_delay++
|
||||
addtimer(CALLBACK(src, .proc/remove_smoke_delay, C), 10)
|
||||
addtimer(CALLBACK(src, PROC_REF(remove_smoke_delay), C), 10)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(n, c, source)
|
||||
sparks.autocleanup = TRUE
|
||||
INVOKE_ASYNC(sparks, /datum/effect_system/.proc/start)
|
||||
INVOKE_ASYNC(sparks, TYPE_PROC_REF(/datum/effect_system, start))
|
||||
|
||||
/obj/effect/particle_effect/sparks
|
||||
name = "sparks"
|
||||
|
||||
@@ -655,7 +655,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin = 1, diagonals_first = 0, datum/callback/callback, force, dodgeable)
|
||||
thrownby = thrower?.UID()
|
||||
callback = CALLBACK(src, .proc/after_throw, callback) //replace their callback with our own
|
||||
callback = CALLBACK(src, PROC_REF(after_throw), callback) //replace their callback with our own
|
||||
. = ..(target, range, speed, thrower, spin, diagonals_first, callback, force, dodgeable)
|
||||
|
||||
/obj/item/proc/after_throw(datum/callback/callback)
|
||||
@@ -721,7 +721,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
if(in_inventory || in_storage)
|
||||
var/mob/user = usr
|
||||
if(!(user.client.prefs.toggles2 & PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS))
|
||||
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), 8, TIMER_STOPPABLE)
|
||||
tip_timer = addtimer(CALLBACK(src, PROC_REF(openTip), location, control, params, user), 8, TIMER_STOPPABLE)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(!(user.client.prefs.toggles2 & PREFTOGGLE_2_SEE_ITEM_OUTLINES))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
/obj/item/candle/proc/start_flickering()
|
||||
flickering = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
addtimer(CALLBACK(src, .proc/stop_flickering), 4 SECONDS, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(stop_flickering)), 4 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
/obj/item/candle/proc/stop_flickering()
|
||||
flickering = FALSE
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
icon = 'icons/mob/carp.dmi'
|
||||
flick("carp_swell", src)
|
||||
// Wait for animation to end
|
||||
addtimer(CALLBACK(src, .proc/make_carp), 6)
|
||||
addtimer(CALLBACK(src, PROC_REF(make_carp)), 6)
|
||||
|
||||
/obj/item/toy/carpplushie/dehy_carp/proc/make_carp()
|
||||
// Make space carp
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
if(confirm == "Yes" && (ui_status(user, GLOB.inventory_state) == STATUS_INTERACTIVE)) // And make doubly sure they want to wipe (three total clicks)
|
||||
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].", ATKLOG_FEW)
|
||||
add_attack_logs(user, AI, "Wiped with [src].")
|
||||
INVOKE_ASYNC(src, .proc/wipe_ai)
|
||||
INVOKE_ASYNC(src, PROC_REF(wipe_ai))
|
||||
|
||||
if("radio")
|
||||
AI.aiRadio.disabledAi = !AI.aiRadio.disabledAi
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(!emagged)
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='notice'>You scan [target]'s radiation levels with [src]...</span>")
|
||||
addtimer(CALLBACK(src, .proc/scan, target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
|
||||
addtimer(CALLBACK(src, PROC_REF(scan), target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [target]!</span>")
|
||||
target.rad_act(radiation_count)
|
||||
@@ -193,7 +193,7 @@
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT)
|
||||
RegisterSignal(user, COMSIG_ATOM_RAD_ACT, .proc/redirect_rad_act)
|
||||
RegisterSignal(user, COMSIG_ATOM_RAD_ACT, PROC_REF(redirect_rad_act))
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount)
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
ADD_TRAIT(H, TRAIT_WAS_BATONNED, user_UID)
|
||||
cooldown = TRUE
|
||||
icon_state = "[icon_base]-shock"
|
||||
addtimer(CALLBACK(src, .proc/allowhit, H, user_UID), attack_cooldown)
|
||||
addtimer(CALLBACK(src, .proc/short_charge), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/recharge), charge_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(allowhit), H, user_UID), attack_cooldown)
|
||||
addtimer(CALLBACK(src, PROC_REF(short_charge)), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(recharge)), charge_time)
|
||||
return
|
||||
|
||||
if((H.health <= HEALTH_THRESHOLD_CRIT) || (H.undergoing_cardiac_arrest()))
|
||||
@@ -84,8 +84,8 @@
|
||||
|
||||
cooldown = TRUE
|
||||
icon_state = "[icon_base]-shock"
|
||||
addtimer(CALLBACK(src, .proc/short_charge), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/recharge), charge_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(short_charge)), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(recharge)), charge_time)
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src]'s on board medical scanner indicates that no shock is required.</span>")
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
if(!current_area)
|
||||
return
|
||||
if(on)
|
||||
RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, .proc/AreaPowerCheck)
|
||||
RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, PROC_REF(AreaPowerCheck))
|
||||
else
|
||||
UnregisterSignal(current_area, COMSIG_AREA_POWER_CHANGE)
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
universal_speak = TRUE
|
||||
|
||||
/mob/living/automatedannouncer/New()
|
||||
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), 10 SECONDS, TIMER_STOPPABLE)
|
||||
lifetime_timer = addtimer(CALLBACK(src, PROC_REF(autocleanup)), 10 SECONDS, TIMER_STOPPABLE)
|
||||
..()
|
||||
|
||||
/mob/living/automatedannouncer/Destroy()
|
||||
@@ -463,7 +463,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
tcm.zlevels = list(position.z)
|
||||
if(!instant)
|
||||
// Simulate two seconds of lag
|
||||
addtimer(CALLBACK(src, .proc/broadcast_callback, tcm), 2 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(broadcast_callback), tcm), 2 SECONDS)
|
||||
else
|
||||
// Nukeops + Deathsquad headsets are instant and should work the same, whether there is comms or not, on all z levels
|
||||
for(var/z in 1 to world.maxz)
|
||||
@@ -591,7 +591,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
/obj/item/radio/emp_act(severity)
|
||||
on = FALSE
|
||||
disable_timer++
|
||||
addtimer(CALLBACK(src, .proc/enable_radio), rand(100, 200))
|
||||
addtimer(CALLBACK(src, PROC_REF(enable_radio)), rand(100, 200))
|
||||
|
||||
if(listening)
|
||||
visible_message("<span class='warning'>[src] buzzes violently!</span>")
|
||||
|
||||
@@ -692,15 +692,15 @@ REAGENT SCANNER
|
||||
ready = FALSE
|
||||
printing = TRUE
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, /obj/item/bodyanalyzer/.proc/setReady), scan_cd)
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/bodyanalyzer, setReady)), scan_cd)
|
||||
addtimer(VARSET_CALLBACK(src, printing, FALSE), 1.4 SECONDS)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon, UPDATE_OVERLAYS), 1.5 SECONDS)
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon), UPDATE_OVERLAYS), 1.5 SECONDS)
|
||||
else if(iscorgi(M) && M.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>You wonder if [M.p_they()] was a good dog. <b>[src] tells you they were the best...</b></span>") // :'(
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
ready = FALSE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
addtimer(CALLBACK(src, /obj/item/bodyanalyzer/.proc/setReady), scan_cd)
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/bodyanalyzer, setReady)), scan_cd)
|
||||
time_to_use = world.time + scan_cd
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Scanning error detected. Invalid specimen.</span>")
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
/obj/item/flag/chameleon/burn()
|
||||
if(boobytrap)
|
||||
fire_act()
|
||||
addtimer(CALLBACK(src, .proc/prime_boobytrap), boobytrap.det_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(prime_boobytrap)), boobytrap.det_time)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
. = ..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
GLOB.poi_list |= src
|
||||
RegisterSignal(src, COMSIG_MOVABLE_POST_THROW, .proc/move_gracefully)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_POST_THROW, PROC_REF(move_gracefully))
|
||||
update_icon()
|
||||
|
||||
/obj/item/his_grace/Destroy()
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/item/his_grace/attack_self(mob/living/user)
|
||||
if(!awakened)
|
||||
INVOKE_ASYNC(src, .proc/awaken, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(awaken), user)
|
||||
|
||||
/obj/item/his_grace/attack(mob/living/M, mob/user)
|
||||
if(awakened && M.stat)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
core = new_core
|
||||
icon_state = "core_container_loaded"
|
||||
to_chat(user, "<span class='warning'>Container is sealing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/seal), 10 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(seal)), 10 SECONDS)
|
||||
|
||||
/obj/item/nuke_core_container/proc/unload(mob/user)
|
||||
core.add_fingerprint(user)
|
||||
@@ -236,7 +236,7 @@
|
||||
I.item_state = "supermatter_tongs"
|
||||
icon_state = "supermatter_container_loaded"
|
||||
to_chat(user, "<span class='warning'>Container is sealing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/seal), 10 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(seal)), 10 SECONDS)
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/seal()
|
||||
if(!QDELETED(sliver))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
if(delay)
|
||||
// Create a callback with checks that would be called every tick by do_after.
|
||||
var/datum/callback/tool_check = CALLBACK(src, .proc/tool_check_callback, user, target, amount, extra_checks)
|
||||
var/datum/callback/tool_check = CALLBACK(src, PROC_REF(tool_check_callback), user, target, amount, extra_checks)
|
||||
|
||||
if(ismob(target))
|
||||
if(!do_mob(user, target, delay, extra_checks = list(tool_check)))
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
|
||||
/obj/effect/decal/cleanable/ash/snappop_phoenix/Initialize(mapload)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/respawn), respawn_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(respawn)), respawn_time)
|
||||
|
||||
/obj/effect/decal/cleanable/ash/snappop_phoenix/proc/respawn()
|
||||
new /obj/item/toy/snappop/phoenix(get_turf(src))
|
||||
@@ -642,7 +642,7 @@
|
||||
if(scream_cooldown)
|
||||
return
|
||||
scream_cooldown = TRUE //water_act executes the scream_cooldown var, setting it on cooldown.
|
||||
addtimer(CALLBACK(src, .proc/reset_screamdown), 30 SECONDS) //After 30 seconds the reset_coolodown() proc will execute, resetting the cooldown. Hug interaction is unnaffected by this.
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_screamdown)), 30 SECONDS) //After 30 seconds the reset_coolodown() proc will execute, resetting the cooldown. Hug interaction is unnaffected by this.
|
||||
playsound(src, 'sound/goonstation/voice/male_scream.ogg', 10, FALSE)//If the plushie gets wet it screams and "AAAAAH!" appears in chat.
|
||||
visible_message("<span class='danger'>AAAAAAH!</span>")
|
||||
if(singed)
|
||||
@@ -663,7 +663,7 @@
|
||||
if(hug_cooldown)
|
||||
return
|
||||
hug_cooldown = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reset_hugdown), 5 SECONDS) //Hug interactions only put the plushie on a 5 second cooldown.
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_hugdown)), 5 SECONDS) //Hug interactions only put the plushie on a 5 second cooldown.
|
||||
if(singed)//If the plushie is water damaged it'll say Ow instead of talking in wingdings.
|
||||
visible_message("<span class='danger'>Ow...</span>")
|
||||
else//If the plushie has not touched water they'll say Greetings in wingdings.
|
||||
@@ -788,7 +788,7 @@
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
playsound(src, 'sound/effects/pope_entry.ogg', 100)
|
||||
animate_rumble(src)
|
||||
addtimer(CALLBACK(src, .proc/stopRumble), 60 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(stopRumble)), 60 SECONDS)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already active!</span>")
|
||||
|
||||
@@ -1406,12 +1406,12 @@
|
||||
/obj/item/toy/figure/xeno/activate(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] pulls back the string on [src].</span>")
|
||||
icon_state = "[initial(icon_state)]_used"
|
||||
addtimer(CALLBACK(src, .proc/hiss), 0.5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(hiss)), 0.5 SECONDS)
|
||||
|
||||
/obj/item/toy/figure/xeno/proc/hiss()
|
||||
atom_say("Hiss!")
|
||||
playsound(src, get_sfx("hiss"), 50, TRUE)
|
||||
addtimer(CALLBACK(src, .proc/reset_icon), 4.5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_icon)), 4.5 SECONDS)
|
||||
|
||||
/obj/item/toy/figure/xeno/proc/reset_icon()
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
"Change Airlock Type" = image(icon = 'icons/obj/interface.dmi', icon_state = "airlocktype")
|
||||
)
|
||||
choices -= mode // Get rid of the current mode, clicking it won't do anything.
|
||||
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user))
|
||||
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, PROC_REF(check_menu), user))
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(choice)
|
||||
@@ -627,7 +627,7 @@
|
||||
/obj/item/rcd/proc/detonate_pulse()
|
||||
audible_message("<span class='danger'><b>[src] begins to vibrate and buzz loudly!</b></span>", "<span class='danger'><b>[src] begins vibrating violently!</b></span>")
|
||||
// 5 seconds to get rid of it
|
||||
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
|
||||
addtimer(CALLBACK(src, PROC_REF(detonate_pulse_explode)), 50)
|
||||
|
||||
/**
|
||||
* Called in `/obj/item/rcd/proc/detonate_pulse()` via callback.
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='userdanger'>[src] flares briefly.</span>")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/effect, user, .), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(effect), user, .), 1 SECONDS)
|
||||
|
||||
/obj/item/dice/d20/fate/equipped(mob/user, slot)
|
||||
if(!ishuman(user) || !user.mind || (user.mind in SSticker.mode.wizards))
|
||||
@@ -358,7 +358,7 @@
|
||||
else
|
||||
triggered = TRUE
|
||||
visible_message("<span class='notice'>You hear a quiet click.</span>")
|
||||
addtimer(CALLBACK(src, .proc/boom, user, result), 4 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(boom), user, result), 4 SECONDS)
|
||||
|
||||
/obj/item/dice/d20/e20/proc/boom(mob/user, result)
|
||||
var/capped = TRUE
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
AddComponent(/datum/component/persistent_overlay, image_overlay, target)
|
||||
if(!nadeassembly)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(prime)), det_time SECONDS)
|
||||
|
||||
/obj/item/grenade/plastic/suicide_act(mob/user)
|
||||
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) suicided with [src.name] at ([user.x],[user.y],[user.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",0,1)
|
||||
@@ -227,12 +227,12 @@
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
for(var/turf/simulated/wall/W in range(1, location))
|
||||
W.thermitemelt(speed = 30)
|
||||
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
|
||||
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
|
||||
addtimer(CALLBACK(null, GLOBAL_PROC_REF(explosion), T, 0, 0, 2), 3)
|
||||
addtimer(CALLBACK(smoke, TYPE_PROC_REF(/datum/effect_system/smoke_spread, start)), 3)
|
||||
else
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
|
||||
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
|
||||
addtimer(CALLBACK(null, GLOBAL_PROC_REF(explosion), T, 0, 0, 2), 3)
|
||||
addtimer(CALLBACK(smoke, TYPE_PROC_REF(/datum/effect_system/smoke_spread, start)), 3)
|
||||
|
||||
if(isliving(target))
|
||||
var/mob/living/M = target
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)] and last touched by [key_name_admin(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(prime)), det_time)
|
||||
var/turf/DT = get_turf(src)
|
||||
var/area/DA = get_area(DT)
|
||||
log_game("A grenade detonated at [DA.name] ([DT.x], [DT.y], [DT.z])")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(prime)), det_time)
|
||||
|
||||
/obj/item/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
variant_names[initial(rod.name)] = rod
|
||||
variant_icons += list(initial(rod.name) = image(icon = initial(rod.icon), icon_state = initial(rod.icon_state)))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/choice = show_radial_menu(H, src, variant_icons, null, 40, CALLBACK(src, .proc/radial_check, H), TRUE)
|
||||
var/choice = show_radial_menu(H, src, variant_icons, null, 40, CALLBACK(src, PROC_REF(radial_check), H), TRUE)
|
||||
if(!choice || !radial_check(H))
|
||||
return
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
CRASH("User was given an bio-chip for an unintentional emote that they can't use.")
|
||||
|
||||
LAZYADD(trigger_emotes, emote_key)
|
||||
RegisterSignal(user, COMSIG_MOB_EMOTED(emote_key), .proc/on_emote)
|
||||
RegisterSignal(user, COMSIG_MOB_EMOTED(emote_key), PROC_REF(on_emote))
|
||||
|
||||
/obj/item/implant/proc/on_emote(mob/living/user, datum/emote/fired_emote, key, emote_type, message, intentional)
|
||||
SIGNAL_HANDLER
|
||||
@@ -190,7 +190,7 @@
|
||||
var/datum/action/A = X
|
||||
A.Grant(source)
|
||||
if(trigger_causes & (BIOCHIP_TRIGGER_DEATH_ONCE | BIOCHIP_TRIGGER_DEATH_ANY))
|
||||
RegisterSignal(source, COMSIG_MOB_DEATH, .proc/on_death)
|
||||
RegisterSignal(source, COMSIG_MOB_DEATH, PROC_REF(on_death))
|
||||
if(ishuman(source))
|
||||
var/mob/living/carbon/human/H = source
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/implant/emp/activate()
|
||||
uses--
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/empulse, get_turf(imp_in), 3, 5, 1)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(empulse), get_turf(imp_in), 3, 5, 1)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/New()
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/dissipate), 100)
|
||||
addtimer(CALLBACK(src, PROC_REF(dissipate)), 100)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/proc/dissipate()
|
||||
if(!ismob(loc))
|
||||
@@ -174,12 +174,12 @@
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/Initialize(mapload)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_CARBON_TOGGLE_THROW, .proc/spin_up_wrapper)
|
||||
RegisterSignal(src, COMSIG_CARBON_TOGGLE_THROW, PROC_REF(spin_up_wrapper))
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/proc/spin_up_wrapper(datum/source, throw_mode_state) // so that signal handler works
|
||||
SIGNAL_HANDLER
|
||||
if(throw_mode_state) // if we actually turned throw mode on
|
||||
INVOKE_ASYNC(src, .proc/spin_up)
|
||||
INVOKE_ASYNC(src, PROC_REF(spin_up))
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/proc/spin_up()
|
||||
if(spinning)
|
||||
@@ -187,13 +187,13 @@
|
||||
var/mob/living/L = loc // can only be called if the mob is holding the bola.
|
||||
var/range_increment = round(max_range / max_spins)
|
||||
var/speed_increment = round(max_speed / max_spins)
|
||||
RegisterSignal(L, COMSIG_CARBON_SWAP_HANDS, .proc/reset_values, override = TRUE)
|
||||
RegisterSignal(L, COMSIG_CARBON_SWAP_HANDS, PROC_REF(reset_values), override = TRUE)
|
||||
item_state = "[initial(item_state)]_spin"
|
||||
L.update_inv_r_hand()
|
||||
L.update_inv_l_hand()
|
||||
spinning = TRUE
|
||||
for(var/i in 1 to max_spins)
|
||||
if(!do_mob(L, L, 1 SECONDS, only_use_extra_checks = TRUE, extra_checks = list(CALLBACK(src, .proc/can_spin_check, L))))
|
||||
if(!do_mob(L, L, 1 SECONDS, only_use_extra_checks = TRUE, extra_checks = list(CALLBACK(src, PROC_REF(can_spin_check), L))))
|
||||
reset_values(L)
|
||||
break
|
||||
throw_range += range_increment
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
if(!target.electrocute_act(voltage, flags = SHOCK_TESLA)) // if it fails to shock someone, break the chain
|
||||
return
|
||||
protected_mobs += target
|
||||
addtimer(CALLBACK(src, .proc/arc, target, voltage, protected_mobs), 2.5 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(arc), target, voltage, protected_mobs), 2.5 SECONDS)
|
||||
|
||||
/datum/enchantment/lightning/proc/arc(mob/living/source, voltage, protected_mobs)
|
||||
voltage = voltage - 4
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
/datum/enchantment/fire/on_gain(obj/item/melee/spellblade/S, mob/living/user)
|
||||
..()
|
||||
RegisterSignal(S, list(COMSIG_ITEM_PICKUP, COMSIG_ITEM_DROPPED), .proc/toggle_traits)
|
||||
RegisterSignal(S, list(COMSIG_ITEM_PICKUP, COMSIG_ITEM_DROPPED), PROC_REF(toggle_traits))
|
||||
if(user)
|
||||
toggle_traits(S, user)
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
RPD_MENU_DELETE = image(icon = 'icons/obj/interface.dmi', icon_state = "rpd_delete"),
|
||||
"UI" = image(icon = 'icons/obj/interface.dmi', icon_state = "ui_interact")
|
||||
)
|
||||
var/selected_mode = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user))
|
||||
var/selected_mode = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, PROC_REF(check_menu), user))
|
||||
if(!check_menu(user))
|
||||
return
|
||||
if(selected_mode == "UI")
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
var/image/bible_image = image('icons/obj/storage.dmi', icon_state = icons["state"])
|
||||
skins[I] = bible_image
|
||||
|
||||
var/choice = show_radial_menu(user, src, skins, null, 40, CALLBACK(src, .proc/radial_check, user), TRUE)
|
||||
var/choice = show_radial_menu(user, src, skins, null, 40, CALLBACK(src, PROC_REF(radial_check), user), TRUE)
|
||||
if(!choice || !radial_check(user))
|
||||
return
|
||||
var/choice_icons = bible_variants[choice]
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
H.adjustStaminaLoss(stam_damage)
|
||||
|
||||
ADD_TRAIT(L, TRAIT_WAS_BATONNED, user_UID) // so one person cannot hit the same person with two separate batons
|
||||
addtimer(CALLBACK(src, .proc/baton_knockdown, L, user_UID, knockdown_duration), knockdown_delay)
|
||||
addtimer(CALLBACK(src, PROC_REF(baton_knockdown), L, user_UID, knockdown_duration), knockdown_delay)
|
||||
|
||||
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK, 33)
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
user.take_organ_damage(20, 25)
|
||||
return
|
||||
if((wielded) && prob(50))
|
||||
INVOKE_ASYNC(src, .proc/jedi_spin, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(jedi_spin), user)
|
||||
|
||||
/obj/item/twohanded/dualsaber/proc/jedi_spin(mob/living/user)
|
||||
for(var/i in list(NORTH, SOUTH, EAST, WEST, EAST, SOUTH, NORTH, SOUTH, EAST, WEST, EAST, SOUTH))
|
||||
@@ -931,7 +931,7 @@
|
||||
user.put_in_hands(W)
|
||||
on_cooldown = TRUE
|
||||
flags |= NODROP
|
||||
addtimer(CALLBACK(src, .proc/reboot), 2 MINUTES)
|
||||
addtimer(CALLBACK(src, PROC_REF(reboot)), 2 MINUTES)
|
||||
do_sparks(rand(1,6), 1, loc)
|
||||
|
||||
/obj/item/clothing/gloves/color/black/pyro_claws/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
@@ -230,7 +230,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
if(QDELETED(src))
|
||||
return FALSE
|
||||
being_shocked = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_shocked)), 1 SECONDS)
|
||||
return power / 2
|
||||
|
||||
/obj/proc/reset_shocked()
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
src.machine = O
|
||||
if(istype(O))
|
||||
O.in_use = TRUE
|
||||
RegisterSignal(O, COMSIG_PARENT_QDELETING, .proc/unset_machine)
|
||||
RegisterSignal(O, COMSIG_PARENT_QDELETING, PROC_REF(unset_machine))
|
||||
|
||||
/obj/item/proc/updateSelfDialog()
|
||||
var/mob/M = src.loc
|
||||
|
||||
@@ -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