Change #8159: Remove now unused town cargo caches without bumping the savegame version

This commit is contained in:
dP
2020-05-18 17:32:05 +03:00
committed by Niels Martin Hansen
parent 380fd8cab4
commit 7045186594
5 changed files with 16 additions and 128 deletions

View File

@@ -15,7 +15,6 @@
#include "subsidy_type.h"
#include "newgrf_storage.h"
#include "cargotype.h"
#include "tilematrix_type.hpp"
#include <list>
template <typename T>
@@ -24,8 +23,6 @@ struct BuildingCounts {
T class_count[HOUSE_CLASS_MAX];
};
typedef TileMatrix<CargoTypes, 4> AcceptanceMatrix;
static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings
static const uint CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation
@@ -83,10 +80,6 @@ struct Town : TownPool::PoolItem<&_town_pool> {
inline byte GetPercentTransported(CargoID cid) const { return this->supplied[cid].old_act * 256 / (this->supplied[cid].old_max + 1); }
/* Cargo production and acceptance stats. */
CargoTypes cargo_produced; ///< Bitmap of all cargoes produced by houses in this town.
AcceptanceMatrix cargo_accepted; ///< Bitmap of cargoes accepted by houses for each 4*4 map square of the town.
CargoTypes cargo_accepted_total; ///< NOSAVE: Bitmap of all cargoes accepted by houses in this town.
StationList stations_near; ///< NOSAVE: List of nearby stations.
uint16 time_until_rebuild; ///< time until we rebuild a house
@@ -203,9 +196,6 @@ void ResetHouses();
void ClearTownHouse(Town *t, TileIndex tile);
void UpdateTownMaxPass(Town *t);
void UpdateTownRadius(Town *t);
void UpdateTownCargoes(Town *t);
void UpdateTownCargoTotal(Town *t);
void UpdateTownCargoBitmap();
CommandCost CheckIfAuthorityAllowsNewStation(TileIndex tile, DoCommandFlag flags);
Town *ClosestTownFromTile(TileIndex tile, uint threshold);
void ChangeTownRating(Town *t, int add, int max, DoCommandFlag flags);
@@ -313,8 +303,6 @@ static inline uint16 TownTicksToGameTicks(uint16 ticks) {
}
extern CargoTypes _town_cargoes_accepted;
RoadType GetTownRoadType(const Town *t);
#endif /* TOWN_H */