mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r11030) -Revert r11016, Fix [FS#1178]: the way to determine whether a station should get goods was not done properly.
This commit is contained in:
parent
1f7f4f6f62
commit
0df355bbda
@ -1629,7 +1629,6 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
|||||||
|
|
||||||
ge->cargo.MoveTo(&v->cargo, cap, CargoList::MTA_CARGO_LOAD, st->xy);
|
ge->cargo.MoveTo(&v->cargo, cap, CargoList::MTA_CARGO_LOAD, st->xy);
|
||||||
|
|
||||||
SETBIT(ge->acceptance_pickup, GoodsEntry::PICKUP);
|
|
||||||
st->time_since_load = 0;
|
st->time_since_load = 0;
|
||||||
st->last_vehicle_type = v->type;
|
st->last_vehicle_type = v->type;
|
||||||
|
|
||||||
|
@ -2169,6 +2169,16 @@ bool AfterLoadGame()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CheckSavegameVersion(74)) {
|
||||||
|
Station *st;
|
||||||
|
FOR_ALL_STATIONS(st) {
|
||||||
|
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
||||||
|
st->goods[c].last_speed = 0;
|
||||||
|
if (st->goods[c].cargo.Count() != 0) SETBIT(st->goods[c].acceptance_pickup, GoodsEntry::PICKUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
extern const uint16 SAVEGAME_VERSION = 73;
|
extern const uint16 SAVEGAME_VERSION = 74;
|
||||||
uint16 _sl_version; ///< the major savegame version identifier
|
uint16 _sl_version; ///< the major savegame version identifier
|
||||||
byte _sl_minor_version; ///< the minor savegame version, DO NOT USE!
|
byte _sl_minor_version; ///< the minor savegame version, DO NOT USE!
|
||||||
|
|
||||||
|
@ -2532,6 +2532,7 @@ void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint
|
|||||||
static void UpdateStationWaiting(Station *st, CargoID type, uint amount)
|
static void UpdateStationWaiting(Station *st, CargoID type, uint amount)
|
||||||
{
|
{
|
||||||
st->goods[type].cargo.Append(new CargoPacket(st->index, amount));
|
st->goods[type].cargo.Append(new CargoPacket(st->index, amount));
|
||||||
|
SETBIT(st->goods[type].acceptance_pickup, GoodsEntry::PICKUP);
|
||||||
|
|
||||||
InvalidateWindow(WC_STATION_VIEW, st->index);
|
InvalidateWindow(WC_STATION_VIEW, st->index);
|
||||||
st->MarkTilesDirty(true);
|
st->MarkTilesDirty(true);
|
||||||
@ -2619,7 +2620,7 @@ uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount)
|
|||||||
if (!st->IsBuoy() &&
|
if (!st->IsBuoy() &&
|
||||||
(st->town->exclusive_counter == 0 || st->town->exclusivity == st->owner) && // check exclusive transport rights
|
(st->town->exclusive_counter == 0 || st->town->exclusivity == st->owner) && // check exclusive transport rights
|
||||||
st->goods[type].rating != 0 && // when you've got the lowest rating you can get, it's better not to give cargo anymore
|
st->goods[type].rating != 0 && // when you've got the lowest rating you can get, it's better not to give cargo anymore
|
||||||
(!_patches.selectgoods || HASBIT(st->goods[type].acceptance_pickup, GoodsEntry::PICKUP)) && // we are servicing the station (or cargo is dumped on all stations)
|
(!_patches.selectgoods || st->goods[type].last_speed != 0) && // we are servicing the station (or cargo is dumped on all stations)
|
||||||
((st->facilities & ~FACIL_BUS_STOP) != 0 || IsCargoInClass(type, CC_PASSENGERS)) && // if we have other fac. than a bus stop, or the cargo is passengers
|
((st->facilities & ~FACIL_BUS_STOP) != 0 || IsCargoInClass(type, CC_PASSENGERS)) && // if we have other fac. than a bus stop, or the cargo is passengers
|
||||||
((st->facilities & ~FACIL_TRUCK_STOP) != 0 || !IsCargoInClass(type, CC_PASSENGERS))) { // if we have other fac. than a cargo bay or the cargo is not passengers
|
((st->facilities & ~FACIL_TRUCK_STOP) != 0 || !IsCargoInClass(type, CC_PASSENGERS))) { // if we have other fac. than a cargo bay or the cargo is not passengers
|
||||||
if (_patches.modified_catchment) {
|
if (_patches.modified_catchment) {
|
||||||
|
Loading…
Reference in New Issue
Block a user