mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-23 20:36:13 +02:00
feat(editor): labels for a layman, light at the start; whole sceneries fitted to the terrain model
Labels: - every button, field, tooltip and message of the editor reread for a beginner: short nouns for the fields with the sentence in the tooltip, the less used options under More settings, one glossary (field of work, template, track, grade), sides told from directions, degrees and per mille as signs, messages built from one format string - plural forms through STR_P; the last entry of a po file is read too, and the Polish plural rule is in the header - lang/editor_pl.po: the code pass entries merged, 391 entries no code uses and 3 duplicates dropped - roads: the notes and errors naming a road translated; the build options and the layout fold the texture length, kerb sizes, traffic share, roundabout part, height over the ground and junction speed limit under More settings, the lanes start folded Grade lines fitted to the terrain model (NMT), a line or the whole scenery at once: - fit_ground: a robust fit on nodes 5 m apart; the ground parting from the line (a bridge, a viaduct, a wall) is gone past rather than followed, the bends keep off the switches as far as their curves reach, a run of bends the same way is one point of intersection, a curve with no room is as sharp as the room lets it be - the ends of the line and the other paths of its switches leading into lines fitted already bound the line by what the tracks between can climb; ends meeting in the plan, laid apart in height by hand, are joined before the run - apply_profile: the paths are split where split_path takes the parameter (a straight was cut in the wrong place, into pieces of a few centimetres the game takes for zero length), no piece shorter than the margin; the paths off the ends of the route are brought to its height - Bytom: 1600 lines, grade breaks at the joints 89 -> 20; Tarnowskie Gory: 848 lines, 223 -> 3; no step over 2 cm
This commit is contained in:
@@ -104,13 +104,25 @@ char const *name(category const Category)
|
||||
case category::catenary: return "Catenary";
|
||||
case category::logic: return "Logic";
|
||||
case category::other: return "Other";
|
||||
case category::equipment: return "Track equipment";
|
||||
case category::environment: return "Surroundings";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
std::optional<category> category_named(std::string const &Category)
|
||||
{
|
||||
static std::map<std::string, category> const named{{"signal", category::signal}, {"sign", category::sign}, {"pole", category::pole}, {"catenary", category::catenary}, {"equipment", category::equipment}, {"environment", category::environment},
|
||||
{"switch drive", category::equipment}, {"turntable", category::equipment}, {"logic", category::logic}};
|
||||
auto const found{named.find(lower(Category))};
|
||||
if (found == named.end())
|
||||
return std::nullopt;
|
||||
return found->second;
|
||||
}
|
||||
|
||||
std::vector<category> const &categories()
|
||||
{
|
||||
static std::vector<category> const result{category::signal, category::sign, category::pole, category::catenary, category::logic, category::other};
|
||||
static std::vector<category> const result{category::signal, category::sign, category::pole, category::catenary, category::equipment, category::logic, category::environment, category::other};
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -261,9 +273,11 @@ std::vector<rule> default_rules()
|
||||
{
|
||||
return {
|
||||
{category::signal, "semafor sem_ sem- tarcza tarcz_ tz_ tm_ tzw powtarz sygnaliz sygnal signal"},
|
||||
{category::sign, "wskaz wsk_ wsk- w4 w8 w11 w24 w27 kilometr hektometr slupek_km znak tablic sign"},
|
||||
{category::equipment, "equipment rezonator shp przejazd plyty zwrotni zwrl zwrp wzm -wz_ 2-5-13/ 6-9-9/ 1435mm/ podsypk most wiadukt przepust cbp- kozio przejscie szafa"},
|
||||
{category::environment, "environment tree grass krzak plants/ posers/ drzew trawa las_ lawka plot_ wiata bud/ nastawni budyn lamp pojazdy/ peronowe/ kladka dworzec magazyn /dom reklama blok kwietnik"},
|
||||
{category::sign, "wskaz wsk_ wsk- w4 w8 w11 w24 w27 ip/pkp/w pkp/w /we kilometr hektometr hekt slhm slupek_km znak tablic napis sign"},
|
||||
{category::catenary, "trakcj siec_ siec- catenary przewod lina_nosna"},
|
||||
{category::pole, "slup maszt wysieg bramk konstrukcj kotw odciag pole gantry"},
|
||||
{category::pole, "slup maszt wysieg bramk konstrukcj kotw odciag stb1 sts1 zwis tra/sb tr/-p- tr/-l- pole gantry"},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user