Go to the documentation of this file.
27 static const uint HOUSE_NO_CLASS = 0;
30 static const HouseID INVALID_HOUSE_ID = 0xFFFF;
42 TILE_SIZE_1x1 = 1U << 0,
43 TILE_NOT_SLOPED = 1U << 1,
44 TILE_SIZE_2x1 = 1U << 2,
45 TILE_SIZE_1x2 = 1U << 3,
46 TILE_SIZE_2x2 = 1U << 4,
47 BUILDING_IS_ANIMATED = 1U << 5,
48 BUILDING_IS_CHURCH = 1U << 6,
49 BUILDING_IS_STADIUM = 1U << 7,
50 BUILDING_HAS_1_TILE = TILE_SIZE_1x1 | TILE_SIZE_2x1 | TILE_SIZE_1x2 | TILE_SIZE_2x2,
51 BUILDING_HAS_2_TILES = TILE_SIZE_2x1 | TILE_SIZE_1x2 | TILE_SIZE_2x2,
52 BUILDING_2_TILES_X = TILE_SIZE_2x1 | TILE_SIZE_2x2,
53 BUILDING_2_TILES_Y = TILE_SIZE_1x2 | TILE_SIZE_2x2,
54 BUILDING_HAS_4_TILES = TILE_SIZE_2x2,
62 HZB_TOWN_OUTER_SUBURB,
63 HZB_TOWN_INNER_SUBURB,
67 static_assert(HZB_END == 5);
74 HZ_ZON2 = 1U << HZB_TOWN_OUTSKIRT,
75 HZ_ZON3 = 1U << HZB_TOWN_OUTER_SUBURB,
76 HZ_ZON4 = 1U << HZB_TOWN_INNER_SUBURB,
116 byte random_colour[4];
125 Money GetRemovalCost()
const;
127 static inline HouseSpec *Get(
size_t house_id)
131 return &_house_specs[house_id];
142 const HouseSpec *hs = HouseSpec::Get(hid);
byte removal_cost
cost multiplier for removing it
uint16 override
id of the entity been replaced by
@ HZ_SUBTROPIC
14 4000 can appear in subtropical climate
bool enabled
the house is available to build (true by default, but can be disabled by newgrf)
Information about animation.
@ CALLBACK_1A_RANDOM_BITS
callback 1A needs random bits
int32 Year
Type for the year, note: 0 based, i.e. starts at the year 0.
StringID building_name
building name
Year max_year
last year it can be built
static const uint HOUSE_CLASS_MAX
There can only be as many classes as there are new houses, plus one for NO_CLASS, as the original hou...
static const HouseID NUM_HOUSES_PER_GRF
Number of supported houses per NewGRF; limited to 255 to allow extending Action3 with an extended byt...
HouseExtraFlags extra_flags
some more flags
byte probability
Relative probability of appearing (16 is the standard value)
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
static const HouseID NUM_HOUSES
Total number of houses.
static const HouseID NEW_HOUSE_OFFSET
Offset for new houses.
BuildingFlags building_flags
some flags that describe the house (size, stadium etc...)
@ HZ_NOZNS
Bit Value Meaning.
@ HZ_TEMP
12 1000 can appear in temperate climate
Data related to the handling of grf files.
@ HZ_ZONALL
1F This is just to englobe all above types at once
AnimationInfo animation
information about the animation.
static const uint HOUSE_NUM_ACCEPTS
Max number of cargoes accepted by a tile.
uint16 callback_mask
Bitmask of house callbacks that have to be called.
byte minimum_life
The minimum number of years this house will survive before the town rebuilds it.
byte mail_generation
mail generation multiplier (tile based, as the acceptances below)
byte population
population (Zero on other tiles in multi tile house.)
@ BUILDING_IS_PROTECTED
towns and AI will not remove this house, while human players will be able to
uint32 StringID
Numeric value that represents a string, independent of the selected language.
uint16 HouseID
OpenTTD ID of house types.
@ SYNCHRONISED_CALLBACK_1B
synchronized callback 1B will be performed, on multi tile houses
@ HZ_SUBARTC_ABOVE
11 800 can appear in sub-arctic climate above the snow line
CargoTypes watched_cargoes
Cargo types watched for acceptance.
HouseClassID class_id
defines the class this house has (not grf file based)
HouseZones building_availability
where can it be built (climates, zones)
static HouseID GetTranslatedHouseID(HouseID hid)
Do HouseID translation for NewGRFs.
@ HZ_CLIMALL
Bitmask of all climate bits.
byte processing_time
Periodic refresh multiplier.
uint16 HouseClassID
Classes of houses.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Year min_year
introduction year of the house
@ HZ_TOYLND
15 8000 can appear in toyland climate
byte CargoID
Cargo slots to indicate a cargo type within a game.
@ BUILDING_IS_HISTORICAL
this house will only appear during town generation in random games, thus the historical
static const byte TOWN_HOUSE_COMPLETED
Simple value that indicates the house has reached the final stage of construction.
uint16 remove_rating_decrease
rating decrease if removed
@ HZ_SUBARTC_BELOW
13 2000 can appear in sub-arctic climate below the snow line
@ HZ_ZON1
0..4 1,2,4,8,10 which town zones the building can be built in, Zone1 been the further suburb
GRFFileProps grf_prop
Properties related the the grf file.