Merge branch 'infrastructure_sharing-sx' into jgrpp

Conflicts:
	src/lang/english.txt
	src/saveload/extended_ver_sl.cpp
	src/saveload/extended_ver_sl.h
	src/signal.cpp
	src/table/settings.ini
	src/vehicle.cpp
This commit is contained in:
Jonathan G Rennison
2015-08-06 23:11:49 +01:00
34 changed files with 808 additions and 64 deletions

View File

@@ -28,6 +28,7 @@
#include "autoreplace_gui.h"
#include "group.h"
#include "order_backup.h"
#include "infrastructure_func.h"
#include "ship.h"
#include "newgrf.h"
#include "company_base.h"
@@ -439,7 +440,7 @@ CommandCost CmdRefitVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
Vehicle *front = v->First();
CommandCost ret = CheckOwnership(front->owner);
CommandCost ret = CheckVehicleControlAllowed(v);
if (ret.Failed()) return ret;
bool auto_refit = HasBit(p2, 6);
@@ -517,7 +518,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
Vehicle *v = Vehicle::GetIfValid(p1);
if (v == NULL || !v->IsPrimaryVehicle()) return CMD_ERROR;
CommandCost ret = CheckOwnership(v->owner);
CommandCost ret = CheckVehicleControlAllowed(v);
if (ret.Failed()) return ret;
if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_ERROR_VEHICLE_IS_DESTROYED);
@@ -679,7 +680,7 @@ CommandCost CmdDepotMassAutoReplace(TileIndex tile, DoCommandFlag flags, uint32
VehicleType vehicle_type = Extract<VehicleType, 0, 3>(p1);
if (!IsCompanyBuildableVehicleType(vehicle_type)) return CMD_ERROR;
if (!IsDepotTile(tile) || !IsTileOwner(tile, _current_company)) return CMD_ERROR;
if (!IsDepotTile(tile) || !IsInfraUsageAllowed(vehicle_type, _current_company, GetTileOwner(tile))) return CMD_ERROR;
/* Get the list of vehicles in the depot */
BuildDepotVehicleList(vehicle_type, tile, &list, &list, true);