mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 15:39:57 +01:00
Fix persistence on non-Horizon and admin persistence toggle admin verb (#22301)
# Summary This PR fixes persistence on non-Horizon maps and adds an admin verb to toggle saving at round end. ## Changes - Fixed persistency being used on non-Horizon maps, prevents loading and saving. - Added admin verb "Toggle persistence" to prevent saving at round end. ## Verb preview Verb location <img width="194" height="147" alt="Screenshot 2026-04-20 204519" src="https://github.com/user-attachments/assets/bf043fd3-f021-4da8-b74f-f03373379e64" /> Input to disable <img width="319" height="144" alt="Screenshot 2026-04-20 204628" src="https://github.com/user-attachments/assets/a681d8d3-ce6b-49e1-a145-b994f40b3f6d" /> Disable output <img width="897" height="50" alt="Screenshot 2026-04-20 204644" src="https://github.com/user-attachments/assets/eedc04d1-31a1-4a49-854c-b78e43b41be5" /> Input to re-enable <img width="318" height="132" alt="Screenshot 2026-04-20 204653" src="https://github.com/user-attachments/assets/cdcf88f2-1a7e-4755-872e-613206756224" /> Re-enable output <img width="898" height="48" alt="Screenshot 2026-04-20 204709" src="https://github.com/user-attachments/assets/1a583342-45fb-41dd-ad21-f349c577646b" /> --------- Signed-off-by: FabianK3 <21039694+FabianK3@users.noreply.github.com> Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
PRIVATE_PROC(TRUE)
|
||||
GLOB.persistence_object_track_register = list()
|
||||
|
||||
if(SSatlas.current_map.path != "sccv_horizon") // The persistence system only supports objects from the main map levels for multiple reasons, e.g. Z level value, mapping support
|
||||
log_subsystem_persistence_info("Persistent objects: Current map did not match SCCV Horizon, skipping persistent object initialization.")
|
||||
return
|
||||
|
||||
// Delete all persistent objects in the database that have expired and have passed the cleanup grace period (PERSISTENT_EXPIRATION_CLEANUP_DELAY_DAYS)
|
||||
objectsDatabaseCleanEntries()
|
||||
|
||||
@@ -36,6 +40,12 @@
|
||||
/datum/controller/subsystem/persistence/proc/objectsFinalize()
|
||||
PRIVATE_PROC(TRUE)
|
||||
|
||||
if(SSatlas.current_map.path != "sccv_horizon") // The persistence system only supports objects from the main map levels for multiple reasons, e.g. Z level value, mapping support
|
||||
log_subsystem_persistence_info("Persistent objects: Current map did not match SCCV Horizon, skipping persistent object finalization.")
|
||||
if(length(GLOB.persistence_object_track_register) > 0)
|
||||
log_subsystem_persistence_warning("Persistent objects: There are [length(GLOB.persistence_object_track_register)] tracked objects at finalization, while the map is not supported! These track will not be saved! Verify that SSatlas.current_map.path has not changed during the round!")
|
||||
return
|
||||
|
||||
// Subsystem shutdown:
|
||||
// Create new persistent records for objects that have been created in the round
|
||||
// Update tracked objects that have an ID (already existing from previous rounds)
|
||||
|
||||
Reference in New Issue
Block a user