Update to 1.10.1

This commit is contained in:
dP
2020-04-14 00:16:48 +03:00
parent d01b776e2d
commit 6f9defb6a5
15 changed files with 44 additions and 30 deletions

View File

@@ -169,7 +169,7 @@ CargoArray GetCapacityOfArticulatedParts(EngineID engine)
* @param cargo_type Selected refitted cargo type
* @param cargo_capacity Capacity of selected refitted cargo type
*/
void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits, CargoID cargo_type, uint16 cargo_capacity)
void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits, CargoID cargo_type, uint cargo_capacity)
{
cargoes->Clear();
*refits = 0;

View File

@@ -24,7 +24,7 @@ extern const uint8 _engine_offsets[4];
bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company);
bool IsEngineRefittable(EngineID engine);
void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits, CargoID cargo_type, uint16 cargo_capacity);
void GetArticulatedVehicleCargoesAndRefits(EngineID engine, CargoArray *cargoes, CargoTypes *refits, CargoID cargo_type, uint cargo_capacity);
void SetYearEngineAgingStops();
void StartupOneEngine(Engine *e, Date aging_date);

View File

@@ -244,7 +244,7 @@ CommandCost CmdSetGoalCompleted(TileIndex tile, DoCommandFlag flags, uint32 p1,
*/
CommandCost CmdGoalQuestion(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
uint16 uniqueid = (GoalType)GB(p1, 0, 16);
uint16 uniqueid = (uint16)GB(p1, 0, 16);
CompanyID company = (CompanyID)GB(p1, 16, 8);
ClientID client = (ClientID)GB(p1, 16, 16);

View File

@@ -74,18 +74,23 @@ enum NetworkPasswordType {
NETWORK_COMPANY_PASSWORD, ///< The password of the company.
};
/** Destination of our chat messages. */
/**
* Destination of our chat messages.
* @warning The values of the enum items are part of the admin network API. Only append at the end.
*/
enum DestType {
DESTTYPE_BROADCAST, ///< Send message/notice to all clients (All)
DESTTYPE_TEAM, ///< Send message/notice to everyone playing the same company (Team)
DESTTYPE_CLIENT, ///< Send message/notice to only a certain client (Private)
};
/** Actions that can be used for NetworkTextMessage */
/**
* Actions that can be used for NetworkTextMessage.
* @warning The values of the enum items are part of the admin network API. Only append at the end.
*/
enum NetworkAction {
NETWORK_ACTION_JOIN,
NETWORK_ACTION_LEAVE,
NETWORK_ACTION_KICKED,
NETWORK_ACTION_SERVER_MESSAGE,
NETWORK_ACTION_CHAT,
NETWORK_ACTION_CHAT_COMPANY,
@@ -95,9 +100,13 @@ enum NetworkAction {
NETWORK_ACTION_COMPANY_SPECTATOR,
NETWORK_ACTION_COMPANY_JOIN,
NETWORK_ACTION_COMPANY_NEW,
NETWORK_ACTION_KICKED,
};
/** The error codes we send around in the protocols. */
/**
* The error codes we send around in the protocols.
* @warning The values of the enum items are part of the admin network API. Only append at the end.
*/
enum NetworkErrorCode {
NETWORK_ERROR_GENERAL, // Try to use this one like never

View File

@@ -35,7 +35,7 @@ bool IsReleasedVersion()
*
* <modified> shows a "M", if the binary is made from modified source code.
*/
const char _openttd_revision[] = "1.10.0";
const char _openttd_revision[] = "1.10.1";
/**
* The text version of OpenTTD's build date.
@@ -48,7 +48,7 @@ const char _openttd_build_date[] = __DATE__ " " __TIME__;
/**
* The git revision hash of this version.
*/
const char _openttd_revision_hash[] = "c8cd5f7f3ad26dc34cfceae50ae33c897b8c2cf6";
const char _openttd_revision_hash[] = "7f77b8c1e27f3d102b1f665d2a3c500598245c3b";
/**
* Let us know if current build was modified. This detection

View File

@@ -305,17 +305,6 @@ struct BuildRoadToolbarWindow : Window {
if (!gui_scope) return;
if (_game_mode != GM_EDITOR && !CanBuildVehicleInfrastructure(VEH_ROAD, GetRoadTramType(this->roadtype))) delete this;
bool can_build = _game_mode != GM_EDITOR;
this->SetWidgetsDisabledState(!can_build,
WID_ROT_DEPOT,
WID_ROT_BUS_STATION,
WID_ROT_TRUCK_STATION,
WIDGET_LIST_END);
if (!can_build) {
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
DeleteWindowById(WC_BUS_STATION, TRANSPORT_ROAD);
DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);
}
}
void Initialize(RoadType roadtype)

View File

@@ -2601,7 +2601,8 @@ void RemoveDockingTile(TileIndex t)
if (!IsValidTile(tile)) continue;
if (IsTileType(tile, MP_STATION)) {
UpdateStationDockingTiles(Station::GetByTile(tile));
Station *st = Station::GetByTile(tile);
if (st != nullptr) UpdateStationDockingTiles(st);
} else if (IsTileType(tile, MP_INDUSTRY)) {
Station *neutral = Industry::GetByTile(tile)->neutral_station;
if (neutral != nullptr) UpdateStationDockingTiles(neutral);

View File

@@ -82,7 +82,7 @@ static const uint GEN_HASHX_MASK = (1 << GEN_HASHX_BITS) - 1;
static const uint GEN_HASHY_MASK = ((1 << GEN_HASHY_BITS) - 1) << GEN_HASHX_BITS;
VehicleID _new_vehicle_id;
uint16 _returned_refit_capacity; ///< Stores the capacity after a refit operation.
uint _returned_refit_capacity; ///< Stores the capacity after a refit operation.
uint16 _returned_mail_refit_capacity; ///< Stores the mail capacity after a refit operation (Aircraft only).

View File

@@ -165,7 +165,7 @@ CommandCost EnsureNoVehicleOnGround(TileIndex tile);
CommandCost EnsureNoTrainOnTrackBits(TileIndex tile, TrackBits track_bits);
extern VehicleID _new_vehicle_id;
extern uint16 _returned_refit_capacity;
extern uint _returned_refit_capacity;
extern uint16 _returned_mail_refit_capacity;
bool CanVehicleUseStation(EngineID engine_type, const struct Station *st);

View File

@@ -39,7 +39,7 @@ enum VehicleInvalidateWindowData {
struct TestedEngineDetails {
Money cost; ///< Refit cost
CargoID cargo; ///< Cargo type
uint16 capacity; ///< Cargo capacity
uint capacity; ///< Cargo capacity
uint16 mail_capacity; ///< Mail capacity if available
};