From 472a2841c2b8711938be6bee87e0acf3d1ea5162 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 3 Dec 2021 05:53:26 +0200 Subject: [PATCH 39/39] Speak of "supplies" instead of "fuel" in Coast unit loss message See osdn #43318 Signed-off-by: Marko Lindqvist --- server/unittools.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/server/unittools.c b/server/unittools.c index a4432c20c7..0dba6b00f2 100644 --- a/server/unittools.c +++ b/server/unittools.c @@ -592,10 +592,18 @@ void player_restore_units(struct player *pplayer) /* 7) Check if there are air units without fuel */ unit_list_iterate_safe(pplayer->units, punit) { - if (punit->fuel <= 0 && utype_fuel(unit_type_get(punit))) { - notify_player(pplayer, unit_tile(punit), E_UNIT_LOST_MISC, ftc_server, - _("Your %s has run out of fuel."), - unit_tile_link(punit)); + const struct unit_type *utype = unit_type_get(punit); + + if (punit->fuel <= 0 && utype_fuel(utype)) { + if (utype_has_flag(utype, UTYF_COAST)) { + notify_player(pplayer, unit_tile(punit), E_UNIT_LOST_MISC, ftc_server, + _("Your %s has run out of supplies."), + unit_tile_link(punit)); + } else { + notify_player(pplayer, unit_tile(punit), E_UNIT_LOST_MISC, ftc_server, + _("Your %s has run out of fuel."), + unit_tile_link(punit)); + } wipe_unit(punit, ULR_FUEL, NULL); } } unit_list_iterate_safe_end; -- 2.33.0