feat(editor): auto-save fires for any unsaved change (objects, NPCs, quests)

Auto-save was gated on terrainEditor.hasUnsavedChanges() so a session
where the user only edited NPCs or quests would lose data on crash.
Added autoSavePendingChanges_ flag flipped by every objectsDirty_ = true
site (and markObjectsDirty), cleared by quickSave. Auto-save now fires
on either dirty signal.
This commit is contained in:
Kelsi 2026-05-06 01:48:34 -07:00
parent 552e0d22e2
commit 2a2c217ae3
2 changed files with 31 additions and 24 deletions

View file

@ -84,7 +84,7 @@ public:
}
mode_ = m;
}
void markObjectsDirty() { objectsDirty_ = true; }
void markObjectsDirty() { objectsDirty_ = true; autoSavePendingChanges_ = true; }
void startGizmoMode(TransformMode mode);
void setGizmoAxis(TransformAxis axis);
@ -150,6 +150,7 @@ private:
float autoSaveTimer_ = 0.0f;
float autoSaveInterval_ = 300.0f;
bool autoSaveEnabled_ = true;
bool autoSavePendingChanges_ = false;
bool showQuitConfirm_ = false;
ZoneManifest zoneManifest_;