From 9d0d0528ad37fa006c8bd791e0ee294e84393c49 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Sat, 30 Jun 2018 15:46:18 -0700 Subject: [PATCH] Merge pull request #5378 from Anewbe/camera_thieves_reeeeeeeeeeee Apportation checks range again --- .../technomancer/spell_objs_helpers.dm | 2 +- .../technomancer/spells/apportation.dm | 10 +++--- html/changelogs/Anewbe - Apportation.yml | 36 +++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 html/changelogs/Anewbe - Apportation.yml diff --git a/code/game/gamemodes/technomancer/spell_objs_helpers.dm b/code/game/gamemodes/technomancer/spell_objs_helpers.dm index f11c027566a..105b3b3e9c8 100644 --- a/code/game/gamemodes/technomancer/spell_objs_helpers.dm +++ b/code/game/gamemodes/technomancer/spell_objs_helpers.dm @@ -31,7 +31,7 @@ return TRUE /obj/item/weapon/spell/proc/within_range(var/atom/target, var/max_range = 7) // Beyond 7 is off the screen. - if(range(get_dist(owner, target) <= max_range)) + if(target in view(max_range, owner)) return TRUE return FALSE diff --git a/code/game/gamemodes/technomancer/spells/apportation.dm b/code/game/gamemodes/technomancer/spells/apportation.dm index 9fafc47ae38..452ddc52fa6 100644 --- a/code/game/gamemodes/technomancer/spells/apportation.dm +++ b/code/game/gamemodes/technomancer/spells/apportation.dm @@ -21,11 +21,13 @@ if(!AM.loc) //Don't teleport HUD telements to us. return if(AM.anchored) - user << "\The [hit_atom] is firmly secured and anchored, you can't move it!" + to_chat(user, "\The [hit_atom] is firmly secured and anchored, you can't move it!") return + if(!within_range(hit_atom) && !check_for_scepter()) - user << "\The [hit_atom] is too far away." + to_chat(user, "\The [hit_atom] is too far away.") return + //Teleporting an item. if(istype(hit_atom, /obj/item)) var/obj/item/I = hit_atom @@ -47,7 +49,7 @@ //Now let's try to teleport a living mob. else if(istype(hit_atom, /mob/living)) var/mob/living/L = hit_atom - L << "You are teleported towards \the [user]." + to_chat(L, "You are teleported towards \the [user].") var/datum/effect/effect/system/spark_spread/s1 = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s2 = new /datum/effect/effect/system/spark_spread s1.set_up(2, 1, user) @@ -60,7 +62,7 @@ spawn(1 SECOND) if(!user.Adjacent(L)) - user << "\The [L] is out of your reach." + to_chat(user, "\The [L] is out of your reach.") qdel(src) return diff --git a/html/changelogs/Anewbe - Apportation.yml b/html/changelogs/Anewbe - Apportation.yml new file mode 100644 index 00000000000..85607a09322 --- /dev/null +++ b/html/changelogs/Anewbe - Apportation.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Anewbe + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Technomancer Apportation now properly checks for range and scepter, again."