From 284e87e08d43fa4c4ca501ae55f9cf6dff04301b Mon Sep 17 00:00:00 2001 From: Farie82 Date: Thu, 30 Dec 2021 19:16:55 +0100 Subject: [PATCH] Fixes the teleport spell not saying where the wizard is going (#17284) --- code/datums/spell.dm | 4 ++-- code/datums/spells/area_teleport.dm | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 88d26db75b7..f7ee0084286 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -202,7 +202,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) if(action) action.UpdateButtonIcon() -/obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount +/obj/effect/proc_holder/spell/proc/invocation(mob/user) //spelling the spell out and setting it on recharge/reducing charges amount switch(invocation_type) if("shout") if(!user.IsVocal()) @@ -343,7 +343,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) /obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = TRUE, mob/user = usr) //if recharge is started is important for the trigger spells SHOULD_NOT_OVERRIDE(TRUE) before_cast(targets, user) - invocation() + invocation(user) if(user && user.ckey) if(create_custom_logs) write_custom_logs(targets, user) diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm index 4f84629fcec..2bb6cb5b68c 100644 --- a/code/datums/spells/area_teleport.dm +++ b/code/datums/spells/area_teleport.dm @@ -76,18 +76,17 @@ return -/obj/effect/proc_holder/spell/area_teleport/invocation(area/chosenarea = null) - if(!invocation_area || !chosenarea) +/obj/effect/proc_holder/spell/area_teleport/invocation(mob/user) + if(!invocation_area || !selected_area) ..() else switch(invocation_type) if("shout") - usr.say("[invocation] [uppertext(chosenarea.name)]") - if(usr.gender==MALE) - playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1) + user.say("[invocation] [uppertext(selected_area.name)]") + if(user.gender==MALE) + playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1) else - playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1) + playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1) if("whisper") - usr.whisper("[invocation] [uppertext(chosenarea.name)]") + user.whisper("[invocation] [uppertext(selected_area.name)]") - return