The lounge and four buildings of the periphery can be extended in stages
Once it stands, the V.I.P. lounge goes up to four stages, the shopping centre and the clubhouse to three, the car park to four, the restaurant to two. A stage costs money and months of building and then brings a monthly income by league. The stadium page lists them under "Ausbaustufen". Engine: expansions.hpp, stadium read expansions, command stadium.expand; saved in state/modern.json. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
57b8b0f371
commit
8be27f8e57
19 files changed
+391
-3
No files matched your search
@@ -481,6 +481,27 @@ void App::engine_event(Rml::Event &event) {
|
||||
const auto action = node->GetAttribute<Rml::String>("data-action", ""), id = node->GetAttribute<Rml::String>("data-id", "");
|
||||
if (!popup_.empty()) {
|
||||
if(action=="balance-discard"){engine_balance_action(action,node);return;}
|
||||
if (action == "expansion-start") {
|
||||
const std::string expansion = id;
|
||||
std::string name, terms;
|
||||
try {
|
||||
for (const auto &row : engine_data_.at("stadium").at("data").at("expansions"))
|
||||
if (row.value("id", std::string()) == expansion && !row.at("nextPrice").is_null()) {
|
||||
name = row.value("name", std::string());
|
||||
terms = engine_price(row.at("nextPrice")) + ", " + std::to_string(row.value("nextMonths", 0)) + " Monate Bauzeit";
|
||||
}
|
||||
} catch (const std::exception &) {}
|
||||
popup_.clear(); reset_popup(); confirm_ = {}; dirty_ = true;
|
||||
if (name.empty()) return;
|
||||
confirmation(name + " um eine Stufe ausbauen? (" + terms + ")", [this, expansion] {
|
||||
try {
|
||||
engine_finance_submit(engine_expansion_command(engine_data_, expansion, editor::new_id("request:ui-")));
|
||||
} catch (const std::exception &e) { message(e.what()); }
|
||||
});
|
||||
popup_title_ = "Ausbau";
|
||||
popup_accept_ = "Ausbauen";
|
||||
return;
|
||||
}
|
||||
if (action == "naming-accept") {
|
||||
const std::string offer = id;
|
||||
std::string name, terms;
|
||||
|
||||
Reference in new issue
Block a user