summaryrefslogtreecommitdiff
path: root/src/economy_type.h
diff options
context:
space:
mode:
authorgooball <67861995+UnsuspiciousGooball@users.noreply.github.com>2020-12-28 22:54:28 +0100
committerGitHub <noreply@github.com>2020-12-28 22:54:28 +0100
commit0125892f041026d049dd9ce7e6d1a63ed5fd67eb (patch)
tree8d494094fc78b2a75acae550272ac1f3f36d2c69 /src/economy_type.h
parentb30c3f64981bdd0593ec9e028561fa06c9b611b5 (diff)
downloadopenttd-0125892f041026d049dd9ce7e6d1a63ed5fd67eb.tar.xz
Fix #8297: Infrastructure counters for road tunnels, bridges, depots … (#8454)
The previous fix 887e9481ff0e70df6bf93ce15a3899a03f124c50 only worked for roads and failed to consider a multiplier used for the infrastructure totals for tunnels/bridges. Also, depots and bus/truck stops are counted as 2 road pieces on creation but were only counted as 1 road piece on conversion because the function DiagDirToRoadBits() was used, which only ever returns single-piece road segments. Co-authored-by: A. S <admin-git@sotai.tk>
Diffstat (limited to 'src/economy_type.h')
-rw-r--r--src/economy_type.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/economy_type.h b/src/economy_type.h
index 3e9519506..85a1bbe4f 100644
--- a/src/economy_type.h
+++ b/src/economy_type.h
@@ -222,6 +222,10 @@ static const int INVALID_PRICE_MODIFIER = MIN_PRICE_MODIFIER - 1;
static const uint TUNNELBRIDGE_TRACKBIT_FACTOR = 4;
/** Multiplier for how many regular track bits a level crossing counts. */
static const uint LEVELCROSSING_TRACKBIT_FACTOR = 2;
+/** Multiplier for how many regular track bits a road depot counts. */
+static const uint ROAD_DEPOT_TRACKBIT_FACTOR = 2;
+/** Multiplier for how many regular track bits a bay stop counts. */
+static const uint ROAD_STOP_TRACKBIT_FACTOR = 2;
/** Multiplier for how many regular tiles a lock counts. */
static const uint LOCK_DEPOT_TILE_FACTOR = 2;