feat(editor): erosion brush, NPC load, auto-save

- Erode brush mode: simulates water erosion by moving height downhill
  based on slope, creating natural drainage patterns and gullies
- NPC JSON loader: File > Load NPCs parses saved creatures.json back
  into the spawn list (round-trip save/load now works)
- Auto-save: every 5 minutes when unsaved changes exist, exports the
  full zone (ADT + WDT + creatures) to the output directory
- Sculpt mode now has 6 brush types: Raise/Lower/Smooth/Flatten/Level/Erode
This commit is contained in:
Kelsi 2026-05-05 04:44:54 -07:00
parent 42749e9b58
commit a91233a6ec
7 changed files with 164 additions and 7 deletions

View file

@ -81,6 +81,16 @@ void EditorApp::run() {
// Handle pending UI actions
ui_.processActions(*this);
// Auto-save
if (autoSaveEnabled_ && terrain_.isLoaded() && terrainEditor_.hasUnsavedChanges()) {
autoSaveTimer_ += dt;
if (autoSaveTimer_ >= autoSaveInterval_) {
autoSaveTimer_ = 0.0f;
quickSave();
LOG_INFO("Auto-saved zone");
}
}
// Refresh dirty terrain chunks
refreshDirtyChunks();