mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
2 Commits
5869f790d8
...
7145b7060a
Author | SHA1 | Date |
---|---|---|
|
7145b7060a | |
|
c794676928 |
|
@ -179,7 +179,13 @@ class ReplaceVehicleWindow : public Window {
|
|||
if (side == 1 && eid == this->sel_engine[0]) flags |= EngineDisplayFlags::Shaded;
|
||||
list.emplace_back(eid, e->info.variant_id, flags, 0);
|
||||
|
||||
if (side == 1 && e->info.variant_id != INVALID_ENGINE) variants.push_back(e->info.variant_id);
|
||||
if (side == 1) {
|
||||
EngineID parent = e->info.variant_id;
|
||||
while (parent != INVALID_ENGINE) {
|
||||
variants.push_back(parent);
|
||||
parent = Engine::Get(parent)->info.variant_id;
|
||||
}
|
||||
}
|
||||
if (eid == this->sel_engine[side]) selected_engine = eid; // The selected engine is still in the list
|
||||
}
|
||||
|
||||
|
|
|
@ -1422,7 +1422,14 @@ struct BuildVehicleWindow : Window {
|
|||
list.emplace_back(eid, e->info.variant_id, e->display_flags, 0);
|
||||
|
||||
if (rvi->railveh_type != RAILVEH_WAGON) num_engines++;
|
||||
if (e->info.variant_id != INVALID_ENGINE) variants.push_back(e->info.variant_id);
|
||||
|
||||
/* Add all parent variants of this engine to the variant list */
|
||||
EngineID parent = e->info.variant_id;
|
||||
while (parent != INVALID_ENGINE) {
|
||||
variants.push_back(parent);
|
||||
parent = Engine::Get(parent)->info.variant_id;
|
||||
}
|
||||
|
||||
if (eid == this->sel_engine) sel_id = eid;
|
||||
}
|
||||
|
||||
|
@ -1563,8 +1570,13 @@ struct BuildVehicleWindow : Window {
|
|||
/* ensure primary engine of variant group is in list after filtering */
|
||||
std::vector<EngineID> variants;
|
||||
for (const auto &item : this->eng_list) {
|
||||
if (item.engine_id != item.variant_id && item.variant_id != INVALID_ENGINE) variants.push_back(item.variant_id);
|
||||
EngineID parent = item.variant_id;
|
||||
while (parent != INVALID_ENGINE) {
|
||||
variants.push_back(parent);
|
||||
parent = Engine::Get(parent)->info.variant_id;
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto &variant : variants) {
|
||||
if (std::find(this->eng_list.begin(), this->eng_list.end(), variant) == this->eng_list.end()) {
|
||||
const Engine *e = Engine::Get(variant);
|
||||
|
|
|
@ -3399,6 +3399,7 @@ STR_NEWGRF_INSPECT_PARENT_TOOLTIP :{BLACK}Analizea
|
|||
STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT :{STRING} la {HEX}
|
||||
STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT :Obiect
|
||||
STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE :Tip şină
|
||||
STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_ROAD_TYPE :Tip de drum
|
||||
|
||||
STR_NEWGRF_INSPECT_QUERY_CAPTION :{WHITE}Parametru variabilă 60+x NewGRF (hexadecimal)
|
||||
|
||||
|
@ -4717,6 +4718,8 @@ STR_AI_SETTINGS_SETTING :{STRING}: {ORAN
|
|||
STR_TEXTFILE_JUMPLIST :{WHITE}Cuprins
|
||||
STR_TEXTFILE_JUMPLIST_TOOLTIP :{BLACK}Săriți rapid la o secțiune din fișierul afișat prin această listă
|
||||
STR_TEXTFILE_JUMPLIST_ITEM :{WHITE}{STRING}
|
||||
STR_TEXTFILE_NAVBACK_TOOLTIP :{BLACK}Reveniți în istoricul navigației
|
||||
STR_TEXTFILE_NAVFORWARD_TOOLTIP :{BLACK}Reveniți înainte în istoricul navigației
|
||||
STR_TEXTFILE_WRAP_TEXT :{WHITE}Încadrează textul
|
||||
STR_TEXTFILE_WRAP_TEXT_TOOLTIP :{BLACK}Încadrează textul ferestrei ca să fie vizibil integral, fără derulare
|
||||
STR_TEXTFILE_VIEW_README :{BLACK}Vezi fișierul readme
|
||||
|
|
Loading…
Reference in New Issue