From 6a62e578abed9f12cfa49f9cf69a539dfdff0d73 Mon Sep 17 00:00:00 2001
From: CHOMPStation2StaffMirrorBot
<94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com>
Date: Sun, 5 Jan 2025 09:00:20 -0700
Subject: [PATCH] [MIRROR] creating areas registers them with the grav gen
(#9796)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
---
code/game/objects/items/blueprints_vr.dm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/code/game/objects/items/blueprints_vr.dm b/code/game/objects/items/blueprints_vr.dm
index 5a93c50498..a4f11a079c 100644
--- a/code/game/objects/items/blueprints_vr.dm
+++ b/code/game/objects/items/blueprints_vr.dm
@@ -531,6 +531,13 @@
if(AO && istype(AO,/obj/item/areaeditor))
if(AO.uses_charges)
AO.charges -= 1
+
+ var/list/zLevels = using_map.station_levels.Copy()
+ for(var/datum/planet/P in SSplanets.planets)
+ zLevels -= P.expected_z_levels
+ for(var/obj/machinery/gravity_generator/main/GG in machines)
+ if(GG.z in zLevels)
+ GG.update_areas()
return TRUE
@@ -926,6 +933,12 @@
message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)",0,1)
log_game("[key_name(creator, creator.client)] just made a new area called [newA.name]")
+ var/list/zLevels = using_map.station_levels.Copy()
+ for(var/datum/planet/P in SSplanets.planets)
+ zLevels -= P.expected_z_levels
+ for(var/obj/machinery/gravity_generator/main/GG in machines)
+ if(GG.z in zLevels)
+ GG.update_areas()
return