mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Fix issues resulting from an elevated object being created inside of a non-turf atom (#27890)
* Fix issues resulting from an elevated object being created inside of a non-turf atom (#83498) ## About The Pull Request If an elevated object is initialized inside of a non-turf atom, it'll still make the turf it is on elevated. Permanently. Which is weird. ## Why It's Good For The Game Randomly elevated turfs are bad. Bugs bad. ## Changelog 🆑 fix: Fix a rare issue where a turf would remain permanently "elevated" if an elevated object was initialized inside of a non-turf object. /🆑 * Fix issues resulting from an elevated object being created inside of a non-turf atom --------- Co-authored-by: Lucy <lucy@absolucy.moe>
This commit is contained in:
@@ -18,8 +18,9 @@
|
||||
if(ismovable(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
|
||||
|
||||
var/turf/turf = get_turf(target)
|
||||
if(turf)
|
||||
var/atom/atom_target = target
|
||||
if(isturf(atom_target.loc))
|
||||
var/turf/turf = atom_target.loc
|
||||
if(!HAS_TRAIT(turf, TRAIT_TURF_HAS_ELEVATED_OBJ(pixel_shift)))
|
||||
RegisterSignal(turf, COMSIG_TURF_RESET_ELEVATION, PROC_REF(check_elevation))
|
||||
RegisterSignal(turf, COMSIG_TURF_CHANGE, PROC_REF(pre_change_turf))
|
||||
|
||||
Reference in New Issue
Block a user