mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-20 10:37:45 +01:00
Teleport can no longer teleport to the syndicate shuttle. Main solar walkways are no longer blocked. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@623 316c924e-a436-60f5-8080-3fe189b3f50e
82 lines
2.0 KiB
Plaintext
82 lines
2.0 KiB
Plaintext
/mob/proc/teleport()
|
|
set category = "Spells"
|
|
set name = "Teleport"
|
|
set desc="Teleport"
|
|
if(!usr.casting()) return
|
|
var/A
|
|
usr.verbs -= /mob/proc/teleport
|
|
spawn(450)
|
|
usr.verbs += /mob/proc/teleport
|
|
|
|
var/list/theareas = new/list()
|
|
for(var/area/AR in world)
|
|
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station)) continue
|
|
if(theareas.Find(AR.name)) continue
|
|
var/turf/picked = pick(get_area_turfs(AR.type))
|
|
if (picked.z == src.z)
|
|
theareas += AR.name
|
|
theareas[AR.name] = AR
|
|
|
|
A = input("Area to jump to", "BOOYEA", A) in theareas
|
|
var/area/thearea = theareas[A]
|
|
|
|
usr.say("SCYAR NILA [uppertext(A)]")
|
|
usr.spellvoice()
|
|
|
|
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
|
|
smoke.set_up(5, 0, usr.loc)
|
|
smoke.attach(usr)
|
|
smoke.start()
|
|
var/list/L = list()
|
|
for(var/turf/T in get_area_turfs(thearea.type))
|
|
if(T.z != src.z) continue
|
|
if(!T.density)
|
|
var/clear = 1
|
|
for(var/obj/O in T)
|
|
if(O.density)
|
|
clear = 0
|
|
break
|
|
if(clear)
|
|
L+=T
|
|
|
|
usr.loc = pick(L)
|
|
|
|
smoke.start()
|
|
|
|
/mob/proc/teleportscroll()
|
|
if(usr.stat)
|
|
usr << "Not when you're incapicated."
|
|
return
|
|
var/A
|
|
|
|
var/list/theareas = new/list()
|
|
for(var/area/AR in world)
|
|
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station)) continue
|
|
if(theareas.Find(AR.name)) continue
|
|
var/turf/picked = pick(get_area_turfs(AR.type))
|
|
if (picked.z == src.z)
|
|
theareas += AR.name
|
|
theareas[AR.name] = AR
|
|
|
|
A = input("Area to jump to", "BOOYEA", A) in theareas
|
|
var/area/thearea = theareas[A]
|
|
|
|
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
|
|
smoke.set_up(5, 0, usr.loc)
|
|
smoke.attach(usr)
|
|
smoke.start()
|
|
var/list/L = list()
|
|
for(var/turf/T in get_area_turfs(thearea.type))
|
|
if(T.z != src.z) continue
|
|
if(!T.density)
|
|
var/clear = 1
|
|
for(var/obj/O in T)
|
|
if(O.density)
|
|
clear = 0
|
|
break
|
|
if(clear)
|
|
L+=T
|
|
|
|
usr.loc = pick(L)
|
|
|
|
smoke.start() |