mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Minor Gravity Fixes (#74285)
## About The Pull Request Fixes forced gravity not updating a mob (trait was added too early, before hook signals are registered) Fixes spawning a mob in space not causing floats (default grav was 0, so == null was wrong) Runs shake_everyone() (Our gravity gen reaction hook) AFTER gravity changes, ensuring mobs hook into it ## Why It's Good For The Game Closes #74271 Closes #74272 (Caused by being in nograv but not floating) Closes #74274 ## Changelog 🆑 fix: Fixes a bunch of minor gravity bugs, report em if you see more yeah? /🆑
This commit is contained in:
@@ -13,12 +13,13 @@
|
||||
|
||||
src.gravity = gravity
|
||||
src.ignore_turf_gravity = ignore_turf_gravity
|
||||
ADD_TRAIT(target, TRAIT_FORCED_GRAVITY, REF(src))
|
||||
|
||||
RegisterSignal(target, COMSIG_ATOM_HAS_GRAVITY, PROC_REF(gravity_check))
|
||||
if(isturf(target))
|
||||
RegisterSignal(target, COMSIG_TURF_HAS_GRAVITY, PROC_REF(turf_gravity_check))
|
||||
|
||||
ADD_TRAIT(target, TRAIT_FORCED_GRAVITY, REF(src))
|
||||
|
||||
/datum/element/forced_gravity/Detach(datum/source)
|
||||
. = ..()
|
||||
var/static/list/signals_b_gone = list(COMSIG_ATOM_HAS_GRAVITY, COMSIG_TURF_HAS_GRAVITY)
|
||||
|
||||
Reference in New Issue
Block a user