Port career setup, manager hub and context-aware native UI (by Codex)
This commit is contained in:
1 parent
d88bf2872a
commit
d085697bb9
37 files changed
+1447
-421
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
#include "modern/ui/demo_finance.hpp"
|
||||
#include "modern/ui/demo_career.hpp"
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
@@ -52,9 +53,9 @@ std::string own(const Catalog &world, const std::string &managed, const Json *st
|
||||
if (!managers.is_array() || managers.empty() || !managers[0].is_object() ||
|
||||
!managers[0].contains("club") || !managers[0]["club"].is_string())
|
||||
throw editor::Error("invalid_finance_manager");
|
||||
if (managers[0]["club"].get<std::string>().empty())
|
||||
if (demo_career_manager(*state).value("club", "").empty())
|
||||
throw editor::Error("invalid_finance_manager");
|
||||
return own(world, managers[0]["club"].get<std::string>());
|
||||
return own(world, demo_career_manager(*state).value("club", ""));
|
||||
}
|
||||
for (const auto *club : world.clubs())
|
||||
if (world.manageable(club->value("id", ""))) return club->value("id", "");
|
||||
|
||||
Reference in new issue
Block a user