Skip to content

Commit ef29fb9

Browse files
committed
use the new icon composition system for AU
1 parent b63ea41 commit ef29fb9

File tree

17 files changed

+220
-2
lines changed

17 files changed

+220
-2
lines changed

features/signals_railway_signals.yaml

Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,102 @@ features:
10301030
- { tag: 'railway:signal:main', value: 'AU:LightRail:NSW:PI' }
10311031
- { tag: 'railway:signal:main:form', value: 'light' }
10321032

1033+
- description: Points Indicator
1034+
country: AU
1035+
exampleIcon: au/LightRail/signals/PI/straight
1036+
icon:
1037+
- match: 'railway:signal:minor:states'
1038+
cases:
1039+
- { exact: 'stop', value: 'au/LightRail/signals/PI/stop' }
1040+
position: bottom
1041+
1042+
- match: 'railway:signal:minor:states'
1043+
cases:
1044+
- { exact: 'stop_red', value: 'au/LightRail/signals/PI/stop_red' }
1045+
position: bottom
1046+
1047+
- match: 'railway:signal:minor:states'
1048+
cases:
1049+
- { exact: 'straight', value: 'au/LightRail/signals/PI/straight' }
1050+
position: bottom
1051+
1052+
- match: 'railway:signal:minor:states'
1053+
cases:
1054+
- { exact: 'right', value: 'au/LightRail/signals/PI/right' }
1055+
position: bottom
1056+
1057+
- match: 'railway:signal:minor:states'
1058+
cases:
1059+
- { exact: 'left', value: 'au/LightRail/signals/PI/left' }
1060+
position: bottom
1061+
tags:
1062+
- { tag: 'railway:signal:minor', value: 'AU:LightRail:PI' }
1063+
- { tag: 'railway:signal:minor:form', value: 'light' }
1064+
1065+
- description: Signal Operated Points Indicator
1066+
country: AU
1067+
exampleIcon: au/LightRail/signals/SPI/straight
1068+
icon:
1069+
- match: 'railway:signal:minor:states'
1070+
cases:
1071+
- { exact: 'locked', value: 'au/LightRail/signals/SPI/locked' }
1072+
position: bottom
1073+
1074+
- match: 'railway:signal:minor:states'
1075+
cases:
1076+
- { exact: 'straight', value: 'au/LightRail/signals/SPI/straight' }
1077+
position: bottom
1078+
1079+
- match: 'railway:signal:minor:states'
1080+
cases:
1081+
- { exact: 'right', value: 'au/LightRail/signals/SPI/right' }
1082+
position: bottom
1083+
1084+
- match: 'railway:signal:minor:states'
1085+
cases:
1086+
- { exact: 'left', value: 'au/LightRail/signals/SPI/left' }
1087+
position: bottom
1088+
tags:
1089+
- { tag: 'railway:signal:minor', value: 'AU:LightRail:SPI' }
1090+
- { tag: 'railway:signal:minor:form', value: 'light' }
1091+
1092+
- description: Signal System Lanterns
1093+
country: AU
1094+
exampleIcon: au/LightRail/signals/SI/straight
1095+
icon:
1096+
- match: 'railway:signal:main:states'
1097+
cases:
1098+
- { exact: 'stop', value: 'au/LightRail/signals/SI/stop' }
1099+
position: bottom
1100+
1101+
- match: 'railway:signal:main:states'
1102+
cases:
1103+
- { exact: 'straight', value: 'au/LightRail/signals/SI/straight' }
1104+
position: bottom
1105+
1106+
- match: 'railway:signal:main:states'
1107+
cases:
1108+
- { exact: 'right', value: 'au/LightRail/signals/SI/right' }
1109+
position: bottom
1110+
1111+
- match: 'railway:signal:main:states'
1112+
cases:
1113+
- { exact: 'left', value: 'au/LightRail/signals/SI/left' }
1114+
position: bottom
1115+
1116+
- match: 'railway:signal:main:states'
1117+
cases:
1118+
- { exact: 'error', value: 'au/LightRail/signals/SI/error' }
1119+
position: bottom
1120+
1121+
- match: 'railway:signal:main:states'
1122+
cases:
1123+
- { exact: 'warning', value: 'au/LightRail/signals/SI/warning' }
1124+
position: bottom
1125+
tags:
1126+
- { tag: 'railway:signal:main', value: 'AU:LightRail:SI' }
1127+
- { tag: 'railway:signal:main:form', value: 'light' }
1128+
10331129
# --- AU-NSW-signs --- #
10341130

10351131
- description: Alert
@@ -1177,16 +1273,44 @@ features:
11771273
- match: 'railway:signal:stop:states'
11781274
cases:
11791275
- { any: [ 'X', 'XPT', 'XPL' ], value: 'au/nsw/signs/stop_position/X' }
1276+
position: bottom
1277+
- match: 'railway:signal:stop:states'
1278+
cases:
11801279
- { exact: '10', value: 'au/nsw/signs/stop_position/10' }
1280+
position: bottom
1281+
- match: 'railway:signal:stop:states'
1282+
cases:
11811283
- { exact: '8', value: 'au/nsw/signs/stop_position/8' }
1284+
position: bottom
1285+
- match: 'railway:signal:stop:states'
1286+
cases:
11821287
- { exact: '8H', value: 'au/nsw/signs/stop_position/8H' }
1288+
position: bottom
1289+
- match: 'railway:signal:stop:states'
1290+
cases:
11831291
- { exact: '8V', value: 'au/nsw/signs/stop_position/8V' }
1292+
position: bottom
1293+
- match: 'railway:signal:stop:states'
1294+
cases:
11841295
- { exact: '6', value: 'au/nsw/signs/stop_position/6' }
1296+
position: bottom
1297+
- match: 'railway:signal:stop:states'
1298+
cases:
11851299
- { exact: '6V', value: 'au/nsw/signs/stop_position/6V' }
1300+
position: bottom
1301+
- match: 'railway:signal:stop:states'
1302+
cases:
11861303
- { exact: '4', value: 'au/nsw/signs/stop_position/4' }
1304+
position: bottom
1305+
- match: 'railway:signal:stop:states'
1306+
cases:
11871307
- { exact: '4V', value: 'au/nsw/signs/stop_position/4V' }
1308+
position: bottom
1309+
- match: 'railway:signal:stop:states'
1310+
cases:
11881311
- { exact: '2', value: 'au/nsw/signs/stop_position/2' }
1189-
default: 'au/nsw/signs/stop_position/unknown'
1312+
position: bottom
1313+
exampleIcon: 'au/nsw/signs/stop_position/unknown'
11901314
tags:
11911315
- { tag: 'railway:signal:stop', value: 'AU:NSW:stop_position' }
11921316
- { tag: 'railway:signal:stop:form', value: 'sign' }

proxy/js/features.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const requireUniqueEntries = array => {
2020
const count = Object.groupBy(array, it => it[0]);
2121
if (Object.values(count).some(it => it.length > 1)) {
2222
const offendingEntries = Object.entries(count).filter(it => it[1].length > 1).map(it => it[0]).join(', ');
23-
throw new Error(`entries must be unique, offending entries: ${offendingEntries}`);
23+
if (offendingEntries) {
24+
throw new Error(`entries must be unique, offending entries: ${offendingEntries}`);
25+
}
2426
}
2527
return Object.fromEntries(array);
2628
}
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)