Preserve human manager identity through national coach record swaps (by Codex)

This commit is contained in:
Codex committed 2026-10-29 01:56:31 +01:00
1 parent ce1535fe2d
commit 693744a961
16 files changed
+203 -21

No files matched your search

+2 -1
View File
@@ -83,7 +83,8 @@ Json EngineBridge::save_copy(const fs::path &path) {
if (fs::weakly_canonical(path) == impl_->input || fs::exists(path))
throw editor::Error("Bitte eine neue Datei wählen. Der geladene Spielstand wird nicht überschrieben.");
const auto bundle = snapshot();
const auto slot = bundle.at("desktop").at("data").at("manager").at("slot").get<int>();
const auto &manager = bundle.at("desktop").at("data").at("manager");
const auto slot = manager.value("runtimeSlot", manager.at("slot").get<int>());
std::string error;
if (!impl_->session->save_game(path, slot, false, error)) throw editor::Error(error);
return {{"messageType", "saved"}, {"path", editor::utf8(path)}};