Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Text display of param values #924

Merged
merged 4 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/core/lang.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "building/type.h"
#include "core/lang.h"

#include "building/building.h"
#include "core/buffer.h"
#include "core/file.h"
#include "core/io.h"
Expand Down Expand Up @@ -551,6 +551,16 @@ const uint8_t *lang_get_string(int group, int index)
return str;
}

const uint8_t *lang_get_building_type_string(int type)
{
if (building_is_house(type) || type == BUILDING_NATIVE_HUT ||
type == BUILDING_NATIVE_MEETING || type == BUILDING_NATIVE_CROPS) {
return lang_get_string(41, type);
} else {
return lang_get_string(28, type);
}
}

const lang_message *lang_get_message(int id)
{
return &data.message_entries[id];
Expand Down
7 changes: 7 additions & 0 deletions src/core/lang.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ void load_augustus_messages(void);
*/
const uint8_t *lang_get_string(int group, int index);

/**
* Gets a localized string for a building type
* @param type The building type to get the display string of
* @return String
*/
const uint8_t *lang_get_building_type_string(int type);

/**
* Gets the message for the specified ID
* @param id ID of the message
Expand Down
131 changes: 110 additions & 21 deletions src/scenario/scenario_events_parameter_data.c

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/scenario/scenario_events_parameter_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,7 @@ int scenario_events_parameter_data_get_mappings_size(parameter_type type);

int scenario_events_parameter_data_get_default_value_for_parameter(xml_data_attribute_t *attribute_data);

const uint8_t *scenario_events_parameter_data_get_display_string(special_attribute_mapping_t *entry);
void scenario_events_parameter_data_get_display_string_for_value(parameter_type type, int value, uint8_t *result_text, int maxlength);

#endif // SCENARIO_EVENTS_PARAMETER_DATA_H
12 changes: 12 additions & 0 deletions src/translation/english.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@ static translation_string all_strings[] = {
{TR_PARAMETER_SET_BUY_PRICE, "Set buy price?"},
{TR_PARAMETER_CHECK_FOR_OPEN, "Check for route being open?"},
{TR_PARAMETER_RESPECT_SETTINGS, "Respect storage settings?"},
{TR_PARAMETER_TYPE_CUSTOM_MESSAGE, "Custom message"},
{TR_PARAMETER_TYPE_CUSTOM_VARIABLE, "Custom variable"},
{TR_PARAMETER_TYPE_RATING_TYPE, "Rating type"},
{TR_PARAMETER_TYPE_STORAGE_TYPE, "Storage type"},
Expand Down Expand Up @@ -1143,6 +1144,17 @@ static translation_string all_strings[] = {
{TR_PARAMETER_VALUE_BUILDING_MENU_PARKS, "All decorative parks"},
{TR_PARAMETER_VALUE_BUILDING_MENU_SMALL_TEMPLES, "All small temples"},
{TR_PARAMETER_VALUE_BUILDING_MENU_LARGE_TEMPLES, "All large temples"},
{TR_PARAMETER_VALUE_BUILDING_NATIVE_CROPS, "Native crops"},
{TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_CERES, "Small Ceres temple"},
{TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_NEPTUNE, "Small Neptune temple"},
{TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_MERCURY, "Small Mercury temple"},
{TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_MARS, "Small Mars temple"},
{TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_VENUS, "Small Venus temple"},
{TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_CERES, "Large Ceres temple"},
{TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_NEPTUNE, "Large Neptune temple"},
{TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_MERCURY, "Large Mercury temple"},
{TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_MARS, "Large Mars temple"},
{TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_VENUS, "Large Venus temple"},
{TR_PARAMETER_VALUE_DYNAMIC_RESOLVE, "..."},
{TR_PARAMETER_VALUE_NONE, "None"},
{TR_PARAMETER_VALUE_MESSAGE_CITY_IN_DEBT, "City in debt"},
Expand Down
12 changes: 12 additions & 0 deletions src/translation/translation.h
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ typedef enum {
TR_PARAMETER_SET_BUY_PRICE,
TR_PARAMETER_CHECK_FOR_OPEN,
TR_PARAMETER_RESPECT_SETTINGS,
TR_PARAMETER_TYPE_CUSTOM_MESSAGE,
TR_PARAMETER_TYPE_CUSTOM_VARIABLE,
TR_PARAMETER_TYPE_RATING_TYPE,
TR_CONDITION_TYPE_TIME_PASSED,
Expand Down Expand Up @@ -1137,6 +1138,17 @@ typedef enum {
TR_PARAMETER_VALUE_BUILDING_MENU_PARKS,
TR_PARAMETER_VALUE_BUILDING_MENU_SMALL_TEMPLES,
TR_PARAMETER_VALUE_BUILDING_MENU_LARGE_TEMPLES,
TR_PARAMETER_VALUE_BUILDING_NATIVE_CROPS,
TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_CERES,
TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_NEPTUNE,
TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_MERCURY,
TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_MARS,
TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_VENUS,
TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_CERES,
TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_NEPTUNE,
TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_MERCURY,
TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_MARS,
TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_VENUS,
TR_PARAMETER_VALUE_DYNAMIC_RESOLVE,
TR_PARAMETER_VALUE_NONE,
TR_PARAMETER_VALUE_MESSAGE_CITY_IN_DEBT,
Expand Down
71 changes: 52 additions & 19 deletions src/window/editor/scenario_action_edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
#include "window/select_list.h"

#define BUTTON_LEFT_PADDING 32
#define BUTTON_WIDTH 320
#define BUTTON_WIDTH 608
#define DETAILS_Y_OFFSET 128
#define DETAILS_ROW_HEIGHT 32
#define MAX_TEXT_LENGTH 50

static void init(scenario_action_t *action);
static void button_amount(int param1, int param2);
Expand Down Expand Up @@ -55,10 +56,19 @@ static struct {
int parameter_being_edited;
int parameter_being_edited_current_value;

uint8_t display_text[MAX_TEXT_LENGTH];

scenario_action_t *action;
scenario_action_data_t *xml_info;
} data;

static uint8_t *translation_for_param_value(parameter_type type, int value)
{
memset(data.display_text, 0, MAX_TEXT_LENGTH);
scenario_events_parameter_data_get_display_string_for_value(type, value, data.display_text, MAX_TEXT_LENGTH);
return data.display_text;
}

static void init(scenario_action_t *action)
{
data.action = action;
Expand All @@ -74,7 +84,7 @@ static void draw_foreground(void)
{
graphics_in_dialog();

outer_panel_draw(16, 16, 24, 24);
outer_panel_draw(0, 0, 42, 24);

for (int i = 5; i <= 6; i++) {
large_label_draw(buttons[i].x, buttons[i].y, buttons[i].width / 16, data.focus_button_id == i + 1 ? 1 : 0);
Expand All @@ -84,42 +94,65 @@ static void draw_foreground(void)

text_draw_centered(translation_for(data.xml_info->xml_attr.key), 32, 72, BUTTON_WIDTH, FONT_NORMAL_GREEN, COLOR_MASK_NONE);

int y_offset = DETAILS_Y_OFFSET;
int button_id = 0;
if (data.xml_info->xml_parm1.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm1.key), data.action->parameter1, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm1.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm1.type, data.action->parameter1),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm2.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm2.key), data.action->parameter2, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm2.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm2.type, data.action->parameter2),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm3.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm3.key), data.action->parameter3, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm3.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm3.type, data.action->parameter3),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm4.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm4.key), data.action->parameter4, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm4.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm4.type, data.action->parameter4),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm5.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm5.key), data.action->parameter5, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm5.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm5.type, data.action->parameter5),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

lang_text_draw_centered(13, 3, 32, 32 + 16 * 20, BUTTON_WIDTH, FONT_NORMAL_BLACK);

Expand Down
71 changes: 52 additions & 19 deletions src/window/editor/scenario_condition_edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
#include "window/select_list.h"

#define BUTTON_LEFT_PADDING 32
#define BUTTON_WIDTH 320
#define BUTTON_WIDTH 608
#define DETAILS_Y_OFFSET 128
#define DETAILS_ROW_HEIGHT 32
#define MAX_TEXT_LENGTH 50

static void init(scenario_condition_t *condition);
static void button_amount(int param1, int param2);
Expand Down Expand Up @@ -55,10 +56,19 @@ static struct {
int parameter_being_edited;
int parameter_being_edited_current_value;

uint8_t display_text[MAX_TEXT_LENGTH];

scenario_condition_t *condition;
scenario_condition_data_t *xml_info;
} data;

static uint8_t *translation_for_param_value(parameter_type type, int value)
{
memset(data.display_text, 0, MAX_TEXT_LENGTH);
scenario_events_parameter_data_get_display_string_for_value(type, value, data.display_text, MAX_TEXT_LENGTH);
return data.display_text;
}

static void init(scenario_condition_t *condition)
{
data.condition = condition;
Expand All @@ -74,7 +84,7 @@ static void draw_foreground(void)
{
graphics_in_dialog();

outer_panel_draw(16, 16, 24, 24);
outer_panel_draw(0, 0, 42, 24);

for (int i = 5; i <= 6; i++) {
large_label_draw(buttons[i].x, buttons[i].y, buttons[i].width / 16, data.focus_button_id == i + 1 ? 1 : 0);
Expand All @@ -84,42 +94,65 @@ static void draw_foreground(void)

text_draw_centered(translation_for(data.xml_info->xml_attr.key), 32, 72, BUTTON_WIDTH, FONT_NORMAL_GREEN, COLOR_MASK_NONE);

int y_offset = DETAILS_Y_OFFSET;
int button_id = 0;
if (data.xml_info->xml_parm1.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm1.key), data.condition->parameter1, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm1.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm1.type, data.condition->parameter1),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm2.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm2.key), data.condition->parameter2, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm2.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm2.type, data.condition->parameter2),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm3.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm3.key), data.condition->parameter3, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm3.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm3.type, data.condition->parameter3),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm4.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm4.key), data.condition->parameter4, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm4.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm4.type, data.condition->parameter4),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

if (data.xml_info->xml_parm5.type > PARAMETER_TYPE_UNDEFINED) {
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16, data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_label_and_number(translation_for(data.xml_info->xml_parm5.key), data.condition->parameter5, "", 64, y_offset + 8, FONT_NORMAL_GREEN, COLOR_MASK_NONE);
large_label_draw(buttons[button_id].x, buttons[button_id].y, buttons[button_id].width / 16,
data.focus_button_id == button_id + 1 ? 1 : 0);
text_draw_centered(translation_for(data.xml_info->xml_parm5.key),
buttons[button_id].x, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
text_draw_centered(translation_for_param_value(data.xml_info->xml_parm5.type, data.condition->parameter5),
buttons[button_id].x + BUTTON_WIDTH / 2, buttons[button_id].y + 8, buttons[button_id].width / 2,
FONT_NORMAL_GREEN, COLOR_MASK_NONE);
}
y_offset += DETAILS_ROW_HEIGHT;
button_id++;

lang_text_draw_centered(13, 3, 32, 32 + 16 * 20, BUTTON_WIDTH, FONT_NORMAL_BLACK);

Expand Down
2 changes: 1 addition & 1 deletion src/window/editor/scenario_event_details.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static void draw_foreground(void)
{
graphics_in_dialog();

outer_panel_draw(16, 16, 42, 37);
outer_panel_draw(0, 0, 42, 38);

for (int i = 0; i < 4; i++) {
large_label_draw(buttons[i].x, buttons[i].y, buttons[i].width / 16, data.focus_button_id == i + 1 ? 1 : 0);
Expand Down
2 changes: 1 addition & 1 deletion src/window/editor/select_special_attribute_mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static const uint8_t *get_display_string(special_attribute_mapping_t *entry)
case PARAMETER_TYPE_BUILDING:
case PARAMETER_TYPE_BUILDING_COUNTING:
if (entry->key == TR_PARAMETER_VALUE_DYNAMIC_RESOLVE) {
return lang_get_string(28, entry->value);
return lang_get_building_type_string(entry->value);
} else {
return translation_for(entry->key);
}
Expand Down
Loading