|
@@ -100,50 +100,46 @@ struct HouseSpec {
|
|
|
Year min_year; ///< introduction year of the house
|
|
|
Year max_year; ///< last year it can be built
|
|
|
byte population; ///< population (Zero on other tiles in multi tile house.)
|
|
|
byte removal_cost; ///< cost multiplier for removing it
|
|
|
StringID building_name; ///< building name
|
|
|
uint16 remove_rating_decrease; ///< rating decrease if removed
|
|
|
byte mail_generation; ///< mail generation multiplier (tile based, as the acceptances below)
|
|
|
byte cargo_acceptance[3]; ///< acceptance level for the cargo slots
|
|
|
CargoID accepts_cargo[3]; ///< 3 input cargo slots
|
|
|
BuildingFlags building_flags; ///< some flags that describe the house (size, stadium etc...)
|
|
|
HouseZones building_availability; ///< where can it be built (climates, zones)
|
|
|
bool enabled; ///< the house is available to build (true by default, but can be disabled by newgrf)
|
|
|
|
|
|
/* NewHouses properties */
|
|
|
GRFFileProps grf_prop; ///< Properties related the the grf file
|
|
|
uint16 callback_mask; ///< Bitmask of house callbacks that have to be called
|
|
|
byte random_colour[4]; ///< 4 "random" colours
|
|
|
byte probability; ///< Relative probability of appearing (16 is the standard value)
|
|
|
HouseExtraFlags extra_flags; ///< some more flags
|
|
|
HouseClassID class_id; ///< defines the class this house has (not grf file based)
|
|
|
AnimationInfo animation; ///< information about the animation.
|
|
|
byte processing_time; ///< Periodic refresh multiplier
|
|
|
byte minimum_life; ///< The minimum number of years this house will survive before the town rebuilds it
|
|
|
|
|
|
/**
|
|
|
* Get the cost for removing this house
|
|
|
* @return the cost (inflation corrected etc)
|
|
|
*/
|
|
|
Money GetRemovalCost() const;
|
|
|
|
|
|
static FORCEINLINE HouseSpec *Get(size_t house_id)
|
|
|
{
|
|
|
assert(house_id < HOUSE_MAX);
|
|
|
extern HouseSpec _house_specs[];
|
|
|
return &_house_specs[house_id];
|
|
|
}
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Do HouseID translation for NewGRFs.
|
|
|
* @param hid the HouseID to get the override for.
|
|
|
* @return the HouseID to actually work with.
|
|
|
*/
|
|
|
static inline HouseID GetTranslatedHouseID(HouseID hid)
|
|
|
{
|
|
|
const HouseSpec *hs = HouseSpec::Get(hid);
|
|
|
return hs->grf_prop.override == INVALID_HOUSE_ID ? hid : hs->grf_prop.override;
|
|
|
}
|
|
|
|
|
|
#endif /* HOUSE_H */
|