mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
Teleportation standardization, channels, and interception (#41371)
cl XDTM add: Spraying holy water on tiles will now prevent cult-based teleportation from using them as a destination point. tweak: Quantum, wormhole and magic teleportation is no longer disrupted by bags of holding. /cl Refactors some teleportation code so it uses do_teleport instead of directly forceMove. do_teleport now has a channel argument, to specify the type of teleportation used. This will affect what can and cannot interfere with teleportation. For example, BoHs interfere with bluespace teleportation but not wormhole, quantum or magic teleportation. do_teleport now sends a COMSIG_ATOM_INTERCEPT_TELEPORT signal, allowing the target turf (or anything placing a signal on said turf) to react appropriately. As a proof of concept, blessed tiles use it to prevent teleportation from the cult channel. Intercepting teleportation can have interesting potential uses, from teleport denial fields, to teleport scramblers (teleports you somewhere else instead), telefraggers that gib anyone unlucky enough to teleport in their area of effect, teleport anchors that shunt all teleportations in a wide area to themselves, and so on.
This commit is contained in:
@@ -131,7 +131,7 @@
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
if(do_teleport(user, user, 10))
|
||||
if(do_teleport(user, user, 10, channel = TELEPORT_CHANNEL_MAGIC))
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(3, user.loc)
|
||||
smoke.start()
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
/obj/effect/nettingportal/proc/pop(teletarget)
|
||||
if(teletarget)
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, teletarget, 2)//teleport what's in the tile to the beacon
|
||||
do_teleport(L, teletarget, 2, channel = TELEPORT_CHANNEL_BLUESPACE)//teleport what's in the tile to the beacon
|
||||
else
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
do_teleport(L, L, 15) //Otherwise it just warps you off somewhere.
|
||||
do_teleport(L, L, 15, channel = TELEPORT_CHANNEL_BLUESPACE) //Otherwise it just warps you off somewhere.
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
teleloc = target.loc
|
||||
for(var/atom/movable/stuff in teleloc)
|
||||
if(!stuff.anchored && stuff.loc)
|
||||
if(do_teleport(stuff, stuff, 10))
|
||||
if(do_teleport(stuff, stuff, 10, channel = TELEPORT_CHANNEL_MAGIC))
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user