Skip to content

Commit

Permalink
(station) Default to shelter-2 in demo layouts (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi authored Sep 11, 2024
1 parent 4f83f59 commit 2e0b8c1
Show file tree
Hide file tree
Showing 18 changed files with 234 additions and 118 deletions.
2 changes: 2 additions & 0 deletions docs/station/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Add snow and escalator graphics for station buildings.

Designate station tiles without platforms as waypoints.

Bugfix: station templates with shelter type 2 sometimes included wrong shelter graphics.

0.2.2 (2024-06-14)
--------------------
Further fix for the climate-aware groundsprites: they didn't work with custom track NewGRFs.
Expand Down
14 changes: 7 additions & 7 deletions station/stations/dovemere_2018_lib/demos/real_yard.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import named_tiles, platform_n, track
from station.stations.platforms import named_tiles as platform_tiles
from station.stations.dovemere_2018_lib.layouts import named_tiles, track
from station.stations.platforms import named_tiles as platform_tiles, cns_shelter_2
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour

Expand All @@ -11,7 +11,7 @@ def make_line(x, a, b, c, d):
return [x] * 3 + [a] + [b] * 3 + [c] + [d] * 4 + [c.R] + [b.R] * 3 + [a.R] + [x] * 3


c_n = make_line(platform_n, side_c_n, central_d, central_windowed_d, central_windowed_extender_d)
c_n = make_line(cns_shelter_2, side_c_shelter_2_n, central_d, central_windowed_d, central_windowed_extender_d)
c_f = [x.T for x in c_n]
c_empty = make_line(track, side_c_empty, central_d, central_windowed_d, central_windowed_extender_d)

Expand All @@ -24,11 +24,11 @@ def make_line(x, a, b, c, d):
c_empty,
c_empty,
c_n,
make_line(platform_n.T, side_b_f, central_d, central_windowed_d, central_windowed_extender_d),
make_line(platform_n, side_a_n, central_d, central_windowed_d, central_windowed_extender_d),
make_line(cns_shelter_2.T, side_b_shelter_2_f, central_d, central_windowed_d, central_windowed_extender_d),
make_line(cns_shelter_2, side_a_shelter_2_n, central_d, central_windowed_d, central_windowed_extender_d),
make_line(
platform_tiles.concourse_side_shelter_1.T,
corner_platform,
platform_tiles.concourse_side_shelter_2.T,
corner_shelter_2_platform,
front_normal_platform,
front_gate_platform,
front_gate_extender_platform,
Expand Down
15 changes: 8 additions & 7 deletions station/stations/dovemere_2018_lib/demos/semi_auto.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import platform_d, platform_n, concourse_tile
from station.stations.platforms import named_tiles as platform_tiles
from station.stations.dovemere_2018_lib.layouts import concourse_tile
from station.stations.platforms import named_tiles as platform_tiles, cns_shelter_2, cns_shelter_2_d
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour
from station.stations.dovemere_2018_lib.flexible_stations import semitraversable
from .utils import h_merge

nt = platform_tiles.concourse_side_shelter_1
nt = platform_tiles.concourse_side_shelter_2

row_3 = h_merge([semitraversable.demo_1(i, 3) for i in range(1, 5)], [[nt], [platform_d], [nt.T]])
row_3 = h_merge([semitraversable.demo_1(i, 3) for i in range(1, 5)], [[nt], [cns_shelter_2_d], [nt.T]])
v_sep = [[concourse_tile] * len(row_3[0])] * 2
row_4 = h_merge([semitraversable.demo_1(i, 4) for i in range(1, 5)], [[nt], [platform_n.T], [platform_n], [nt.T]])
row_4 = h_merge([semitraversable.demo_1(i, 4) for i in range(1, 5)], [[nt], [cns_shelter_2.T], [cns_shelter_2], [nt.T]])
row_5 = h_merge(
[semitraversable.demo_1(i, 5) for i in range(1, 5)], [[nt], [platform_d], [platform_d], [platform_d], [nt.T]]
[semitraversable.demo_1(i, 5) for i in range(1, 5)],
[[nt], [cns_shelter_2_d], [cns_shelter_2_d], [cns_shelter_2_d], [nt.T]],
)
row_6 = h_merge(
[semitraversable.demo_1(i, 6) for i in range(1, 5)],
[[nt], [platform_n.T], [platform_n], [platform_n.T], [platform_n], [nt.T]],
[[nt], [cns_shelter_2.T], [cns_shelter_2], [cns_shelter_2.T], [cns_shelter_2], [nt.T]],
)

semi_auto_demo = Demo(
Expand Down
19 changes: 14 additions & 5 deletions station/stations/dovemere_2018_lib/demos/semi_np_auto.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import platform_d, platform_n, concourse_tile
from station.stations.dovemere_2018_lib.layouts import concourse_tile
from station.stations.platforms import cns_shelter_2, cns_shelter_2_d
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour
from station.stations.dovemere_2018_lib.flexible_stations import semitraversable
from .utils import h_merge

row_4 = h_merge(
[semitraversable.demo_2(i, 4) for i in range(1, 5)],
[[concourse_tile], [platform_n], [platform_n.T], [concourse_tile]],
[[concourse_tile], [cns_shelter_2], [cns_shelter_2.T], [concourse_tile]],
)
v_sep = [[concourse_tile] * len(row_4[0])] * 2
row_5 = h_merge(
[semitraversable.demo_2(i, 5) for i in range(1, 5)],
[[concourse_tile], [platform_n], [platform_d], [platform_n.T], [concourse_tile]],
[[concourse_tile], [cns_shelter_2], [cns_shelter_2_d], [cns_shelter_2.T], [concourse_tile]],
)
row_6 = h_merge(
[semitraversable.demo_2(i, 6) for i in range(1, 5)],
[[concourse_tile], [platform_n], [platform_n.T], [platform_n], [platform_n.T], [concourse_tile]],
[[concourse_tile], [cns_shelter_2], [cns_shelter_2.T], [cns_shelter_2], [cns_shelter_2.T], [concourse_tile]],
)
row_7 = h_merge(
[semitraversable.demo_2(i, 7) for i in range(1, 5)],
[[concourse_tile], [platform_n], [platform_d], [platform_d], [platform_d], [platform_n.T], [concourse_tile]],
[
[concourse_tile],
[cns_shelter_2],
[cns_shelter_2_d],
[cns_shelter_2_d],
[cns_shelter_2_d],
[cns_shelter_2.T],
[concourse_tile],
],
)

semi_np_auto_demo = Demo(
Expand Down
16 changes: 8 additions & 8 deletions station/stations/dovemere_2018_lib/demos/side_auto.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import platform_n, concourse_tile
from station.stations.platforms import named_tiles as platform_tiles
from station.stations.dovemere_2018_lib.layouts import concourse_tile
from station.stations.platforms import named_tiles as platform_tiles, cns_shelter_2
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour
from station.stations.dovemere_2018_lib.flexible_stations import side
from .utils import h_merge

station_building = h_merge(
[side.side_station_demo(i, 1) for i in range(1, 5)], [[platform_tiles.concourse_side_shelter_1.T]]
[side.side_station_demo(i, 1) for i in range(1, 5)], [[platform_tiles.concourse_side_shelter_2.T]]
)[0]
n = len(station_building)
station_building_2 = h_merge(
[side.side_station_demo(i, 1) for i in [5, 7]], [[platform_tiles.concourse_side_shelter_1.T]]
[side.side_station_demo(i, 1) for i in [5, 7]], [[platform_tiles.concourse_side_shelter_2.T]]
)[0]
assert n == len(station_building_2)

side_auto_demo = Demo(
"Nontraversable automatic stations",
[
[x.T for x in station_building],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building,
[concourse_tile] * n,
[concourse_tile] * n,
[x.T for x in station_building_2],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building_2,
],
remap=get_1cc_remap(CompanyColour.BLUE),
Expand Down
11 changes: 6 additions & 5 deletions station/stations/dovemere_2018_lib/demos/side_np_auto.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import platform_n, concourse_tile
from station.stations.dovemere_2018_lib.layouts import concourse_tile
from station.stations.platforms import cns_shelter_2
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour
from station.stations.dovemere_2018_lib.flexible_stations import side
Expand All @@ -14,14 +15,14 @@
"Nontraversable automatic stations (no platform)",
[
[x.T for x in station_building],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building,
[concourse_tile] * n,
[concourse_tile] * n,
[x.T for x in station_building_2],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building_2,
],
remap=get_1cc_remap(CompanyColour.BLUE),
Expand Down
14 changes: 7 additions & 7 deletions station/stations/dovemere_2018_lib/demos/side_third_auto.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import platform_n, concourse_tile
from station.stations.platforms import named_tiles as platform_tiles
from station.stations.dovemere_2018_lib.layouts import concourse_tile
from station.stations.platforms import named_tiles as platform_tiles, cns_shelter_2
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour
from station.stations.dovemere_2018_lib.flexible_stations import side_third
from .utils import h_merge

platform_asym = platform_tiles.cns_side_and_shelter_1
platform_asym = platform_tiles.cns_side_and_shelter_2

station_building = h_merge([side_third.side_third_station_demo(i, 1) for i in range(1, 5)], [[platform_asym]])[0]
n = len(station_building)
Expand All @@ -17,14 +17,14 @@
"Traversable automatic stations",
[
[x.T for x in station_building],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building,
[concourse_tile] * n,
[concourse_tile] * n,
[x.T for x in station_building_2],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building_2,
],
remap=get_1cc_remap(CompanyColour.BLUE),
Expand Down
15 changes: 8 additions & 7 deletions station/stations/dovemere_2018_lib/demos/side_third_np_auto.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import platform_n, concourse_tile
from station.stations.dovemere_2018_lib.layouts import concourse_tile
from station.stations.platforms import cns_shelter_2
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour
from station.stations.dovemere_2018_lib.flexible_stations import side_third
from .utils import h_merge

station_building = h_merge([side_third.side_third_station_np_demo(i, 1) for i in range(1, 5)], [[platform_n]])[0]
station_building = h_merge([side_third.side_third_station_np_demo(i, 1) for i in range(1, 5)], [[cns_shelter_2]])[0]
n = len(station_building)
station_building_2 = h_merge([side_third.side_third_station_np_demo(i, 1) for i in [5, 7]], [[platform_n]])[0]
station_building_2 = h_merge([side_third.side_third_station_np_demo(i, 1) for i in [5, 7]], [[cns_shelter_2]])[0]
assert n == len(station_building_2)

side_third_np_auto_demo = Demo(
"Traversable automatic stations",
[
[x.T for x in station_building],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building,
[concourse_tile] * n,
[concourse_tile] * n,
[x.T for x in station_building_2],
[platform_n.T] * n,
[platform_n] * n,
[cns_shelter_2.T] * n,
[cns_shelter_2] * n,
station_building_2,
],
remap=get_1cc_remap(CompanyColour.BLUE),
Expand Down
33 changes: 17 additions & 16 deletions station/stations/dovemere_2018_lib/demos/special_aq.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import named_tiles, platform_d, platform_n
from station.stations.platforms import cns_shelter_2, cns_shelter_2_d
from station.stations.platforms import named_tiles as platform_tiles
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour

named_tiles.globalize()
nt = platform_tiles.concourse_side_shelter_1
nt = platform_tiles.concourse_side_shelter_2

rail_row = [nt.T.M, platform_n.M, platform_n.T.M, platform_d.M, platform_n.M, platform_n.T.M, nt.M]
rail_row = [nt.T.M, cns_shelter_2.M, cns_shelter_2.T.M, cns_shelter_2_d.M, cns_shelter_2.M, cns_shelter_2.T.M, nt.M]
top_building = [
corner_gate_platform.R.M,
side_a3_windowed_f.R.M,
side_a3_windowed_f.T.R.M,
side_a3_windowed_d.R.M,
side_a3_windowed_f.T.R.M,
side_a2_windowed_n.T.R.M,
corner_gate_platform.T.R.M,
corner_gate_shelter_2_platform.R.M,
side_a3_windowed_shelter_2_f.R.M,
side_a3_windowed_shelter_2_f.T.R.M,
side_a3_windowed_shelter_2_d.R.M,
side_a3_windowed_shelter_2_f.T.R.M,
side_a2_windowed_shelter_2_n.T.R.M,
corner_gate_shelter_2_platform.T.R.M,
]
bottom_building = [
corner_gate_platform.M,
side_a2_windowed_n.M,
side_a3_windowed_f.M,
side_a3_windowed_d.T.M,
side_a3_windowed_n.M,
side_a3_windowed_n.T.M,
corner_gate_platform.T.M,
corner_gate_shelter_2_platform.M,
side_a2_windowed_shelter_2_n.M,
side_a3_windowed_shelter_2_f.M,
side_a3_windowed_shelter_2_d.T.M,
side_a3_windowed_shelter_2_n.M,
side_a3_windowed_shelter_2_n.T.M,
corner_gate_shelter_2_platform.T.M,
]

special_demo_aq = Demo(
Expand Down
52 changes: 44 additions & 8 deletions station/stations/dovemere_2018_lib/demos/special_cp.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,58 @@
from station.lib import Demo
from station.stations.dovemere_2018_lib.layouts import named_tiles, platform_d, platform_n
from station.stations.platforms import concourse
from station.stations.platforms import (
cns_shelter_2_d,
cns_shelter_2,
concourse,
named_tiles as platform_shelter_2_tiles,
)
from station.stations.dovemere_2018_lib.layouts import named_tiles
from station.stations.misc import default
from station.stations.platforms import named_tiles as platform_tiles
from station.lib.utils import get_1cc_remap
from agrf.graphics.palette import CompanyColour

named_tiles.globalize()
nt = platform_tiles.concourse_side_shelter_1
nt = platform_shelter_2_tiles.concourse_side_shelter_2

special_demo_cp = Demo(
"Irregular 7×7 station layout",
[
[h_end_corridor, tee.T, h_normal_corridor, turn.T.R, default, default, default],
[platform_n, v_central_n, platform_n, v_central_n, platform_d, platform_d, platform_d],
[platform_n.T, v_central_n.T, platform_n.T, v_central_n.T, platform_d, platform_d, platform_d],
[platform_n, v_central_n, platform_n, v_central_n, corner.T, front_normal.T, corner.T.R],
[nt.T, v_end_platform, nt.T, turn, double_inner_corner, central_windowed_extender_d, side_a2_windowed_d.R],
[
cns_shelter_2,
v_central_shelter_2_n,
cns_shelter_2,
v_central_shelter_2_n,
cns_shelter_2_d,
cns_shelter_2_d,
cns_shelter_2_d,
],
[
cns_shelter_2.T,
v_central_shelter_2_n.T,
cns_shelter_2.T,
v_central_shelter_2_n.T,
cns_shelter_2_d,
cns_shelter_2_d,
cns_shelter_2_d,
],
[
cns_shelter_2,
v_central_shelter_2_n,
cns_shelter_2,
v_central_shelter_2_n,
corner.T,
front_normal.T,
corner.T.R,
],
[
nt.T,
v_end_shelter_2_platform,
nt.T,
turn,
double_inner_corner,
central_windowed_extender_d,
side_a2_windowed_shelter_2_d.R,
],
[concourse, concourse, concourse, concourse, v_funnel, front_normal, corner.R],
[default, default, default, default, v_end_gate, default, default],
],
Expand Down
Loading

0 comments on commit 2e0b8c1

Please sign in to comment.