mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user