A listed player can be taken off the market again

transfer.submit {action: withdraw, playerId} ends the manager's own list
entry as it ends without a buyer. The transfer market's first button does
it for a listed player.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-17 14:02:17 +01:00
1 parent ce8b871202
commit 1ec8295c84
9 files changed
+85 -4

No files matched your search

+8 -1
View File
@@ -274,8 +274,15 @@ bool App::engine_transfer_action(const std::string &action,
if (own) {
if (std::find(engine_transfer_value_.at("listed").begin(),
engine_transfer_value_.at("listed").end(),
row.at("id")) != engine_transfer_value_.at("listed").end())
row.at("id")) != engine_transfer_value_.at("listed").end()) {
// listed already: the first button takes him off the market again
if (kind == "sell") {
const Json draft = {{"kind", "withdraw"}, {"player", row.at("id")}};
confirmation(row.at("name").get<std::string>() + " vom Markt nehmen? Offene Gebote für ihn verfallen.", [send, draft] { send(draft); });
popup_accept_ = "Vom Markt nehmen";
}
return true;
}
const Json draft = {{"kind", kind}, {"player", row.at("id")}};
confirmation(row.at("name").get<std::string>() +
(kind == "lend" ? " zum Verleih anbieten?"