Project

General

Profile

Bug #1266 » 1266.patch

OK for all branches - Dean Brown, 07/30/2025 12:25 AM

View differences:

client/gui-qt/helpdlg.cpp
add_info_pixmap(&canvas->map_pixmap, true);
qtg_canvas_free(canvas);
QString str;
/* Cost to build */
str = N_("Build:");
str = "<b>" + str + "</b>" + " ";
if (pextra->buildable) {
if (pextra->build_time != 0) {
/* TRANS: "MP" = movement points */
str = str + QString::number(pextra->build_time).toHtmlEscaped()
+ _(" MP");
} else {
/* TRANS: Build time depends on terrain. */
str = str + _("Terrain specific");
}
add_info_label(str);
}
/* Conflicting extras */
str = N_("Conflicts with:");
str = "<b>" + str + "</b>" + " ";
bool is_resource = is_extra_caused_by(pextra, EC_RESOURCE);
if (is_resource) {
/* TRANS: (Resource extra) Conflicts with: */
str = str + _("Other Resources");
}
extra_type_iterate(pextra2) {
if (!can_extras_coexist(pextra, pextra2)
&& (!is_resource || !is_extra_caused_by(pextra2, EC_RESOURCE))) {
str = str + extra_name_translation(pextra2) + "/";
}
} extra_type_iterate_end;
if (str[str.length() - 1] == '/') {
str[str.length() - 1] = '\0';
} else if (! is_resource) {
str = str + _("(none)");
}
add_info_label(str);
/* Bonus for road type extras */
struct road_type *proad = extra_road_get(pextra);
if (proad != NULL) {
const char *bonus = NULL;
str = N_("Bonus (F/P/T):");
str = "<b>" + str + "</b>" + " ";
// cpp doesn't like the output_type_iterate() macro, gets -
// error: assigning to 'Output_type_id' (aka 'output_type_id')
// from incompatible type 'int'
// so do it the hard way
if ((proad->tile_incr[O_FOOD] > 0)
|| (proad->tile_incr[O_SHIELD] > 0)
|| (proad->tile_incr[O_TRADE] > 0)
|| (proad->tile_incr[O_GOLD] > 0)
|| (proad->tile_incr[O_LUXURY] > 0)
|| (proad->tile_incr[O_SCIENCE] > 0)) {
/* TRANS: Road bonus depends on terrain. */
bonus = _("Terrain specific");
}
if (!bonus) {
bonus = helptext_road_bonus_str(NULL, proad);
}
if (!bonus) {
/* TRANS: No output bonus from a road */
bonus = Q_("?bonus:None");
}
str = str + bonus;
add_info_label(str);
}
return false;
} else {
set_topic_other(topic, title);
(3-3/3)