mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Chasms prevent teleportation (#80102)
## About The Pull Request Chasms prevent teleportation Fixes #80101 ## Why It's Good For The Game Being able to teleport people into chasms using beacons as an anchor is bad. It has very little counterplay besides fishing out the beacon, changing the teleport target (assuming it's not hidden), or killing someone holding a handtele. The alternate idea for this PR was to see if the chasm added some sort of trait to the things falling in it and make it so the teleporter would ignore things with that trait, but it seems like chasms don't do that. ## Changelog 🆑 Tattle balance: you can no longer teleport into chasms /🆑 --------- Co-authored-by: tattle <article.disaster@gmail.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
/obj/effect/light_emitter/tendril,
|
||||
/obj/effect/mapping_helpers,
|
||||
/obj/effect/particle_effect/ion_trails,
|
||||
/obj/effect/particle_effect/sparks,
|
||||
/obj/effect/portal,
|
||||
/obj/effect/projectile,
|
||||
/obj/effect/spectre_of_resurrection,
|
||||
@@ -42,6 +43,7 @@
|
||||
RegisterSignal(parent, COMSIG_ATOM_ABSTRACT_ENTERED, PROC_REF(entered))
|
||||
RegisterSignal(parent, COMSIG_ATOM_ABSTRACT_EXITED, PROC_REF(exited))
|
||||
RegisterSignal(parent, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON, PROC_REF(initialized_on))
|
||||
RegisterSignal(parent, COMSIG_ATOM_INTERCEPT_TELEPORTING, PROC_REF(block_teleport))
|
||||
//allow catwalks to give the turf the CHASM_STOPPED trait before dropping stuff when the turf is changed.
|
||||
//otherwise don't do anything because turfs and areas are initialized before movables.
|
||||
if(!mapload)
|
||||
@@ -63,6 +65,9 @@
|
||||
SIGNAL_HANDLER
|
||||
drop_stuff(movable)
|
||||
|
||||
/datum/component/chasm/proc/block_teleport()
|
||||
return COMPONENT_BLOCK_TELEPORT
|
||||
|
||||
/datum/component/chasm/proc/on_chasm_stopped(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
UnregisterSignal(source, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_EXITED, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON))
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
if(!forced)
|
||||
if(!check_teleport_valid(teleatom, destination, channel))
|
||||
teleatom.balloon_alert(teleatom, "something holds you back!")
|
||||
return FALSE
|
||||
|
||||
if(isobserver(teleatom))
|
||||
|
||||
Reference in New Issue
Block a user