Persistence code refactoring (#22044)

# Summary

This PR refactores code and structure of the current persistence
subsystem, in preparation for Persistency: Circles, Squares and
Triangles.

This should not contain any user facing changes.

~~This PR is based of branch #21925 and **needs** to be merged in order.
The files changed display will be meaningless until then.~~ *Done.*

## Changes

- Split subsystem in partial files.
- Refactored proc names, added "persistentObject" format for current
code.
- Renamed SQL table.
- Refactored logging and call hiearachy.
- Fix CI labeler adding DB label on non-SQL files.
This commit is contained in:
FabianK3
2026-03-24 19:53:37 +01:00
committed by GitHub
parent fd1c4ead05
commit aff736cda2
20 changed files with 425 additions and 353 deletions
+4 -4
View File
@@ -507,7 +507,7 @@
return
if(in_storage) // Items getting moved into storages (lunchboxes, backpacks) triggers the dropped handler and requires no persistency as a result
SSpersistence.deregister_track(src)
SSpersistence.objectsDeregisterTrack(src)
return
// Trash-like items should become only persistent when they are not dropped in an area flagged with AREA_FLAG_PREVENT_PERSISTENT_TRASH
@@ -515,12 +515,12 @@
if(T)
var/area/A = get_area(T)
if(A && !(A.area_flags & AREA_FLAG_PREVENT_PERSISTENT_TRASH))
persistance_expiration_time_days = 3 // Ensure expiration date is set to prevent long term trash
SSpersistence.register_track(src, usr == null ? null : ckey(usr.key))
persistant_objects_expiration_time_days = 3 // Ensure expiration date is set to prevent long term trash
SSpersistence.objectsRegisterTrack(src, usr == null ? null : ckey(usr.key))
return
// Fallback - No persistency
SSpersistence.deregister_track(src)
SSpersistence.objectsDeregisterTrack(src)
/obj/item/proc/remove_item_verbs(mob/user)
if(ismech(user)) //very snowflake, but necessary due to how mechs work