|
OpenTTD Source
14.0-beta3
|
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,
105 uint16_t remove_rating_decrease;
116 uint16_t callback_mask;
117 Colours random_colour[4];
126 Money GetRemovalCost()
const;
128 static inline HouseSpec *Get(
size_t house_id)
132 return &_house_specs[house_id];
143 const HouseSpec *hs = HouseSpec::Get(hid);
byte removal_cost
cost multiplier for removing it
TimerGameCalendar::Year max_year
last year it can be built
@ HZ_SUBTROPIC
14 4000 can appear in subtropical climate
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
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
StringID building_name
building name
Templated helper to make a type-safe 'typedef' representing a single POD value.
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.
uint16_t override
id of the entity been replaced by
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.
uint16_t HouseClassID
Classes of houses.
@ 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.
byte minimum_life
The minimum number of years this house will survive before the town rebuilds it.
byte CargoID
Cargo slots to indicate a cargo type within a game.
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
@ 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)
uint16_t HouseID
OpenTTD ID of house types.
@ HZ_CLIMALL
Bitmask of all climate bits.
byte processing_time
Periodic refresh multiplier.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
@ HZ_TOYLND
15 8000 can appear in toyland climate
@ BUILDING_IS_HISTORICAL
this house will only appear during town generation in random games, thus the historical
TimerGameCalendar::Year min_year
introduction year of the house
static const byte TOWN_HOUSE_COMPLETED
Simple value that indicates the house has reached the final stage of construction.
@ 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.
HouseID GetTranslatedHouseID(HouseID hid)
Do HouseID translation for NewGRFs.