Back up save before overwrite

This commit is contained in:
2026-05-18 19:37:35 -07:00
parent 65599b9d2f
commit dfad8809c7
5 changed files with 89 additions and 1 deletions
+6
View File
@@ -467,6 +467,12 @@ GameMode registers the current MVP persistent actor classes, checks
`DoesSaveExist`, and calls `LoadCurrentWorld` without clearing existing map
actors so map-authored resources and startup content remain owned by the map.
Backup-before-save is enabled by default through
`UAgrarianPersistenceSubsystem::bBackupBeforeSave`. Before overwriting an
existing save, `WriteSave` copies the current slot file from `Saved/SaveGames`
into `Saved/SaveGames/Backups` with a UTC timestamp. Missing save files simply
skip backup creation, which keeps the first save path simple.
## Testing Gates
Minimum persistence smoke test: