From bd43b1afc0cf7fb2d5fe23bde860f576a5db671a Mon Sep 17 00:00:00 2001 From: Dino Date: Mon, 1 Dec 2025 22:06:49 -0500 Subject: [PATCH] #1792 - have client say "estimated one time bonus" --- client/text.c | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/client/text.c b/client/text.c index feeaf49819..1a602e2995 100644 --- a/client/text.c +++ b/client/text.c @@ -1732,38 +1732,64 @@ const char *get_act_sel_action_custom_text(struct action *paction, NULL); if (action_has_result(paction, ACTRES_TRADE_ROUTE)) { + bool estimated = FALSE; int revenue = get_caravan_enter_city_trade_bonus(actor_homecity, target_city, unit_type_get(actor_unit), actor_unit->carrying, TRUE); + if (game.info.caravan_bonus_style == CBS_CLASSIC + && target_city->owner != actor_homecity->owner) { + estimated = TRUE; + } if (revenue > 0) { - astr_set(&custom, - /* TRANS: Estimated one time bonus and recurring revenue for - * the Establish Trade _Route action. */ - _("%d one time bonus + %d trade"), - revenue, - trade_base_between_cities(actor_homecity, target_city)); + if (estimated) { + astr_set(&custom, + /* TRANS: estimated one time bonus and recurring revenue for + * the Establish Trade _Route action. */ + _("%d estimated one time bonus + %d trade"), + revenue, + trade_base_between_cities(actor_homecity, target_city)); + } else { + astr_set(&custom, + /* TRANS: one time bonus and recurring revenue for + * the Establish Trade _Route action. */ + _("%d one time bonus + %d trade"), + revenue, + trade_base_between_cities(actor_homecity, target_city)); + } } else { astr_set(&custom, - /* TRANS: Estimated recurring revenue for + /* TRANS: recurring revenue for * the Establish Trade _Route action. */ _("%d trade"), trade_base_between_cities(actor_homecity, target_city)); } } else if (action_has_result(paction, ACTRES_MARKETPLACE)) { + bool estimated = FALSE; int revenue = get_caravan_enter_city_trade_bonus(actor_homecity, target_city, unit_type_get(actor_unit), actor_unit->carrying, FALSE); + if (game.info.caravan_bonus_style == CBS_CLASSIC + && target_city->owner != actor_homecity->owner) { + estimated = TRUE; + } if (revenue > 0) { - astr_set(&custom, - /* TRANS: Estimated one time bonus for the Enter Marketplace - * action. */ - _("%d one time bonus"), revenue); + if (estimated) { + astr_set(&custom, + /* TRANS: estimated one time bonus for the Enter Marketplace + * action. */ + _("%d estimated one time bonus"), revenue); + } else { + astr_set(&custom, + /* TRANS: one time bonus for the Enter Marketplace + * action. */ + _("%d one time bonus"), revenue); + } } else { /* No info to add. */ return NULL; -- 2.31.0