From 8cc58f222397ff1a87fcbc8bc5ba2459194675eb Mon Sep 17 00:00:00 2001 From: Phantastic-Swan Date: Fri, 27 Feb 2026 01:45:54 +0100 Subject: [PATCH] fixes crushing gravity around the grav gen when it goes offline (#95253) ## About The Pull Request The Phantastic Swan comes out of the shadow realm to fix some shit again. One liners baby. Whenever the grav gen went offline, the crushing gravity effect around it stayed active. This was because the gravity generator seems to override it's own gravity field on round start, removing the connection between it's status and the forced gravity around it. ## Why It's Good For The Game Fixes a bug. I think it also closes #76403 ## Changelog :cl: Swan fix: fixes the gravity generator's crushing gravity effect not disappearing when the gen goes offline /:cl: --- code/modules/power/gravitygenerator.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index b4178e83e97..e30b99d8700 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -335,7 +335,8 @@ GLOBAL_LIST_EMPTY(gravity_generators) soundloop.start() var/old_gravity = gravity_in_level() complete_state_update() - gravity_field = new(src, 2, TRUE, 6) + if (isnull(gravity_field)) // because if it isn't null, we have just overwritten it + gravity_field = new(src, 2, TRUE, 6) if (!old_gravity) if(SSticker.current_state == GAME_STATE_PLAYING)