Adds noteleport variable

This is mostly a pre-setup for my greater-bag-of-holding stuff.

You can't use bluespace crystals/jaunters/hand teleporters to access bluespace-proofed areas. at the moment, this only applies to shuttles and centcomm.

Teleport beacons placed in bluespace proofed rooms can't be teleported to, except via teleporter station hub.

A little concerned because now 'hijack' antags cant use teleprods to fling everyone out of the shuttle while in transit. q_q could easily just make the shuttle non-bluespace proof though.

Note for mappers: This means you can create ruins that can't be teleported into using bspace crystals by setting the area "noteleport" to 1. This can be used to force players to travel through the ruin the way they're intended to. Or to prevent them from gaining access to areas they shouldnt normally be able to. (ie. the wishgranter ruin)
This commit is contained in:
nullbear
2016-06-09 20:33:25 +12:00
committed by oranges
parent 0a3df55930
commit 98ee507de8
7 changed files with 47 additions and 17 deletions
+4
View File
@@ -22,6 +22,10 @@
src.loc = loc
src.target = target
src.creator = creator
var/area/A = target.loc
if(A.noteleport) // No point in persisting if the target is unreachable.
qdel(src)
return
for(var/mob/M in src.loc)
src.teleport(M)
if(lifespan > 0)
@@ -138,12 +138,16 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||current_location.z==2||current_location.z>=7 || !istype(user.loc, /turf))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
var/area/current_area = current_location.loc
if(!current_location||current_area.noteleport||current_location.z>=7 || !istype(user.loc, /turf))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in machines)
if(com.target)
var/area/A = get_area(com.target)
if(A.noteleport)
continue
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[get_area(com.target)] (Active)"] = com.target
else
@@ -154,6 +158,9 @@ Frequency:
continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8)
continue
var/area/A = T.loc
if(A.noteleport)
continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
@@ -163,7 +170,11 @@ Frequency:
if(active_portals >= 3)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/T = L[t1]
var/atom/T = L[t1]
var/area/A = get_area(T)
if(A.noteleport)
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
user.show_message("<span class='notice'>Locked In.</span>", 2)
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(src), T, src)
try_move_adjacent(P)
+6 -3
View File
@@ -10,9 +10,12 @@
if(status && user.disabilities & CLUMSY && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
user.Weaken(stunforce*3)
deductcharge(hitcost)
do_teleport(user, get_turf(user), 50)//honk honk
if(do_teleport(user, get_turf(user), 50))//honk honk
user.Weaken(stunforce*3)
deductcharge(hitcost)
else
user.Weaken(stunforce*3)
deductcharge(hitcost/4)
return
else
if(status)