From b38d0c27397ed2bb5e3ee174f54fcbd03a3cf9ea Mon Sep 17 00:00:00 2001 From: Ouaz Date: Wed, 31 Jan 2024 20:11:46 +0100 Subject: [PATCH] Revert to classic tooltips without numbers --- src/translation/english.c | 24 +++++++++++----------- src/widget/city_overlay_health.c | 35 +------------------------------- 2 files changed, 13 insertions(+), 46 deletions(-) diff --git a/src/translation/english.c b/src/translation/english.c index e2905e074a..32b75c96cd 100644 --- a/src/translation/english.c +++ b/src/translation/english.c @@ -788,7 +788,7 @@ static translation_string all_strings[] = { {TR_BUILDING_WAREHOUSE_NO_GOODS, "No goods stored at this warehouse."}, {TR_BUILDING_HOUSE_DISEASE_DESC, "Pestilence has struck! Without adequate healthcare, residents dwelling here have died. This house is in quarantine while a doctor or surgeon decontaminates the area."}, {TR_BUILDING_FUMIGATION_DESC, "The building is being cleansed of disease. The fumigation should last a few days."}, - {TR_OVERLAY_HEALTH, "Rating"}, + {TR_OVERLAY_HEALTH, "Global"}, {TR_OVERLAY_SICKNESS, "Sickness"}, {TR_ADVISOR_HEALTH_RATING, "Rating:"}, {TR_ADVISOR_HEALTH_SURVEILLANCE, "Disease surveillance:"}, @@ -797,17 +797,17 @@ static translation_string all_strings[] = { {TR_ADVISOR_SICKNESS_LEVEL_HIGH, "Infectious diseases spread in areas of the city having a poor level of hygiene. If the situation is not remedied soon, some buildings may be quarantined. Greater access to healthcare would effectively prevent epidemics from breaking out."}, {TR_ADVISOR_SICKNESS_LEVEL_PLAGUE, "The plague has come to some unhealthy areas in the city! Buildings have been quarantined or burned to prevent the further spread of disease. Doctors and surgeons have been requisitioned to decontaminate the afflicted places."}, {TR_TOOLTIP_OVERLAY_HEALTH_NONE, "No citizen lives here yet"}, - {TR_TOOLTIP_OVERLAY_HEALTH_0, " : Health in this house is appalling"}, - {TR_TOOLTIP_OVERLAY_HEALTH_1, " : Health in this house is terrible"}, - {TR_TOOLTIP_OVERLAY_HEALTH_2, " : Health in this house is bad"}, - {TR_TOOLTIP_OVERLAY_HEALTH_3, " : Health in this house is poor"}, - {TR_TOOLTIP_OVERLAY_HEALTH_4, " : Health in this house is below average"}, - {TR_TOOLTIP_OVERLAY_HEALTH_5, " : Health in this house is average"}, - {TR_TOOLTIP_OVERLAY_HEALTH_6, " : Health in this house is good"}, - {TR_TOOLTIP_OVERLAY_HEALTH_7, " : Health in this house is very good"}, - {TR_TOOLTIP_OVERLAY_HEALTH_8, " : Health in this house is excellent"}, - {TR_TOOLTIP_OVERLAY_HEALTH_9, " : Health in this house is almost perfect"}, - {TR_TOOLTIP_OVERLAY_HEALTH_10, " : Health in this house is perfect"}, + {TR_TOOLTIP_OVERLAY_HEALTH_0, "Health in this house is appalling"}, + {TR_TOOLTIP_OVERLAY_HEALTH_1, "Health in this house is terrible"}, + {TR_TOOLTIP_OVERLAY_HEALTH_2, "Health in this house is bad"}, + {TR_TOOLTIP_OVERLAY_HEALTH_3, "Health in this house is poor"}, + {TR_TOOLTIP_OVERLAY_HEALTH_4, "Health in this house is below average"}, + {TR_TOOLTIP_OVERLAY_HEALTH_5, "Health in this house is average"}, + {TR_TOOLTIP_OVERLAY_HEALTH_6, "Health in this house is good"}, + {TR_TOOLTIP_OVERLAY_HEALTH_7, "Health in this house is very good"}, + {TR_TOOLTIP_OVERLAY_HEALTH_8, "Health in this house is excellent"}, + {TR_TOOLTIP_OVERLAY_HEALTH_9, "Health in this house is almost perfect"}, + {TR_TOOLTIP_OVERLAY_HEALTH_10, "Health in this house is perfect"}, {TR_TOOLTIP_OVERLAY_SICKNESS_NONE, "No disease"}, {TR_TOOLTIP_OVERLAY_SICKNESS_LOW, "Very few diseases"}, {TR_TOOLTIP_OVERLAY_SICKNESS_MEDIUM, "A few infectious diseases"}, diff --git a/src/widget/city_overlay_health.c b/src/widget/city_overlay_health.c index 2b148ec7d3..674c4654d0 100644 --- a/src/widget/city_overlay_health.c +++ b/src/widget/city_overlay_health.c @@ -127,67 +127,34 @@ static int get_tooltip_health(tooltip_context *c, const building *b) if (b->house_population < 1 && house_health < 1) { c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_NONE; } else if (b->house_population >= 1 && house_health < 10) { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_0; - return 1; } else if (house_health < 20) { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_1; - return 1; } else if (house_health < 30) { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_2; - return 1; } else { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_3; - return 1; } } else if (house_health < 60) { if (house_health < 50) { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_4; - return 1; } else { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_5; - return 1; } } else if (house_health < 80) { if (house_health < 70) { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_6; - return 1; } else { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_7; - return 1; } } else if (house_health < 100) { if (house_health < 90) { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_8; - return 1; } else { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_9; - return 1; } - } else { - c->has_numeric_prefix = 1; - c->numeric_prefix = house_health; + } else { c->translation_key = TR_TOOLTIP_OVERLAY_HEALTH_10; - return 1; } } return 0;