Skip to content

Commit

Permalink
adding devolve text
Browse files Browse the repository at this point in the history
  • Loading branch information
dvincent56 committed Feb 10, 2024
1 parent 622be8d commit 13957e2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/building/house_evolution.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ void building_house_determine_evolve_text(building *house, int worst_desirabilit
house->data.house.evolve_text_id = 1;
return;
} else if (!house->has_latrines_access) {
house->data.house.evolve_text_id = 67;
house->data.house.evolve_text_id = 68;
return;
}
}
Expand Down Expand Up @@ -780,7 +780,7 @@ void building_house_determine_evolve_text(building *house, int worst_desirabilit
house->data.house.evolve_text_id = 31;
return;
} else if (!house->has_latrines_access) {
house->data.house.evolve_text_id = 67;
house->data.house.evolve_text_id = 68;
return;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/translation/english.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,8 @@ static translation_string all_strings[] = {
{TR_BUILDING_LATRINES, "Latrines"},
{TR_BUILDING_LATRINES_DESC_1, "A place of comfort appreciated by the population to talk about the news of the day or their business."},
{TR_BUILDING_LATRINES_DESC_2, "Latrines are used by citizens having only access to a well, and help to slightly improve the housing and health levels. Houses in range of a fountain won't make use of public latrines."},
{TR_BUILDING_LATRINES_MISSING, "This house cannot evolve, as it does not have access to a latrine or a clean water supply from a fountain."},
{TR_BUILDING_LATRINES_MISSING_EVOLVE, "This house cannot evolve, as it does not have access to a latrine or a clean water supply from a fountain."},
{TR_BUILDING_LATRINES_MISSING_DEVOLVE, "This house will devolve soon, as it does not have access to a latrine or a clean water from a fountain."},
{TR_BUILDING_LATRINES_NO_WORKERS, "Without employees to maintain the latrines, citizens avoid coming to relax there."}
};

Expand Down
3 changes: 2 additions & 1 deletion src/translation/french.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,8 @@ static translation_string all_strings[] = {
{TR_BUILDING_LATRINES, "Latrines"},
{TR_BUILDING_LATRINES_DESC_1, "Lieu d'aisance apprécié de la population pour parler des nouvelles du jour ou de leurs affaires."},
{TR_BUILDING_LATRINES_DESC_2, "Les latrines sont utilisées par les citoyens n'ayant accès qu'à un puits, et améliorent légèrement le rang de logement et l'hygiène. Les maisons avec accès à une fontaine ne feront pas usage des latrines publiques."},
{TR_BUILDING_LATRINES_MISSING, "Cette maison ne peut pas évoluer, car elle n'a pas accès à des latrines ou à l'eau propre d'une fontaine."},
{TR_BUILDING_LATRINES_MISSING_EVOLVE, "Cette maison ne peut pas évoluer, car elle n'a pas accès à des latrines ou à l'eau propre d'une fontaine."},
{TR_BUILDING_LATRINES_MISSING_DEVOLVE, "Cette maison va bientôt régresser, car elle n'a pas accès à des latrines ou à l'eau propre d'une fontaine."},
{TR_BUILDING_LATRINES_NO_WORKERS, "Sans employés pour entretenir les latrines, les citoyens évitent de venir s'y relaxer."}
};

Expand Down
3 changes: 2 additions & 1 deletion src/translation/translation.h
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,8 @@ typedef enum {
TR_BUILDING_LATRINES,
TR_BUILDING_LATRINES_DESC_1,
TR_BUILDING_LATRINES_DESC_2,
TR_BUILDING_LATRINES_MISSING,
TR_BUILDING_LATRINES_MISSING_EVOLVE,
TR_BUILDING_LATRINES_MISSING_DEVOLVE,
TR_BUILDING_LATRINES_NO_WORKERS,
TRANSLATION_MAX_KEY
} translation_key;
Expand Down
7 changes: 5 additions & 2 deletions src/window/building/house.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,11 @@ void window_building_draw_house(building_info_context *c)
text_draw((uint8_t *) ")", c->x_offset + 32 + width, c->y_offset + 60, FONT_NORMAL_BLACK, 0);
lang_text_draw_multiline(127, 41 + b->data.house.evolve_text_id,
c->x_offset + 32, c->y_offset + 76, BLOCK_SIZE * (c->width_blocks - 4), FONT_NORMAL_BLACK);
} else if (b->data.house.evolve_text_id == 67) { // latrine evolve
lang_text_draw_multiline(CUSTOM_TRANSLATION, TR_BUILDING_LATRINES_MISSING,
} else if (b->data.house.evolve_text_id == 67) { // latrine devolve
lang_text_draw_multiline(CUSTOM_TRANSLATION, TR_BUILDING_LATRINES_MISSING_DEVOLVE,
c->x_offset + 32, c->y_offset + 70, BLOCK_SIZE * (c->width_blocks - 4), FONT_NORMAL_BLACK);
} else if (b->data.house.evolve_text_id == 68) { // latrine evolve
lang_text_draw_multiline(CUSTOM_TRANSLATION, TR_BUILDING_LATRINES_MISSING_EVOLVE,
c->x_offset + 32, c->y_offset + 70, BLOCK_SIZE * (c->width_blocks - 4), FONT_NORMAL_BLACK);
} else {
lang_text_draw_multiline(127, 40 + b->data.house.evolve_text_id,
Expand Down

0 comments on commit 13957e2

Please sign in to comment.