From 89c64edddb59fd15275d4bf5239e1ec182a4a4d4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 2 Oct 2020 19:09:26 +0200 Subject: [PATCH] [MIRROR] Fix warp whistle permanently immobilising its user. (#1120) * Merge pull request #54126 from Timberpoes/warp-whistle-fix Fix warp whistle permanently immobilising its user. * Fix warp whistle permanently immobilising its user. Co-authored-by: nemvar <47324920+nemvar@users.noreply.github.com> --- code/__DEFINES/traits.dm | 2 ++ code/modules/antagonists/wizard/equipment/artefact.dm | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 8ef16dbe482..bba30c2cb72 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -339,3 +339,5 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define LACKING_LOCOMOTION_APPENDAGES_TRAIT "lacking-locomotion-appengades" //trait associated to not having locomotion appendages nor the ability to fly or float #define LACKING_MANIPULATION_APPENDAGES_TRAIT "lacking-manipulation-appengades" //trait associated to not having fine manipulation appendages such as hands #define HANDCUFFED_TRAIT "handcuffed" +/// Trait granted by [/obj/item/warpwhistle] +#define WARPWHISTLE_TRAIT "warpwhistle" diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 7afcf80b6c8..84a892b2f88 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -402,7 +402,6 @@ heal_oxy = 25 //Warp Whistle: Provides uncontrolled long distance teleportation. - /obj/item/warpwhistle name = "warp whistle" desc = "One toot on this whistle will send you to a far away land!" @@ -420,6 +419,7 @@ /obj/item/warpwhistle/proc/end_effect(mob/living/carbon/user) user.invisibility = initial(user.invisibility) user.status_flags &= ~GODMODE + REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, WARPWHISTLE_TRAIT) user.update_mobility() /obj/item/warpwhistle/attack_self(mob/living/carbon/user) @@ -429,10 +429,11 @@ last_user = user var/turf/T = get_turf(user) playsound(T,'sound/magic/warpwhistle.ogg', 200, TRUE) - user.mobility_flags &= ~MOBILITY_MOVE + ADD_TRAIT(user, TRAIT_IMMOBILIZED, WARPWHISTLE_TRAIT) new /obj/effect/temp_visual/tornado(T) sleep(20) if(interrupted(user)) + REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, WARPWHISTLE_TRAIT) return user.invisibility = INVISIBILITY_MAXIMUM user.status_flags |= GODMODE @@ -445,7 +446,6 @@ var/turf/potential_T = find_safe_turf() if(T.z != potential_T.z || abs(get_dist_euclidian(potential_T,T)) > 50 - breakout) do_teleport(user, potential_T, channel = TELEPORT_CHANNEL_MAGIC) - user.mobility_flags &= ~MOBILITY_MOVE T = potential_T break breakout += 1