Limits Telegun to Current Z-Level (Unless a Beacon is Emagged) (#20097)

* Update telegun.dm

* i am bad at logic I got a 72% in the class

* im bad two electric boogaloo

* Caps Moment

* Update telegun.dm

* I cant code, this finally worked

* TC update

* Update special.dm

* it works, yipee

* Sirryan review

* safety is good

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
matttheficus
2023-01-19 15:10:13 -05:00
committed by GitHub
co-authored by S34N
parent c4bab6ff13
commit 9d199a8f64
3 changed files with 9 additions and 7 deletions
@@ -2,7 +2,7 @@
/obj/item/gun/energy/telegun
name = "teleporter gun"
desc = "An extremely high-tech bluespace energy gun capable of teleporting targets to far off locations."
desc = "An extremely high-tech bluespace energy gun capable of teleporting targets to Bluespace Beacons."
icon_state = "telegun"
item_state = "ionrifle"
origin_tech = "combat=6;materials=7;powerstorage=5;bluespace=5;syndicate=4"
@@ -20,11 +20,12 @@
for(var/obj/item/radio/beacon/R in GLOB.beacons)
var/turf/T = get_turf(R)
var/turf/M = get_turf(user)
if(!T)
continue
if(!is_teleport_allowed(T.z))
continue
if(R.syndicate)
if(T.z != M.z && !R.emagged)
continue
var/tmpname = T.loc.name
if(areaindex[tmpname])