diff options
| author | Y. Wang <y5nw@protonmail.com> | 2026-03-01 13:33:18 +0000 |
|---|---|---|
| committer | orwell <orwell@bleipb.de> | 2026-03-29 17:45:01 +0200 |
| commit | 31febe6fe193aa84a6ac4127e9f839cf6b5abc2b (patch) | |
| tree | 51692ab4c3603160d678791dccd9660d7aa5db56 /advtrains_line_automation/station_editor.lua | |
| parent | 7653bfcf71e4cec533fbd222c8236096d0130368 (diff) | |
Allow custom descriptions to fully override outside
The station editor allows specifying custom displays, but the custom
value is appended to the hardcoded built-in display. This in particular
prevents sensible use of the display feature provided by the Konstal
105N. It also prevents the user from specifying shorter strings for
displays with length limitation.
This patch adds a al.get_line_display function that returns
linevar_def.train_name (verbatim) if the value is present. The
train_name option from al.get_line_description is removed as this option
would no longer be compatible with other options.
= = =
This patchset sequentially removes (IMO questionable) features from
al.get_line_description.
Diffstat (limited to 'advtrains_line_automation/station_editor.lua')
| -rw-r--r-- | advtrains_line_automation/station_editor.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains_line_automation/station_editor.lua b/advtrains_line_automation/station_editor.lua index 0b20d45..fccc357 100644 --- a/advtrains_line_automation/station_editor.lua +++ b/advtrains_line_automation/station_editor.lua @@ -583,7 +583,7 @@ local function get_all_linevars() for linevar, linevar_def in pairs(stdata.linevars or empty_table) do local line, stn = advtrains.lines.linevar_decompose(linevar) local target_fs = F(advtrains.lines.get_line_description(linevar_def, {line_number = false, last_stop = true, last_stop_prefix = "", - last_stop_uppercase = false, train_name = false})) + last_stop_uppercase = false})) local status_fs if trains_by_linevar[linevar] ~= nil then status_fs = "#00ff00,"..S("in operation") @@ -613,7 +613,7 @@ end local function get_linevars_by_filter(stn_filter, track_filter) local result = {} local empty_table = {} - local line_description_options = {line_number = false, last_stop = true, last_stop_prefix = "", last_stop_uppercase = false, train_name = false} + local line_description_options = {line_number = false, last_stop = true, last_stop_prefix = "", last_stop_uppercase = false} local trains_by_linevar = advtrains.lines.get_trains_by_linevar() assert(stn_filter) if track_filter == "" then |
