From f00232d5d6216bfd83a06b91e956cf2b2e27c45a Mon Sep 17 00:00:00 2001 From: Henri215 <77684085+Henri215@users.noreply.github.com> Date: Fri, 21 Oct 2022 15:21:45 -0300 Subject: [PATCH] Fixes #19331 Teleportation spell no longer grants free smoke when cancelled (#19384) * no more smoke/shouting when not selecting a tp location * Apply suggestions from code review Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * redundant else * resolving conflict * removed silence Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --- code/datums/spells/area_teleport.dm | 19 ++++++++----------- code/datums/spells/wizard.dm | 2 -- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm index a18eb199077..80ad56996f8 100644 --- a/code/datums/spells/area_teleport.dm +++ b/code/datums/spells/area_teleport.dm @@ -19,6 +19,7 @@ A = pick(SSmapping.teleportlocs) if(!A) + smoke_type = SMOKE_NONE return var/area/thearea = SSmapping.teleportlocs[A] @@ -34,6 +35,7 @@ revert_cast(user) return + smoke_type = SMOKE_HARMLESS playsound(get_turf(user), sound1, 50,1) for(var/mob/living/target in targets) var/list/L = list() @@ -78,15 +80,10 @@ /obj/effect/proc_holder/spell/area_teleport/invocation(mob/user) if(!invocation_area || !selected_area) - ..() - else - switch(invocation_type) - if("shout") - 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(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1) - if("whisper") - user.whisper("[invocation] [uppertext(selected_area.name)]") + return + switch(invocation_type) + if("shout") + user.say("[invocation] [uppertext(selected_area.name)]") + if("whisper") + user.whisper("[invocation] [uppertext(selected_area.name)]") diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index f3f28d75176..67bd98d9821 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -181,9 +181,7 @@ invocation_type = "shout" cooldown_min = 200 //100 deciseconds reduction per rank - smoke_type = SMOKE_HARMLESS smoke_amt = 5 - action_icon_state = "spell_teleport" sound1 = 'sound/magic/teleport_diss.ogg'