Merge tag '1.10.1'

This commit is contained in:
pelya
2020-04-14 21:52:24 +03:00
14 changed files with 42 additions and 28 deletions
+1 -1
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;
+1 -1
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);
+1 -1
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);
+13 -4
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
-11
View File
@@ -299,17 +299,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)
+2 -1
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);
+1 -1
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).
+1 -1
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);
+1 -1
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
};