summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-03-29 12:35:56 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-03-29 12:35:56 +0100
commit3fd3f93c92bc38650eb0653b5cf5c707a5dae747 (patch)
tree1361cb598c3adff157a7853eff23296032f9e862 /bin
parent1e4083c05a5b317ddfa1232b76eb5eafc1d29e2b (diff)
Wagon: add is_closed accessor
Diffstat (limited to 'bin')
-rwxr-xr-xbin/db-wagenreihung8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/db-wagenreihung b/bin/db-wagenreihung
index 637044a..73bbdb4 100755
--- a/bin/db-wagenreihung
+++ b/bin/db-wagenreihung
@@ -116,6 +116,10 @@ for my $wagon ( $wr->wagons ) {
my $wagon_desc = $wagon->number || '?';
+ if ( $wagon->is_closed ) {
+ $wagon_desc = 'X';
+ }
+
if ( $wagon->is_locomotive or $wagon->is_powercar ) {
$wagon_desc = ' ■ ';
}
@@ -150,8 +154,8 @@ say "";
for my $wagon ( $wr->wagons ) {
printf(
"%3s: %3s %10s %s\n",
- $wagon->number || '?',
- $wagon->model || '???',
+ $wagon->is_closed ? 'X' : ( $wagon->number || '?' ),
+ $wagon->model || '???',
$wagon->type, join( q{ }, $wagon->attributes )
);
}