Bugfix persistence of items in inventories and persistent charge card location (#22426)

# Summary

This PR fixes two bugs with persistent items, trash and the persistent
charge card.

## Changes

- Fixed the prevention of trash in inventories becoming persistent also
preventing any items on characters becoming persistent.
- Fixed persistent charge card location on init. If the card is not in
an command area, it will be moved into the XO office, if it is in a
command area, it will stay there.
This commit is contained in:
FabianK3
2026-05-07 20:31:08 +00:00
committed by GitHub
parent 38a5988115
commit 9f59d9dec5
4 changed files with 24 additions and 3 deletions
@@ -57,8 +57,6 @@
var/turf/T = get_turf(track)
if(!T || !is_station_level(T.z)) // The persistence system only supports objects from the main map levels for multiple reasons, e.g. Z level value, mapping support
objectsDeregisterTrack(track)
if(astype(track, /obj/item)?.in_inventory) // Objects that are held by players won't become persistent
objectsDeregisterTrack(track)
var/created = 0
var/updated = 0