From cc5c967dcd66222e2588f23b5b0fcc67a5d7449c Mon Sep 17 00:00:00 2001 From: Theos Date: Tue, 16 Jul 2024 04:56:47 -0400 Subject: [PATCH] subshuttles now inherit gravity if they are docked at a ship (#3178) ## About The Pull Request gravity checks now also check any docking point for gravity generators, allowing ships docked to eachother to share gravity ## Why It's Good For The Game ghhhmhm ## Changelog :cl: fix: ships docked to eachother now share gravity /:cl: Signed-off-by: Theos --- code/game/atoms.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 7ffa3255ada1..6d9f0df9f2ec 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1587,6 +1587,15 @@ if(istype(ship)) var/obj/docking_port/mobile/shuttle = ship.mobile_port if(shuttle) + if(istype(shuttle.docked, /obj/docking_port/stationary)) + var/obj/docking_port/stationary/shipfinder = shuttle.docked + if(shipfinder.owner_ship) + for(var/datum/weakref/weakref as anything in shipfinder.owner_ship.gravgen_list) + var/obj/machinery/power/ship_gravity/SG = weakref.resolve() + if(!SG) + shipfinder.owner_ship.gravgen_list -= weakref + continue + max_grav = max(SG.active,max_grav) for(var/datum/weakref/weakref as anything in shuttle.gravgen_list) var/obj/machinery/power/ship_gravity/SG = weakref.resolve() if(!SG)