The stadium model shows the stages of lounge and periphery
Clubhouse and shopping centre grow a storey per stage, the car park grows along the road, the restaurant gets a second storey and the lounge a wider, second row of glass. A crane stands while a stage is built. The card of a building names its stage, what it brings and what the next one costs, and orders it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
8be27f8e57
commit
dfe8a43440
8 files changed
+82
-34
No files matched your search
@@ -481,27 +481,7 @@ 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 == "expansion-start") { const std::string expansion = id; popup_.clear(); reset_popup(); confirm_ = {}; dirty_ = true; engine_expansion_ask(expansion); return; }
|
||||
if (action == "naming-accept") {
|
||||
const std::string offer = id;
|
||||
std::string name, terms;
|
||||
@@ -543,6 +523,7 @@ void App::engine_event(Rml::Event &event) {
|
||||
return;
|
||||
}
|
||||
if (engine_assembly_open_) { engine_assembly_action(action, id); return; }
|
||||
if (action == "expansion-start" && engine_fresh_ && !engine_busy_) { engine_expansion_ask(id); return; } // from the card of a building
|
||||
if (action == "lineup-number" && engine_fresh_ && !engine_busy_ && menu_ == "lineup") {
|
||||
// a new shirt number for the player; whoever wears it takes his
|
||||
const std::string player = id;
|
||||
|
||||
Reference in new issue
Block a user