diff options
Diffstat (limited to 'src/script/api/script_bridge.cpp')
-rw-r--r-- | src/script/api/script_bridge.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/api/script_bridge.cpp b/src/script/api/script_bridge.cpp index da74712cc..c2cbfcde0 100644 --- a/src/script/api/script_bridge.cpp +++ b/src/script/api/script_bridge.cpp @@ -17,6 +17,7 @@ #include "../../strings_func.h" #include "../../economy_func.h" #include "../../date_func.h" +#include "../../company_func.h" /* static */ bool ScriptBridge::IsValidBridge(BridgeID bridge_id) { @@ -74,6 +75,7 @@ static void _DoCommandReturnBuildBridge1(class ScriptInstance *instance) EnforcePrecondition(false, TileX(start) == TileX(end) || TileY(start) == TileY(end)); EnforcePrecondition(false, vehicle_type == ScriptVehicle::VT_ROAD || vehicle_type == ScriptVehicle::VT_RAIL || vehicle_type == ScriptVehicle::VT_WATER); EnforcePrecondition(false, vehicle_type != ScriptVehicle::VT_RAIL || ScriptRail::IsRailTypeAvailable(ScriptRail::GetCurrentRailType())); + EnforcePrecondition(false, _current_company != OWNER_DEITY || vehicle_type == ScriptVehicle::VT_ROAD); uint type = 0; switch (vehicle_type) { |