diff --git a/common/effects.cpp b/common/effects.cpp index bb54a9f954..c43c174742 100644 --- a/common/effects.cpp +++ b/common/effects.cpp @@ -1167,8 +1167,10 @@ QString effect_type_unit_text(effect_type type, int value) float factor = 1.0f + value / 1000.0f; return QString(PL_("**%1", "**%1", factor)).arg(factor); } - case EFT_OUTPUT_WASTE_BY_DISTANCE: - return QString(PL_("%1%/tile", "%1%/tile", value)).arg(value); + case EFT_OUTPUT_WASTE_BY_DISTANCE: { + float waste = value / 100.0f; + return QString(PL_("%1%/tile", "%1%/tile", waste)).arg(waste); + } case EFT_CITY_BUILD_SLOTS: return QString(PL_("%1 slot", "%1 slots", value)).arg(value); case EFT_MAX_TRADE_ROUTES: diff --git a/common/helpdata.cpp b/common/helpdata.cpp index d5652b2ac5..c1a272a390 100644 --- a/common/helpdata.cpp +++ b/common/helpdata.cpp @@ -1004,7 +1004,9 @@ void boot_help_texts(const nation_set *nations_to_show, } multipliers_iterate_end; break; - case HELP_EFFECT: + case HELP_EFFECT: { + std::list effect_help; + for (int i = 0; i < EFT_COUNT; ++i) { auto effects = get_effects(static_cast(i)); if (effect_list_size(effects) > 0) { @@ -1034,10 +1036,16 @@ void boot_help_texts(const nation_set *nations_to_show, effect_list_iterate_end; pitem->text = qstrdup(qUtf8Printable(all_text)); - help_nodes->append(pitem); + effect_help.push_back(pitem); } } + + effect_help.sort(help_item_compar); + for (auto pitem : effect_help) { + help_nodes->append(pitem); + } break; + } default: qCritical("Bad current_type: %d.", current_type); break;