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
+8 -1
View File
@@ -103,7 +103,10 @@
if(!center)
center = destination
for(var/turf/T in range(precision,center))
posturfs.Add(T)
var/area/A = T.loc
if(!A.noteleport)
posturfs.Add(T)
destturf = safepick(posturfs)
else
destturf = get_turf(destination)
@@ -111,6 +114,10 @@
if(!destturf || !curturf)
return 0
var/area/A = get_area(curturf)
if(A.noteleport)
return 0
playSpecials(curturf,effectin,soundin)
if(force_teleport)
+6 -1
View File
@@ -54,6 +54,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/static_environ
var/has_gravity = 0
var/noteleport = 0 //Are you forbidden from teleporting to the area? (centcomm, mobs, wizard, hand teleporter)
var/safe = 0 //Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
var/no_air = null
@@ -67,7 +68,7 @@ var/list/teleportlocs = list()
/proc/process_teleport_locs()
for(var/area/AR in world)
if(istype(AR, /area/shuttle) || istype(AR, /area/wizard_station)) continue
if(istype(AR, /area/shuttle) || istype(AR, /area/wizard_station) || AR.noteleport) continue
if(teleportlocs.Find(AR.name)) continue
var/turf/picked = safepick(get_area_turfs(AR.type))
if (picked && (picked.z == ZLEVEL_STATION))
@@ -175,6 +176,7 @@ var/list/teleportlocs = list()
icon_state = "centcom"
requires_power = 0
has_gravity = 1
noteleport = 1
blob_allowed = 0 //Should go without saying, no blobs should take over centcom as a win condition.
/area/centcom/control
@@ -202,6 +204,7 @@ var/list/teleportlocs = list()
icon_state = "syndie-ship"
requires_power = 0
has_gravity = 1
noteleport = 1
blob_allowed = 0 //Not... entirely sure this will ever come up... but if the bus makes blobs AND ops, it shouldn't aim for the ops to win.
/area/syndicate_mothership/control
@@ -284,12 +287,14 @@ var/list/teleportlocs = list()
icon_state = "yellow"
requires_power = 0
has_gravity = 1
noteleport = 1
//Abductors
/area/abductor_ship
name = "Abductor Ship"
icon_state = "yellow"
requires_power = 0
noteleport = 1
has_gravity = 1
+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)
+5 -5
View File
@@ -125,11 +125,11 @@
no_den_usage = 1
/obj/item/weapon/gun/magic/wand/teleport/zap_self(mob/living/user)
do_teleport(user, user, 10)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(3, user.loc)
smoke.start()
charges--
if(do_teleport(user, user, 10))
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(3, user.loc)
smoke.start()
charges--
..()
/////////////////////////////////////
+5 -5
View File
@@ -84,11 +84,11 @@
teleloc = target.loc
for(var/atom/movable/stuff in teleloc)
if(!stuff.anchored && stuff.loc)
teleammount++
do_teleport(stuff, stuff, 10)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(max(round(4 - teleammount),0), stuff.loc) //Smoke drops off if a lot of stuff is moved for the sake of sanity
smoke.start()
if(do_teleport(stuff, stuff, 10))
teleammount++
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(max(round(4 - teleammount),0), stuff.loc) //Smoke drops off if a lot of stuff is moved for the sake of sanity
smoke.start()
/obj/item/projectile/magic/door
name = "bolt of door creation"