6 Commits
Author SHA1 Message Date
FabianK3andGitHub 65a9f06765 Persistence Panel (#22979)
# Summary

This PR adds a new admin panel for persistence.

## Contents

- The panel features information about the current round and detailed
tracking of objects, records and generics.
- The previously introduced toggle-persistence verb has been removed and
integrated into the new panel.
- The panel can be seen by admins, mods and devs, but the
toggle-persistence is still locked to admin permissions only.

## Preview

The images are WIP and subject to change.

<img width="918" height="229" alt="image"
src="https://github.com/user-attachments/assets/16d3d73d-32e6-4907-bdff-d96699c27d49"
/>

<img width="919" height="253" alt="image"
src="https://github.com/user-attachments/assets/92e7f4d9-ccd4-4e79-949d-b8a35039da01"
/>

<img width="923" height="285" alt="image"
src="https://github.com/user-attachments/assets/e3796504-4cc6-4fce-b5f1-4df3486bfbee"
/>

<img width="923" height="270" alt="image"
src="https://github.com/user-attachments/assets/9fbb185d-181a-40ec-b89b-58eafcd47e4d"
/>
2026-08-08 20:47:55 +00:00
802d3fe01f Persistency subsystem update - Generics and history records (#22114)
# Summary

This PR is the next update to the persistency subsystem. The goal of
this PR is to provide more framework like functions to allow more types
of content to be made persistent.

Currently only volatile game objects created during a round can be (*in
a [clean](https://www.youtube.com/watch?v=rZ3ETK7-ZM8) way*) saved and
made persistent. This update attempts to provide methods to make
*everything*¹ persistent.

This introduces persistent generics and history.

## Database

The following things are going to be changed and added in the database  
(open in new tab for better visibility, PNG file includes the drawIO
code):

<img width="1692" height="1041" alt="aurora_persistency_db drawio"
src="https://github.com/user-attachments/assets/ea53f419-f9aa-4592-af8f-3a8d5edf3177"
/>

**Deviations on database implementation from diagram:**  
- Removed unique constraint on history table - Prevented adding multiple
records per round per attribute.

## Framework surface changes

- MC/VV: Moved global object track register to subsystem var space.
- MC/VV: Point of interest: Added history_cache and generic_cache to
subsystem var space.
- MC/VV: Updated subsystem stat entry message, now providing information
on cache sizes of new types.
- Added `singleton/persistent_type` defines (Type, clean-up rules,
finalization hook) and macros allowing new definitions of said types.
- Added cache structures that are also used for returns on public procs
in generics and history persistent types.
- Major new framework features: Persistent history (example: Mining
yield records) and persistent generics (example: Persistent Horizon
overmap position). See documentation for more information.

DrawIO diagram for documentation, includes source in it (open in new
tab):

<img width="200" height="200" alt="Persistence-subsystem-flowchart
drawio"
src="https://github.com/user-attachments/assets/51f28331-f999-49a2-a7cc-58278f7ae416"
/>

## Tasks

(These lists are not comprehensive.)

**General**
- [x] Update DB - Write SQL scripts.
- [x] Add subsystem modular files for generics and history.
- [x] Add type definition logic, macros.
- [x] Add type-DB init logic.
- [x] Logging.
- [x] A lot of testing. *A lot.*
- [x] Changelog.
- [x] Self-Review.
- [x] Update documentation on the persistence subsystem.

**"Persistent history"**
- [x] Add init logic.
- [x] Add finalize logic.
- [x] Add framework surface procs.
  - [x] Get last record.
  - [x] Get last X records.
  - [x] Add record.
  - [x] Add character ID related validation.
- [x] Add initial example mechanic.

**"Persistent generics"**
- [x] Add init logic.
- [x] Add finalize logic.
- [x] Add framework surface procs.
  - [x] Save.
  - [x] Load.
- [x] Add initial example mechanic.

## Changes

Too many changes to be listed here - Check changelog and actual changes.

## Warning

There are certain use/test cases that *cannot* be tested locally due to
missing preexisting data in the database. This should only affect new
data structures (new persistent types), not existing data.

¹ _Large scale persistent mapping is excluded for this version._

---------

Co-authored-by: Copilot <copilot@github.com>
2026-07-19 20:56:17 +02:00
FabianK3andGitHub 8855bdd0dc Fix persistent supplies (#22435)
# Summary

This PR fixes the carry logic and persistence register of persistent
supply packages.

## Changes

- Fixed proc path of additional pickup checks that was still pointing at
only delivery packages.
- Fixed eager location check on persistence register. Objects finalize
will do the same, but this will allow objects to be brought to the
Horizon with persistence registered.
2026-05-11 18:12:57 +00:00
FabianK3andGitHub 9f59d9dec5 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.
2026-05-07 20:31:08 +00:00
74a02b1f99 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>
2026-04-22 20:21:39 +00:00
FabianK3andGitHub aff736cda2 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.
2026-03-24 19:53:37 +01:00