Merge pull request #5378 from Anewbe/camera_thieves_reeeeeeeeeeee

Apportation checks range again
This commit is contained in:
Atermonera
2018-06-30 18:47:28 -04:00
committed by VirgoBot
parent 8e870dc58a
commit 9d0d0528ad
3 changed files with 43 additions and 5 deletions
@@ -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
@@ -21,11 +21,13 @@
if(!AM.loc) //Don't teleport HUD telements to us.
return
if(AM.anchored)
user << "<span class='warning'>\The [hit_atom] is firmly secured and anchored, you can't move it!</span>"
to_chat(user, "<span class='warning'>\The [hit_atom] is firmly secured and anchored, you can't move it!</span>")
return
if(!within_range(hit_atom) && !check_for_scepter())
user << "<span class='warning'>\The [hit_atom] is too far away.</span>"
to_chat(user, "<span class='warning'>\The [hit_atom] is too far away.</span>")
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 << "<span class='danger'>You are teleported towards \the [user].</span>"
to_chat(L, "<span class='danger'>You are teleported towards \the [user].</span>")
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 << "<span class='warning'>\The [L] is out of your reach.</span>"
to_chat(user, "<span class='warning'>\The [L] is out of your reach.</span>")
qdel(src)
return
+36
View File
@@ -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."