summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorPavel Stupnikov <dp@dpointer.org>2020-12-22 16:29:48 +0300
committerGitHub <noreply@github.com>2020-12-22 14:29:48 +0100
commit9a45a0f535e312cd97db12c3a2ec1068fa381136 (patch)
treeeb4f235933ea178c370c04c9b12cd00b005f4644 /src/economy.cpp
parentb7751c483e5545aa683baf0b9f09a0add34cfefd (diff)
downloadopenttd-9a45a0f535e312cd97db12c3a2ec1068fa381136.tar.xz
Feature: Set exclusive access to industry from GS (#8115)
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 7c801e854..5e53334a0 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1042,6 +1042,8 @@ static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint n
/* Check if industry temporarily refuses acceptance */
if (IndustryTemporarilyRefusesCargo(ind, cargo_type)) continue;
+ if (ind->exclusive_supplier != INVALID_OWNER && ind->exclusive_supplier != st->owner) continue;
+
/* Insert the industry into _cargo_delivery_destinations, if not yet contained */
include(_cargo_delivery_destinations, ind);