summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/disaster_cmd.cpp10
-rw-r--r--src/industry.h23
-rw-r--r--src/industry_cmd.cpp51
-rw-r--r--src/misc/autocopyptr.hpp2
-rw-r--r--src/road_map.h2
-rw-r--r--src/table/build_industry.h42
6 files changed, 93 insertions, 37 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp
index bab9f4138..98181f603 100644
--- a/src/disaster_cmd.cpp
+++ b/src/disaster_cmd.cpp
@@ -459,7 +459,7 @@ static void DisasterTick_Airplane(Vehicle *v)
ind = GetIndustryIndex(tile);
v->dest_tile = ind;
- if (GetIndustry(ind)->type == IT_OIL_REFINERY) {
+ if (GetIndustrySpec(GetIndustry(ind)->type)->behaviour & INDUSTRYBEH_AIRPLANE_ATTACKS) {
v->current_order.dest = 1;
v->age = 0;
}
@@ -532,7 +532,7 @@ static void DisasterTick_Helicopter(Vehicle *v)
ind = GetIndustryIndex(tile);
v->dest_tile = ind;
- if (GetIndustry(ind)->type == IT_FACTORY) {
+ if (GetIndustrySpec(GetIndustry(ind)->type)->behaviour & INDUSTRYBEH_CHOPPER_ATTACKS) {
v->current_order.dest = 1;
v->age = 0;
}
@@ -828,7 +828,7 @@ static void Disaster_Airplane_Init()
found = NULL;
FOR_ALL_INDUSTRIES(i) {
- if (i->type == IT_OIL_REFINERY &&
+ if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_AIRPLANE_ATTACKS) &&
(found == NULL || CHANCE16(1, 2))) {
found = i;
}
@@ -864,7 +864,7 @@ static void Disaster_Helicopter_Init()
found = NULL;
FOR_ALL_INDUSTRIES(i) {
- if (i->type == IT_FACTORY &&
+ if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_CHOPPER_ATTACKS) &&
(found == NULL || CHANCE16(1, 2))) {
found = i;
}
@@ -982,7 +982,7 @@ static void Disaster_CoalMine_Init()
const Industry *i;
FOR_ALL_INDUSTRIES(i) {
- if (i->type == IT_COAL_MINE && --index < 0) {
+ if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_CAN_SUBSIDENCE) && --index < 0) {
SetDParam(0, i->town->index);
AddNewsItem(STR_B005_COAL_MINE_SUBSIDENCE_LEAVES,
NEWS_FLAGS(NM_THIN,NF_VIEWPORT|NF_TILE,NT_ACCIDENT,0), i->xy + TileDiffXY(1, 1), 0);
diff --git a/src/industry.h b/src/industry.h
index 829b91c90..8a7970ca0 100644
--- a/src/industry.h
+++ b/src/industry.h
@@ -6,6 +6,7 @@
#define INDUSTRY_H
#include "oldpool.h"
+#include "helpers.hpp"
typedef byte IndustryGfx;
typedef uint8 IndustryType;
@@ -21,6 +22,27 @@ enum IndustryLifeType {
INDUSTRYLIFE_CLOSABLE, ///< Industry can only close (no production change)
};
+enum IndustyBehaviour {
+ INDUSTRYBEH_NONE = 0,
+ INDUSTRYBEH_PLANT_FIELDS = 1 << 0, ///< periodically plants fileds around itself (temp and artic farms)
+ INDUSTRYBEH_CUT_TREES = 1 << 1, ///< cuts trees and produce first output cargo from them (lumber mill)
+ INDUSTRYBEH_BUILT_ONWATER = 1 << 2, ///< is built on water (oil rig)
+ INDUSTRYBEH_TOWN1200_MORE = 1 << 3, ///< can only be built in towns larger then 1200 inhabitants (temperate bank)
+ INDUSTRYBEH_ONLY_INTOWN = 1 << 4, ///< can only be built in towns (arctic/tropic banks, water tower)
+ INDUSTRYBEH_ONLY_NEARTOWN = 1 << 5, ///< is always built near towns (toy shop)
+ INDUSTRYBEH_PLANT_ON_BUILT = 1 << 6, ///< Fields are planted around when built (all farms)
+ INDUSTRYBEH_DONT_INCR_PROD = 1 << 7, ///< do not increase production (oil wells)
+ INDUSTRYBEH_BEFORE_1950 = 1 << 8, ///< can only be built before 1950 (oil wells)
+ INDUSTRYBEH_AFTER_1960 = 1 << 9, ///< can only be built after 1960 (oil rigs)
+ INDUSTRYBEH_AI_AIRSHIP_ROUTES = 1 << 10, ///< ai will attempt to establish air/ship routes to this industry (oil rig)
+ INDUSTRYBEH_AIRPLANE_ATTACKS = 1 << 11, ///< can be exploded by a military airplane (oil refinery)
+ INDUSTRYBEH_CHOPPER_ATTACKS = 1 << 12, ///< can be exploded by a military helicopter (factory)
+ INDUSTRYBEH_CAN_SUBSIDENCE = 1 << 13, ///< can cause a subsidence (coal mine, shaft that collapses)
+};
+
+
+DECLARE_ENUM_AS_BIT_SET(IndustyBehaviour);
+
/**
* Defines the internal data of a functionnal industry
*/
@@ -71,6 +93,7 @@ struct IndustrySpec {
CargoID accepts_cargo[3]; ///< 3 accepted cargos
IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs
byte climate_availability; ///< Bitmask, giving landscape enums as bit position
+ IndustyBehaviour behaviour; ///< How this industry will behave, and how others entities can use it
StringID name; ///< Displayed name of the industry
StringID new_industry_text; ///< Message appearing when the industry is built
StringID closure_text; ///< Message appearing when the industry closes
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index a3a8bc6b0..09978ee2f 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -117,7 +117,7 @@ void DestroyIndustry(Industry *i)
}
END_TILE_LOOP(tile_cur, i->width, i->height, i->xy);
- if (i->type == IT_FARM || i->type == IT_FARM_2) {
+ if (GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_PLANT_FIELDS) {
/* Remove the farmland and convert it to regular tiles over time. */
BEGIN_TILE_LOOP(tile_cur, 42, 42, i->xy - TileDiffXY(21, 21)) {
tile_cur = TILE_MASK(tile_cur);
@@ -323,6 +323,7 @@ static void GetTileDesc_Industry(TileIndex tile, TileDesc *td)
static int32 ClearTile_Industry(TileIndex tile, byte flags)
{
Industry *i = GetIndustryByTile(tile);
+ const IndustrySpec *indspec = GetIndustrySpec(i->type);
/* water can destroy industries
* in editor you can bulldoze industries
@@ -331,8 +332,8 @@ static int32 ClearTile_Industry(TileIndex tile, byte flags)
*/
if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
!_cheats.magic_bulldozer.value) ||
- (_current_player == OWNER_WATER && i->type == IT_OIL_RIG)) {
- SetDParam(0, GetIndustrySpec(i->type)->name);
+ (_current_player == OWNER_WATER && (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER))) {
+ SetDParam(0, indspec->name);
return_cmd_error(STR_4800_IN_THE_WAY);
}
@@ -975,12 +976,13 @@ static void ProduceIndustryGoods(Industry *i)
/* produce some cargo */
if ((i->counter & 0xFF) == 0) {
+ IndustyBehaviour indbehav = GetIndustrySpec(i->type)->behaviour;
i->cargo_waiting[0] = min(0xffff, i->cargo_waiting[0] + i->production_rate[0]);
i->cargo_waiting[1] = min(0xffff, i->cargo_waiting[1] + i->production_rate[1]);
- if (i->type == IT_FARM || i->type == IT_FARM_2) {
+ if (indbehav & INDUSTRYBEH_PLANT_FIELDS) {
MaybePlantFarmField(i);
- } else if (i->type == IT_LUMBER_MILL && (i->counter & 0x1FF) == 0) {
+ } else if ((indbehav & INDUSTRYBEH_CUT_TREES) && (i->counter & 0x1FF) == 0) {
ChopLumberMillTrees(i);
}
}
@@ -1156,9 +1158,10 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
}
} else {
if (!EnsureNoVehicle(cur_tile)) return false;
+ IndustyBehaviour ind_behav = GetIndustrySpec(type)->behaviour;
- if (type == IT_OIL_RIG) {
- if (!IsClearWaterTile(cur_tile)) return false;
+ if (ind_behav & INDUSTRYBEH_BUILT_ONWATER) {
+ return IsClearWaterTile(cur_tile);
} else {
Slope tileh;
@@ -1186,27 +1189,19 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
}
}
- if (type == IT_BANK_TEMP) {
+ if (ind_behav & INDUSTRYBEH_ONLY_INTOWN) {
if (!IsTileType(cur_tile, MP_HOUSE)) {
_error_message = STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS;
return false;
}
- } else if (type == IT_BANK_TROPIC_ARCTIC) {
- if (!IsTileType(cur_tile, MP_HOUSE)) {
- _error_message = STR_030D_CAN_ONLY_BE_BUILT_IN_TOWNS;
- return false;
- }
- } else if (type == IT_TOY_SHOP) {
- if (!IsTileType(cur_tile, MP_HOUSE)) goto do_clear;
- } else if (type == IT_WATER_TOWER) {
- if (!IsTileType(cur_tile, MP_HOUSE)) {
- _error_message = STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS;
- return false;
- }
} else {
+ if (ind_behav & INDUSTRYBEH_ONLY_NEARTOWN) {
+ if (!IsTileType(cur_tile, MP_HOUSE)) goto do_clear;
+ } else {
do_clear:
- if (CmdFailed(DoCommand(cur_tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR)))
- return false;
+ if (CmdFailed(DoCommand(cur_tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR)))
+ return false;
+ }
}
}
}
@@ -1217,12 +1212,12 @@ do_clear:
static bool CheckIfIndustryIsAllowed(TileIndex tile, int type, const Town *t)
{
- if (type == IT_BANK_TEMP && t->population < 1200) {
+ if ((GetIndustrySpec(type)->behaviour & INDUSTRYBEH_TOWN1200_MORE) && t->population < 1200) {
_error_message = STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS;
return false;
}
- if (type == IT_TOY_SHOP && DistanceMax(t->xy, tile) > 9) {
+ if ((GetIndustrySpec(type)->behaviour & INDUSTRYBEH_ONLY_NEARTOWN) && DistanceMax(t->xy, tile) > 9) {
_error_message = STR_0239_SITE_UNSUITABLE;
return false;
}
@@ -1450,7 +1445,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
i->width++;
i->height++;
- if (i->type == IT_FARM || i->type == IT_FARM_2) {
+ if (GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_PLANT_ON_BUILT) {
for (j = 0; j != 50; j++) PlantRandomFarmField(i);
}
_industry_sort_dirty = true;
@@ -1737,8 +1732,8 @@ static void MaybeNewIndustry(uint32 r)
Industry *i;
const IndustrySpec *ind_spc = GetIndustrySpec(type);;
- if (type == IT_OIL_WELL && _cur_year > 1950) return;
- if (type == IT_OIL_RIG && _cur_year < 1960) return;
+ if ((ind_spc->behaviour & INDUSTRYBEH_BEFORE_1950) && _cur_year > 1950) return;
+ if ((ind_spc->behaviour & INDUSTRYBEH_AFTER_1960) && _cur_year < 1960) return;
j = 2000;
for (;;) {
@@ -1766,7 +1761,7 @@ static void ChangeIndustryProduction(Industry *i)
case INDUSTRYLIFE_PRODUCTION:
/* decrease or increase */
- if (type == IT_OIL_WELL && _opt.landscape == LT_TEMPERATE)
+ if ((indspec->behaviour & INDUSTRYBEH_DONT_INCR_PROD) && _opt.landscape == LT_TEMPERATE)
only_decrease = true;
if (only_decrease || CHANCE16(1,3)) {
diff --git a/src/misc/autocopyptr.hpp b/src/misc/autocopyptr.hpp
index fb6bfa028..b5ca6ddd1 100644
--- a/src/misc/autocopyptr.hpp
+++ b/src/misc/autocopyptr.hpp
@@ -8,7 +8,7 @@
* It is non-invasive smart pointer (reference counter is held outside
* of Tdata).
* When copied, its new copy shares the same underlaying structure Tdata.
- * When dereferenced, its behavior depends on 2 factors:
+ * When dereferenced, its behaviour depends on 2 factors:
* - whether the data is shared (used by more than one pointer)
* - type of access (read/write)
* When shared pointer is dereferenced for write, new clone of Tdata
diff --git a/src/road_map.h b/src/road_map.h
index 6cc6faed0..599eeffd9 100644
--- a/src/road_map.h
+++ b/src/road_map.h
@@ -166,7 +166,7 @@ static inline DiagDirection GetRoadDepotDirection(TileIndex t)
/**
* Returns the RoadBits on an arbitrary tile
- * Special behavior:
+ * Special behaviour:
* - road depots: entrance is treated as road piece
* - road tunnels: entrance is treated as road piece
* - bridge ramps: start of the ramp is treated as road piece
diff --git a/src/table/build_industry.h b/src/table/build_industry.h
index e8934b250..49c0b7c3a 100644
--- a/src/table/build_industry.h
+++ b/src/table/build_industry.h
@@ -1083,9 +1083,9 @@ enum CheckProc {
CHECK_END,
};
-#define MK(tbl, d, c1, c2, c3, proc, p1, r1, p2, r2, m, a1, a2, a3, pr, clim, in, intx, s1, s2, s3) \
+#define MK(tbl, d, c1, c2, c3, proc, p1, r1, p2, r2, m, a1, a2, a3, pr, clim, bev, in, intx, s1, s2, s3) \
{tbl, lengthof(tbl), d, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \
- {a1, a2, a3}, pr, clim, in, intx, s1, s2, s3}
+ {a1, a2, a3}, pr, clim, bev, in, intx, s1, s2, s3}
static const IndustrySpec _industry_specs[] = {
/* Format:
@@ -1094,6 +1094,7 @@ static const IndustrySpec _industry_specs[] = {
(produced cargo + rate) (twice) minimum cargo moved to station
3 accepted cargo
industry life climate availability
+ industry behaviours
industry name building text
messages : Closure production up production down */
MK(_tile_table_coal_mine, 210,
@@ -1101,6 +1102,7 @@ static const IndustrySpec _industry_specs[] = {
CT_COAL, 15, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
+ INDUSTRYBEH_CAN_SUBSIDENCE,
STR_4802_COAL_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4836_NEW_COAL_SEAM_FOUND_AT, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1109,6 +1111,7 @@ static const IndustrySpec _industry_specs[] = {
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_COAL, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
+ INDUSTRYBEH_NONE,
STR_4803_POWER_STATION, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1117,6 +1120,7 @@ static const IndustrySpec _industry_specs[] = {
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_WOOD, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE,
+ INDUSTRYBEH_CUT_TREES,
STR_4804_SAWMILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1125,6 +1129,7 @@ static const IndustrySpec _industry_specs[] = {
CT_WOOD, 13, CT_INVALID, 0, 30,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
+ INDUSTRYBEH_NONE,
STR_4805_FOREST, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1133,6 +1138,7 @@ static const IndustrySpec _industry_specs[] = {
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_OIL, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE | 1 << LT_ARCTIC | 1 << LT_TROPIC,
+ INDUSTRYBEH_AIRPLANE_ATTACKS,
STR_4806_OIL_REFINERY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1141,6 +1147,7 @@ static const IndustrySpec _industry_specs[] = {
CT_OIL, 15, CT_PASSENGERS, 2, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE,
+ INDUSTRYBEH_BUILT_ONWATER | INDUSTRYBEH_AFTER_1960 | INDUSTRYBEH_AI_AIRSHIP_ROUTES,
STR_4807_OIL_RIG, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4837_NEW_OIL_RESERVES_FOUND, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1149,6 +1156,7 @@ static const IndustrySpec _industry_specs[] = {
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_LIVESTOCK, CT_GRAIN, CT_STEEL,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE,
+ INDUSTRYBEH_CHOPPER_ATTACKS,
STR_4808_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1157,6 +1165,7 @@ static const IndustrySpec _industry_specs[] = {
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_PAPER, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_ARCTIC,
+ INDUSTRYBEH_NONE,
STR_4809_PRINTING_WORKS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1165,6 +1174,7 @@ static const IndustrySpec _industry_specs[] = {
CT_STEEL, 0, CT_INVALID, 0, 5,
CT_IRON_ORE, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE,
+ INDUSTRYBEH_NONE,
STR_480A_STEEL_MILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1173,6 +1183,7 @@ static const IndustrySpec _industry_specs[] = {
CT_GRAIN, 10, CT_LIVESTOCK, 10, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
+ INDUSTRYBEH_PLANT_FIELDS | INDUSTRYBEH_PLANT_ON_BUILT,
STR_480B_FARM, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1181,6 +1192,7 @@ static const IndustrySpec _industry_specs[] = {
CT_COPPER_ORE, 10, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_480C_COPPER_ORE_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1189,6 +1201,7 @@ static const IndustrySpec _industry_specs[] = {
CT_OIL, 12, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC | 1 << LT_TROPIC,
+ INDUSTRYBEH_DONT_INCR_PROD | INDUSTRYBEH_BEFORE_1950,
STR_480D_OIL_WELLS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4837_NEW_OIL_RESERVES_FOUND, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1197,6 +1210,7 @@ static const IndustrySpec _industry_specs[] = {
CT_VALUABLES, 6, CT_INVALID, 0, 5,
CT_VALUABLES, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TEMPERATE,
+ INDUSTRYBEH_TOWN1200_MORE | INDUSTRYBEH_ONLY_INTOWN,
STR_480E_BANK, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1205,6 +1219,7 @@ static const IndustrySpec _industry_specs[] = {
CT_FOOD, 0, CT_INVALID, 0, 5,
CT_FRUIT, CT_MAIZE, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_ARCTIC | 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_480F_FOOD_PROCESSING_PLANT, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1213,6 +1228,7 @@ static const IndustrySpec _industry_specs[] = {
CT_PAPER, 0, CT_INVALID, 0, 5,
CT_WOOD, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_ARCTIC,
+ INDUSTRYBEH_NONE,
STR_4810_PAPER_MILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1221,6 +1237,7 @@ static const IndustrySpec _industry_specs[] = {
CT_GOLD, 7, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_4811_GOLD_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1229,6 +1246,7 @@ static const IndustrySpec _industry_specs[] = {
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_GOLD, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_ARCTIC | 1 << LT_TROPIC,
+ INDUSTRYBEH_ONLY_INTOWN,
STR_4812_BANK, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1237,6 +1255,7 @@ static const IndustrySpec _industry_specs[] = {
CT_DIAMONDS, 7, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_4813_DIAMOND_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1245,6 +1264,7 @@ static const IndustrySpec _industry_specs[] = {
CT_IRON_ORE, 10, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE,
+ INDUSTRYBEH_NONE,
STR_4814_IRON_ORE_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1253,6 +1273,7 @@ static const IndustrySpec _industry_specs[] = {
CT_FRUIT, 10, CT_INVALID, 0, 15,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_4815_FRUIT_PLANTATION, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1261,6 +1282,7 @@ static const IndustrySpec _industry_specs[] = {
CT_RUBBER, 10, CT_INVALID, 0, 15,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_4816_RUBBER_PLANTATION, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1269,6 +1291,7 @@ static const IndustrySpec _industry_specs[] = {
CT_WATER, 12, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_4817_WATER_SUPPLY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1277,6 +1300,7 @@ static const IndustrySpec _industry_specs[] = {
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_WATER, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TROPIC,
+ INDUSTRYBEH_ONLY_INTOWN,
STR_4818_WATER_TOWER, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1285,6 +1309,7 @@ static const IndustrySpec _industry_specs[] = {
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_RUBBER, CT_COPPER_ORE, CT_WOOD,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TROPIC,
+ INDUSTRYBEH_NONE,
STR_4819_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1293,6 +1318,7 @@ static const IndustrySpec _industry_specs[] = {
CT_MAIZE, 11, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
+ INDUSTRYBEH_PLANT_FIELDS | INDUSTRYBEH_PLANT_ON_BUILT,
STR_481A_FARM, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1301,6 +1327,7 @@ static const IndustrySpec _industry_specs[] = {
CT_WOOD, 0, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TROPIC,
+ INDUSTRYBEH_CUT_TREES,
STR_481B_LUMBER_MILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4834_LACK_OF_NEARBY_TREES_CAUSES, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1309,6 +1336,7 @@ static const IndustrySpec _industry_specs[] = {
CT_COTTON_CANDY, 13, CT_INVALID, 0, 30,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_481C_COTTON_CANDY_FOREST, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1317,6 +1345,7 @@ static const IndustrySpec _industry_specs[] = {
CT_CANDY, 0, CT_INVALID, 0, 5,
CT_SUGAR, CT_TOFFEE, CT_COTTON_CANDY,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_481D_CANDY_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1325,6 +1354,7 @@ static const IndustrySpec _industry_specs[] = {
CT_BATTERIES, 11, CT_INVALID, 0, 30,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_481E_BATTERY_FARM, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1333,6 +1363,7 @@ static const IndustrySpec _industry_specs[] = {
CT_COLA, 12, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_481F_COLA_WELLS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1341,6 +1372,7 @@ static const IndustrySpec _industry_specs[] = {
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_TOYS, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TOYLAND,
+ INDUSTRYBEH_ONLY_NEARTOWN,
STR_4820_TOY_SHOP, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1349,6 +1381,7 @@ static const IndustrySpec _industry_specs[] = {
CT_TOYS, 0, CT_INVALID, 0, 5,
CT_PLASTIC, CT_BATTERIES, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_4821_TOY_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1357,6 +1390,7 @@ static const IndustrySpec _industry_specs[] = {
CT_PLASTIC, 14, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_4822_PLASTIC_FOUNTAINS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1365,6 +1399,7 @@ static const IndustrySpec _industry_specs[] = {
CT_FIZZY_DRINKS, 0, CT_INVALID, 0, 5,
CT_COLA, CT_BUBBLES, CT_INVALID,
INDUSTRYLIFE_CLOSABLE, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_4823_FIZZY_DRINK_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1373,6 +1408,7 @@ static const IndustrySpec _industry_specs[] = {
CT_BUBBLES, 13, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_4824_BUBBLE_GENERATOR, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1381,6 +1417,7 @@ static const IndustrySpec _industry_specs[] = {
CT_TOFFEE, 10, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_4825_TOFFEE_QUARRY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1389,6 +1426,7 @@ static const IndustrySpec _industry_specs[] = {
CT_SUGAR, 11, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
+ INDUSTRYBEH_NONE,
STR_4826_SUGAR_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
};