procs
This commit is contained in:
@@ -549,7 +549,7 @@
|
||||
electrocution_skeleton_anim = mutable_appearance(icon, "electrocuted_base")
|
||||
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR|KEEP_APART
|
||||
add_overlay(electrocution_skeleton_anim)
|
||||
addtimer(CALLBACK(src, .proc/end_electrocution_animation, electrocution_skeleton_anim), anim_duration)
|
||||
addtimer(CALLBACK(src, PROC_REF(end_electrocution_animation), electrocution_skeleton_anim), anim_duration)
|
||||
|
||||
else //or just do a generic animation
|
||||
flick_overlay_view(image(icon,src,"electrocuted_generic",ABOVE_MOB_LAYER), src, anim_duration)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if(currently_coiling)
|
||||
to_chat(owner, span_warning("You are already coiling someone!"))
|
||||
return
|
||||
|
||||
|
||||
// begin the coiling action
|
||||
H.visible_message("<span class='warning'>[owner] coils [H] with their tail!</span>", \
|
||||
"<span class='userdanger'>[owner] coils you with their tail!</span>")
|
||||
@@ -46,12 +46,12 @@
|
||||
H.forceMove(get_turf(owner))
|
||||
|
||||
// cancel the coiling action if certain things are done
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, .proc/cancel_coil)
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESTING, .proc/cancel_coil)
|
||||
RegisterSignal(owner, COMSIG_LIVING_STOPPED_PULLING, .proc/cancel_coil)
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(cancel_coil))
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESTING, PROC_REF(cancel_coil))
|
||||
RegisterSignal(owner, COMSIG_LIVING_STOPPED_PULLING, PROC_REF(cancel_coil))
|
||||
|
||||
// update the coil offset, update again if owner changes direction
|
||||
RegisterSignal(owner, COMSIG_ATOM_DIR_CHANGE, .proc/update_coil_offset)
|
||||
RegisterSignal(owner, COMSIG_ATOM_DIR_CHANGE, PROC_REF(update_coil_offset))
|
||||
update_coil_offset(null, null, owner.dir)
|
||||
|
||||
// set our overlay to new image
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/datum/action/innate/ability/coiling/proc/cancel_coil()
|
||||
var/mob/living/carbon/human/H = owner
|
||||
|
||||
|
||||
if(!currently_coiling)
|
||||
return
|
||||
|
||||
|
||||
@@ -1621,7 +1621,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(radiation > RAD_MOB_HAIRLOSS)
|
||||
if(prob(15) && !(H.hair_style == "Bald") && (HAIR in species_traits))
|
||||
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...</span>")
|
||||
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
|
||||
addtimer(CALLBACK(src, PROC_REF(go_bald), H), 50)
|
||||
|
||||
/datum/species/proc/go_bald(mob/living/carbon/human/H)
|
||||
if(QDELETED(H)) //may be called from a timer
|
||||
@@ -2614,7 +2614,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
buckled_obj.unbuckle_mob(H)
|
||||
step(buckled_obj, olddir)
|
||||
else
|
||||
new /datum/forced_movement(H, get_ranged_target_turf(H, olddir, 4), 1, FALSE, CALLBACK(H, /mob/living/carbon/.proc/spin, 1, 1))
|
||||
new /datum/forced_movement(H, get_ranged_target_turf(H, olddir, 4), 1, FALSE, CALLBACK(H, TYPE_PROC_REF(/mob/living/carbon, spin), 1, 1))
|
||||
return TRUE
|
||||
|
||||
//UNSAFE PROC, should only be called through the Activate or other sources that check for CanFly
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
(Press ALT+CLICK on the target to start wrapping.)</span>")
|
||||
H.adjust_nutrition(E.spinner_rate * -0.5)
|
||||
addtimer(VARSET_CALLBACK(E, web_ready, TRUE), E.web_cooldown)
|
||||
RegisterSignal(H, list(COMSIG_MOB_ALTCLICKON), .proc/cocoonAtom)
|
||||
RegisterSignal(H, list(COMSIG_MOB_ALTCLICKON), PROC_REF(cocoonAtom))
|
||||
return
|
||||
else
|
||||
to_chat(H, "<span class='warning'>You're too hungry to spin web right now, eat something first!</span>")
|
||||
|
||||
@@ -37,7 +37,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.AddElement(/datum/element/dwarfism, COMSIG_SPECIES_LOSS, src)
|
||||
RegisterSignal(C, COMSIG_MOB_SAY, .proc/handle_speech) //We register handle_speech is being used.
|
||||
RegisterSignal(C, COMSIG_MOB_SAY, PROC_REF(handle_speech)) //We register handle_speech is being used.
|
||||
|
||||
/datum/species/dwarf/on_species_loss(mob/living/carbon/H, datum/species/new_species)
|
||||
. = ..()
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
g1 = GETGREENPART(default_color)
|
||||
b1 = GETBLUEPART(default_color)
|
||||
spec_updatehealth(H)
|
||||
RegisterSignal(C, COMSIG_ATOM_EMAG_ACT, .proc/on_emag_act)
|
||||
RegisterSignal(C, COMSIG_ATOM_EMP_ACT, .proc/on_emp_act)
|
||||
RegisterSignal(C, COMSIG_ATOM_EMAG_ACT, PROC_REF(on_emag_act))
|
||||
RegisterSignal(C, COMSIG_ATOM_EMP_ACT, PROC_REF(on_emp_act))
|
||||
|
||||
/datum/species/ethereal/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
|
||||
.=..()
|
||||
@@ -84,7 +84,7 @@
|
||||
EMPeffect = TRUE
|
||||
spec_updatehealth(H)
|
||||
to_chat(H, "<span class='notice'>You feel the light of your body leave you.</span>")
|
||||
addtimer(CALLBACK(src, .proc/stop_emp, H), (severity/5) SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE) //lights out
|
||||
addtimer(CALLBACK(src, PROC_REF(stop_emp), H), (severity/5) SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE) //lights out
|
||||
|
||||
/datum/species/ethereal/proc/on_emag_act(mob/living/carbon/human/H, mob/user)
|
||||
if(emageffect)
|
||||
@@ -94,7 +94,7 @@
|
||||
to_chat(user, "<span class='notice'>You tap [H] on the back with your card.</span>")
|
||||
H.visible_message("<span class='danger'>[H] starts flickering in an array of colors!</span>")
|
||||
handle_emag(H)
|
||||
addtimer(CALLBACK(src, .proc/stop_emag, H), 30 SECONDS) //Disco mode for 30 seconds! This doesn't affect the ethereal at all besides either annoying some players, or making someone look badass.
|
||||
addtimer(CALLBACK(src, PROC_REF(stop_emag), H), 30 SECONDS) //Disco mode for 30 seconds! This doesn't affect the ethereal at all besides either annoying some players, or making someone look badass.
|
||||
|
||||
|
||||
/datum/species/ethereal/spec_life(mob/living/carbon/human/H)
|
||||
@@ -113,7 +113,7 @@
|
||||
return
|
||||
current_color = pick(ETHEREAL_COLORS)
|
||||
spec_updatehealth(H)
|
||||
addtimer(CALLBACK(src, .proc/handle_emag, H), 5) //Call ourselves every 0.5 seconds to change color
|
||||
addtimer(CALLBACK(src, PROC_REF(handle_emag), H), 5) //Call ourselves every 0.5 seconds to change color
|
||||
|
||||
/datum/species/ethereal/proc/stop_emag(mob/living/carbon/human/H)
|
||||
emageffect = FALSE
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.visible_message("<span class='warning'>[H] starts vibrating!</span>", "<span class='danger'>You start charging your bluespace core...</span>")
|
||||
playsound(get_turf(H), 'sound/weapons/flash.ogg', 25, 1)
|
||||
addtimer(CALLBACK(src, .proc/teleport, H), 15)
|
||||
addtimer(CALLBACK(src, PROC_REF(teleport), H), 15)
|
||||
|
||||
/datum/action/innate/unstable_teleport/proc/teleport(mob/living/carbon/human/H)
|
||||
H.visible_message("<span class='warning'>[H] disappears in a shower of sparks!</span>", "<span class='danger'>You teleport!</span>")
|
||||
@@ -510,7 +510,7 @@
|
||||
..()
|
||||
last_banana = world.time
|
||||
last_honk = world.time
|
||||
RegisterSignal(C, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
RegisterSignal(C, COMSIG_MOB_SAY, PROC_REF(handle_speech))
|
||||
|
||||
/datum/species/golem/bananium/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
@@ -642,7 +642,7 @@
|
||||
/datum/species/golem/clockwork/on_species_gain(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
H.faction |= "ratvar"
|
||||
RegisterSignal(H, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
RegisterSignal(H, COMSIG_MOB_SAY, PROC_REF(handle_speech))
|
||||
|
||||
/datum/species/golem/clockwork/on_species_loss(mob/living/carbon/human/H)
|
||||
if(!is_servant_of_ratvar(H))
|
||||
@@ -756,7 +756,7 @@
|
||||
H.forceMove(src)
|
||||
cloth_golem = H
|
||||
to_chat(cloth_golem, "<span class='notice'>You start gathering your life energy, preparing to rise again...</span>")
|
||||
addtimer(CALLBACK(src, .proc/revive), revive_time)
|
||||
addtimer(CALLBACK(src, PROC_REF(revive)), revive_time)
|
||||
else
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -1010,7 +1010,7 @@
|
||||
badtime.appearance_flags = RESET_COLOR
|
||||
H.overlays_standing[FIRE_LAYER+0.5] = badtime
|
||||
H.apply_overlay(FIRE_LAYER+0.5)
|
||||
addtimer(CALLBACK(H, /mob/living/carbon/.proc/remove_overlay, FIRE_LAYER+0.5), 25)
|
||||
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob/living/carbon, remove_overlay), FIRE_LAYER+0.5), 25)
|
||||
else
|
||||
playsound(get_turf(owner),'sound/magic/RATTLEMEBONES.ogg', 100)
|
||||
for(var/mob/living/L in orange(7, get_turf(owner)))
|
||||
|
||||
@@ -642,8 +642,8 @@
|
||||
linked_mobs.Add(M)
|
||||
if(!selflink)
|
||||
to_chat(M, "<span class='notice'>You are now connected to [slimelink_owner.real_name]'s Slime Link.</span>")
|
||||
RegisterSignal(M, COMSIG_MOB_DEATH , .proc/unlink_mob)
|
||||
RegisterSignal(M, COMSIG_PARENT_QDELETING, .proc/unlink_mob)
|
||||
RegisterSignal(M, COMSIG_MOB_DEATH , PROC_REF(unlink_mob))
|
||||
RegisterSignal(M, COMSIG_PARENT_QDELETING, PROC_REF(unlink_mob))
|
||||
var/datum/action/innate/linked_speech/action = new(src)
|
||||
linked_actions.Add(action)
|
||||
action.Grant(M)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
H.faction |= "mushroom"
|
||||
mush = new()
|
||||
mush.teach(H, TRUE)
|
||||
RegisterSignal(C, COMSIG_MOB_ON_NEW_MIND, .proc/on_new_mind)
|
||||
RegisterSignal(C, COMSIG_MOB_ON_NEW_MIND, PROC_REF(on_new_mind))
|
||||
|
||||
/datum/species/mush/proc/on_new_mind(mob/owner)
|
||||
mush.teach(owner, TRUE) //make_temporary TRUE as it shouldn't carry over to other mobs on mind transfer_to.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/datum/species/synth/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
|
||||
..()
|
||||
assume_disguise(old_species, H)
|
||||
RegisterSignal(H, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
RegisterSignal(H, COMSIG_MOB_SAY, PROC_REF(handle_speech))
|
||||
|
||||
/datum/species/synth/on_species_loss(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user