summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-01-03 22:54:09 +0100
committerErich Eckner <git@eckner.net>2021-01-03 22:56:48 +0100
commit8b59f007c39b268c8c676ea698be5ade30b363ee (patch)
treeb48de832c057b803f48768c7f4b812b6c0aa82b4
parent50571c1935d0378cd5757cc1342be3fc7a8efcc3 (diff)
downloadarchlinuxewe-8b59f007c39b268c8c676ea698be5ade30b363ee.tar.xz
openttd-git: really fix chunnel.patch
-rw-r--r--openttd-git/PKGBUILD20
-rw-r--r--openttd-git/chunnel-pre.patch12
-rw-r--r--openttd-git/chunnel-signaltunnel-pre.patch22
-rw-r--r--openttd-git/chunnel-underground-pre.patch22
4 files changed, 55 insertions, 21 deletions
diff --git a/openttd-git/PKGBUILD b/openttd-git/PKGBUILD
index bd7a052c2..2f175d923 100644
--- a/openttd-git/PKGBUILD
+++ b/openttd-git/PKGBUILD
@@ -43,7 +43,8 @@ backup=()
options=()
source=(
"${pkgname}::git://github.com/OpenTTD/OpenTTD.git#commit=${_commit}"
- "chunnel-pre.patch"
+ "chunnel-signaltunnel-pre.patch"
+ "chunnel-underground-pre.patch"
"chunnel.patch"
"signaltunnel.patch"
"sloped-stations.patch"
@@ -51,7 +52,8 @@ source=(
'opntitle.dat'
)
sha512sums=('SKIP'
- 'fa238b9ea9a2d334bdabcbc667b87eae87748d510d6d2bb3308f5186b6b613b7a50623e42c075cd4261cfd4aa4a6822902d7d6536e1805a1ac00a6e885bc9ae7'
+ '26fa515d2706455f0f713ef8aab80fb2a52f665b54ae354d3feab2c25e194f80187125a28429a25ad86b58a2e902862aeb1ebae74e36d974ec78f4304df94b61'
+ '09200144aa4dd5beaf12787d175aa47226205427721c05f681730474a95a2d2f8692be63df568c622f78edf81347dec249d0926203be3aa6dd902ff93f7aa047'
'74283b8adb001a010aa05a8cee33b620371544e2909317f4c7156852e4ea440cdf8793dbe8957d646734ee309fdb5924915e0d967d78d43329ea4fc211e7e8ef'
'497f395320edff647dd58c53abc451f706db9934fc847c95ecbbb33d519f67fe94ecd913e13bd7d770320370ea088b675e6583e8b59b69e2d3ee587a62ad2261'
'11c87d30824bca5738e46c14422c622cdfe4d7e55a5b3a4fe5e77a0a14ceee742bfa8f6c0e8212e9b38c2a1d1db3a4f525c7a70a0b0ed03751dee2539d3da929'
@@ -70,6 +72,11 @@ pkgver() {
prepare() {
+ cd "${srcdir}"
+ cp chunnel.patch chunnel.pre.patch
+ patch -p1 -i "chunnel-signaltunnel-pre.patch"
+ patch -p1 -i "chunnel-underground-pre.patch"
+
cd "${srcdir}/${pkgname}"
cp "${srcdir}/opntitle.dat" media/baseset/
@@ -93,17 +100,12 @@ prepare() {
s,"\${CMAKE_SOURCE_DIR}/\.git","/dev/does/not/exist",
' cmake/scripts/FindVersion.cmake
-# for _p in "${srcdir}/"{signaltunnel,sloped-stations,underground,chunnel}.patch; do
- for _p in "${srcdir}/"{signaltunnel,underground}.patch; do
+# for _p in "${srcdir}/"{signaltunnel,sloped-stations,underground}.patch; do
+ for _p in "${srcdir}/"{signaltunnel,underground,chunnel.pre}.patch; do
>&2 echo "patching ${_p##*/} ..."
patch -p1 -i "${_p}"
>&2 echo "... ok"
done
- (
- cd "${srcdir}"
- patch -p2 -i "chunnel-pre.patch" -o -
- ) \
- | patch -p1
}
build() {
diff --git a/openttd-git/chunnel-pre.patch b/openttd-git/chunnel-pre.patch
deleted file mode 100644
index 9b42f5a93..000000000
--- a/openttd-git/chunnel-pre.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/openttd-git/chunnel.patch b/openttd-git/chunnel.patch
-index 33ab7405..6ad137ae 100644
---- a/openttd-git/chunnel.patch
-+++ b/openttd-git/chunnel.patch
-@@ -1018,6 +1018,7 @@ index e014944a9f..cb6239f597 100644
- const Vehicle *v = _vehicle_viewport_hash[x + y]; // already masked & 0xFFF
-
- while (v != nullptr) {
-+ if (LayerIndex(v->tile) == dpi->layer)
- - if (!(v->vehstatus & VS_HIDDEN) &&
- + if (v->IsDrawn() &&
- l <= v->coord.right &&
diff --git a/openttd-git/chunnel-signaltunnel-pre.patch b/openttd-git/chunnel-signaltunnel-pre.patch
new file mode 100644
index 000000000..572e40504
--- /dev/null
+++ b/openttd-git/chunnel-signaltunnel-pre.patch
@@ -0,0 +1,22 @@
+--- a/chunnel.pre.patch 2021-01-03 22:39:24.363263631 +0100
++++ b/chunnel.pre.patch 2021-01-03 22:39:24.363263631 +0100
+@@ -180,16 +180,17 @@
+ STR_TRANSPARENT_INVISIBLE_TOOLTIP :{BLACK}Set objects invisible instead of transparent
+
+ # Linkgraph legend window
+-@@ -2724,7 +2725,9 @@ STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT :Ship depot
++@@ -2724,8 +2725,10 @@ STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT :Ship depot
+ # Industries come directly from their industry names
+
+ STR_LAI_TUNNEL_DESCRIPTION_RAILROAD :Railway tunnel
+ +STR_LAI_TUNNEL_DESCRIPTION_RAILROAD_CHUNNEL :Railway tunnel (underwater)
++ STR_LAI_TUNNEL_DESCRIPTION_RAILROAD_SIGNAL :Railway tunnel with signal simulation
+ STR_LAI_TUNNEL_DESCRIPTION_ROAD :Road tunnel
+ +STR_LAI_TUNNEL_DESCRIPTION_ROAD_CHUNNEL :Road tunnel (underwater)
+
++ STR_LAI_BRIDGE_DESCRIPTION_RAILROAD_SIGNAL :Railway bridge with signal simulation
+ STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL :Steel suspension rail bridge
+- STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL :Steel girder rail bridge
+ @@ -4542,6 +4545,10 @@ STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY :{WHITE}Another
+ STR_ERROR_TUNNEL_THROUGH_MAP_BORDER :{WHITE}Tunnel would end out of the map
+ STR_ERROR_UNABLE_TO_EXCAVATE_LAND :{WHITE}Unable to excavate land for other end of tunnel
diff --git a/openttd-git/chunnel-underground-pre.patch b/openttd-git/chunnel-underground-pre.patch
new file mode 100644
index 000000000..4a055d66d
--- /dev/null
+++ b/openttd-git/chunnel-underground-pre.patch
@@ -0,0 +1,22 @@
+--- a/chunnel.pre.patch 2021-01-03 22:30:58.721115549 +0100
++++ b/chunnel.pre.patch 2021-01-03 22:30:58.721115549 +0100
+@@ -790,7 +790,7 @@
+ Slope end_tileh;
+ for (;;) {
+ @@ -672,13 +675,69 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
+- if (!IsValidTile(end_tile)) return_cmd_error(STR_ERROR_TUNNEL_THROUGH_MAP_BORDER);
++
+ end_tileh = GetTileSlope(end_tile, &end_z);
+
+ - if (start_z == end_z) break;
+@@ -1015,9 +1015,9 @@
+ if (v->type == VEH_EFFECT) {
+ /* Check whether the vehicle shall be transparent/invisible due to GUI settings.
+ @@ -1139,7 +1147,7 @@ void ViewportAddVehicles(DrawPixelInfo *dpi)
+- const Vehicle *v = _vehicle_viewport_hash[x + y]; // already masked & 0xFFF
+
+ while (v != nullptr) {
++ if (LayerIndex(v->tile) == dpi->layer)
+ - if (!(v->vehstatus & VS_HIDDEN) &&
+ + if (v->IsDrawn() &&
+ l <= v->coord.right &&