Content re-read through SceneManager.ReloadContent

This commit is contained in:
cthangover committed 2026-10-22 19:14:58 +02:00
1 parent 92d78d07cd
commit 164194ef50
3 files changed
+5 -14

No files matched your search

+2 -2
View File
@@ -270,7 +270,7 @@ namespace Cthangover.Mods.ScenarioStudio
File.WriteAllText(ModManager.Instance.GetFileSystemPath(evt.SourceModId, evt.SourcePath), copy.Text);
_copies.Remove(evt.ID);
StudioLayer.RefreshContent();
SceneManager.ReloadContent();
Journal.Add(StudioLogCategory.Edit, new StudioText("studio/log_text_applied", evt.ID, pending, target.ModId));
GameLogger.Log("UI", $"Scenario studio: applied {pending} change(s) of '{evt.ID}' to '{target.ModId}'");
Restart(StudioRestartMode.Rollback);
@@ -484,7 +484,7 @@ namespace Cthangover.Mods.ScenarioStudio
}
var scenario = Layer.CreateScene(name, backgrounds, StudioScriptEdits.NewLine());
StudioLayer.RefreshContent();
SceneManager.ReloadContent();
Journal.Add(StudioLogCategory.Edit, new StudioText("studio/log_text_scene_created", name, scenario));
Touch();
return true;