From 0d68a919d95c9fee62bf22813365b3c5623ca1b1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 6 Jul 2007 07:24:10 +0000 Subject: (svn r10451) -Add: support for "prospecting" raw industries, i.e. you pay an amount of money and then it might (with a given chance) build a raw industry somewhere on the map. --- src/industry.h | 4 ++- src/industry_cmd.cpp | 38 +++++++++++++++------- src/industry_gui.cpp | 4 +-- src/lang/english.txt | 5 ++- src/settings.cpp | 2 +- src/settings_gui.cpp | 2 +- src/table/build_industry.h | 79 +++++++++++++++++++++++----------------------- src/variables.h | 2 +- 8 files changed, 78 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/src/industry.h b/src/industry.h index 08117cbd7..505c14096 100644 --- a/src/industry.h +++ b/src/industry.h @@ -118,7 +118,9 @@ struct GRFFileProps { struct IndustrySpec { const IndustryTileTable *const *table;///< List of the tiles composing the industry byte num_table; ///< Number of elements in the table - uint16 cost_multiplier; ///< Base cost multiplier. + uint8 cost_multiplier; ///< Base cost multiplier. + uint16 raw_industry_cost_multiplier; ///< Multiplier for the raw industries cost + uint32 prospecting_chance; ///< Chance prospecting succeeds IndustryType conflicting[3]; ///< Industries this industry cannot be close to byte check_proc; ///< Index to a procedure to check for conflicting circumstances CargoID produced_cargo[2]; diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 7f92a28b9..cf6572dac 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1505,27 +1505,41 @@ CommandCost CmdBuildIndustry(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) return CMD_ERROR; } + bool raw_industry = indspec->accepts_cargo[0] == CT_INVALID && indspec->accepts_cargo[1] == CT_INVALID && + indspec->accepts_cargo[2] == CT_INVALID && !(indspec->behaviour & INDUSTRYBEH_CUT_TREES); + /* If the patch for raw-material industries is not on, you cannot build raw-material industries. * Raw material industries are industries that do not accept cargo (at least for now) * Exclude the lumber mill (only "raw" industry that can be built) */ - if (!_patches.build_rawmaterial_ind && - indspec->accepts_cargo[0] == CT_INVALID && - indspec->accepts_cargo[1] == CT_INVALID && - indspec->accepts_cargo[2] == CT_INVALID && - !(indspec->behaviour & INDUSTRYBEH_CUT_TREES)) { + if (raw_industry && _patches.raw_industry_construction == 0) { return CMD_ERROR; } - num = indspec->num_table; - itt = indspec->table; + if (raw_industry && _patches.raw_industry_construction == 2) { + if (flags & DC_EXEC) { + /* Prospecting has a chance to fail, however we cannot guarantee that something can + * be built on the map, so the chance gets lower when the map is fuller, but there + * is nothing we can really do about that. */ + if (Random() <= indspec->prospecting_chance) { + for (int i = 0; i < 5000; i++) { + const IndustryTileTable *it = indspec->table[RandomRange(indspec->num_table)]; + if (CreateNewIndustryHelper(RandomTile(), p1, flags, indspec, it) != NULL) break; + } + } + } + } else { + num = indspec->num_table; + itt = indspec->table; - do { - if (--num < 0) return_cmd_error(STR_0239_SITE_UNSUITABLE); - } while (!CheckIfIndustryTilesAreFree(tile, it = itt[num], p1)); - if (CreateNewIndustryHelper(tile, p1, flags, indspec, it) == NULL) return CMD_ERROR; + do { + if (--num < 0) return_cmd_error(STR_0239_SITE_UNSUITABLE); + } while (!CheckIfIndustryTilesAreFree(tile, it = itt[num], p1)); + + if (CreateNewIndustryHelper(tile, p1, flags, indspec, it) == NULL) return CMD_ERROR; + } - return CommandCost((_price.build_industry >> 8) * indspec->cost_multiplier); + return CommandCost((_price.build_industry >> 8) * ((_patches.raw_industry_construction == 1) ? indspec->raw_industry_cost_multiplier : indspec->cost_multiplier)); } diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index dca4ef7ac..fa0b9746d 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -39,7 +39,7 @@ static void BuildIndustryWndProc(Window *w, WindowEvent *e) if (_thd.place_mode == 1 && _thd.window_class == WC_BUILD_INDUSTRY) { int ind_type = _build_industry_types[_opt_ptr->landscape][WP(w, def_d).data_1]; - SetDParam(0, (_price.build_industry >> 8) * GetIndustrySpec(ind_type)->cost_multiplier); + SetDParam(0, (_price.build_industry >> 8) * (_patches.raw_industry_construction == 1 ? GetIndustrySpec(ind_type)->raw_industry_cost_multiplier : GetIndustrySpec(ind_type)->cost_multiplier)); DrawStringCentered(85, w->height - 21, STR_482F_COST, 0); } break; @@ -274,7 +274,7 @@ static const WindowDesc * const _industry_window_desc[2][4] = { void ShowBuildIndustryWindow() { if (!IsValidPlayer(_current_player)) return; - AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape], 0); + AllocateWindowDescFront(_industry_window_desc[(_patches.raw_industry_construction == 0) ? 0 : 1][_opt_ptr->landscape], 0); } static inline bool isProductionMinimum(const Industry *i, int pt) { diff --git a/src/lang/english.txt b/src/lang/english.txt index 044942361..16f51ca43 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1034,7 +1034,10 @@ STR_CONFIG_PATCHES_INFLATION :{LTBLUE}Inflati STR_CONFIG_PATCHES_SELECTGOODS :{LTBLUE}Deliver cargo to a station only when there is a demand: {ORANGE}{STRING1} STR_CONFIG_PATCHES_LONGBRIDGES :{LTBLUE}Allow building very long bridges: {ORANGE}{STRING1} STR_CONFIG_PATCHES_GOTODEPOT :{LTBLUE}Allow goto depot orders: {ORANGE}{STRING1} -STR_CONFIG_PATCHES_BUILDXTRAIND :{LTBLUE}Allow constructing raw material producing industries: {ORANGE}{STRING1} +STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD :{LTBLUE}Manual primary industry construction method: {ORANGE}{STRING1} +STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD_NONE :none +STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD_NORMAL :as other industries +STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD_PROSPECTING :prospecting STR_CONFIG_PATCHES_MULTIPINDTOWN :{LTBLUE}Allow multiple similar industries per town: {ORANGE}{STRING1} STR_CONFIG_PATCHES_SAMEINDCLOSE :{LTBLUE}Industries of the same type can be built close to each other: {ORANGE}{STRING1} STR_CONFIG_PATCHES_LONGDATE :{LTBLUE}Always show long date in the status bar: {ORANGE}{STRING1} diff --git a/src/settings.cpp b/src/settings.cpp index b68aa49a0..83e5e4895 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1418,7 +1418,7 @@ const SettingDesc _patch_settings[] = { /***************************************************************************/ /* Economy section of the GUI-configure patches window */ SDT_BOOL(Patches, inflation, 0, 0, true, STR_CONFIG_PATCHES_INFLATION, NULL), - SDT_BOOL(Patches, build_rawmaterial_ind, 0, 0, false, STR_CONFIG_PATCHES_BUILDXTRAIND, NULL), + SDT_VAR(Patches, raw_industry_construction,SLE_UINT8,0,MS,0,0, 2, 0, STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD, NULL), SDT_BOOL(Patches, multiple_industry_per_town, 0, 0, false, STR_CONFIG_PATCHES_MULTIPINDTOWN, NULL), SDT_BOOL(Patches, same_industry_close, 0, 0, false, STR_CONFIG_PATCHES_SAMEINDCLOSE, NULL), SDT_BOOL(Patches, bribe, 0, 0, true, STR_CONFIG_PATCHES_BRIBE, NULL), diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 3546fe3cd..09ad4221b 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -687,7 +687,7 @@ static const char *_patches_stations[] = { static const char *_patches_economy[] = { "inflation", - "build_rawmaterial_ind", + "raw_industry_construction", "multiple_industry_per_town", "same_industry_close", "bribe", diff --git a/src/table/build_industry.h b/src/table/build_industry.h index 406e73abf..14ca228e2 100644 --- a/src/table/build_industry.h +++ b/src/table/build_industry.h @@ -1097,6 +1097,7 @@ static const uint8 _plastic_mine_sounds[] = { SND_33_PLASTIC_MINE }; * @param sndc number of sounds * @param snd sounds table * @param d cost multiplier + * @param pc prospecting chance * @param ai1 appear chance ingame - temperate * @param ai2 appear chance ingame - arctic * @param ai3 appear chance ingame - tropic @@ -1131,9 +1132,9 @@ static const uint8 _plastic_mine_sounds[] = { SND_33_PLASTIC_MINE }; * @param s3 text for production down */ -#define MI(tbl, sndc, snd, d, ai1, ai2, ai3, ai4, ag1, ag2, ag3, ag4, col, \ +#define MI(tbl, sndc, snd, d, pc, ai1, ai2, ai3, ai4, ag1, ag2, ag3, ag4, col, \ c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \ - {tbl, lengthof(tbl), d, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \ + {tbl, lengthof(tbl), min(255, d), d, pc, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \ {a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, in, intx, s1, s2, s3, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \ sndc, snd, 0, 0, true, {0, 0, NULL, NULL, INVALID_INDUSTRYTYPE}} /* Format: @@ -1148,7 +1149,7 @@ static const uint8 _plastic_mine_sounds[] = { SND_33_PLASTIC_MINE }; messages : Closure production up production down */ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { MI(_tile_table_coal_mine, 0, NULL, - 1680, 2, 3, 0, 0, 8, 8, 0, 0, 215, + 1680, 0xB3333333, 2, 3, 0, 0, 8, 8, 0, 0, 215, IT_POWER_STATION, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_COAL, 15, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1158,7 +1159,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4836_NEW_COAL_SEAM_FOUND_AT, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_power_station, 0, NULL, - 240, 2, 2, 0, 0, 5, 5, 0, 0, 184, + 240, 0xFFFFFFFF, 2, 2, 0, 0, 5, 5, 0, 0, 184, IT_COAL_MINE, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_INVALID, 0, CT_INVALID, 0, 5, CT_COAL, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1168,7 +1169,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_sawmill, 1, _sawmill_sounds, - 224, 2, 0, 0, 0, 5, 0, 0, 0, 194, + 224, 0xFFFFFFFF, 2, 0, 0, 0, 5, 0, 0, 0, 194, IT_FOREST, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_GOODS, 0, CT_INVALID, 0, 5, CT_WOOD, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1178,7 +1179,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_forest, 0, NULL, - 1600, 3, 4, 0, 0, 5, 5, 0, 0, 86, + 1600, 0xBFFFFFFF, 3, 4, 0, 0, 5, 5, 0, 0, 86, IT_SAWMILL, IT_PAPER_MILL, IT_INVALID, CHECK_FOREST, CT_WOOD, 13, CT_INVALID, 0, 30, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1188,7 +1189,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_483A_INSECT_INFESTATION_CAUSES), MI(_tile_table_oil_refinery, 0, NULL, - 244, 2, 2, 2, 0, 4, 4, 4, 0, 191, + 244, 0xFFFFFFFF, 2, 2, 2, 0, 4, 4, 4, 0, 191, IT_OIL_RIG, IT_INVALID, IT_INVALID, CHECK_REFINERY, CT_GOODS, 0, CT_INVALID, 0, 5, CT_OIL, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1198,7 +1199,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_oil_rig, 0, NULL, - 1920, 6, 0, 0, 0, 0, 0, 0, 0, 152, + 1920, 0x99999999, 6, 0, 0, 0, 0, 0, 0, 0, 152, IT_OIL_REFINERY, IT_INVALID, IT_INVALID, CHECK_OIL_RIG, CT_OIL, 15, CT_PASSENGERS, 2, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1208,7 +1209,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4837_NEW_OIL_RESERVES_FOUND, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_factory, 1, _factory_sounds, - 208, 2, 0, 0, 0, 5, 0, 0, 0, 174, + 208, 0xFFFFFFFF, 2, 0, 0, 0, 5, 0, 0, 0, 174, IT_FARM, IT_STEEL_MILL, IT_INVALID, CHECK_NOTHING, CT_GOODS, 0, CT_INVALID, 0, 5, CT_LIVESTOCK, 256, CT_GRAIN, 256, CT_STEEL, 256, @@ -1218,7 +1219,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_printing_works, 1, _factory_sounds, - 208, 0, 2, 0, 0, 0, 5, 0, 0, 174, + 208, 0xFFFFFFFF, 0, 2, 0, 0, 0, 5, 0, 0, 174, IT_PAPER_MILL, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_GOODS, 0, CT_INVALID, 0, 5, CT_PAPER, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1228,7 +1229,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_steel_mill, 0, NULL, - 215, 2, 0, 0, 0, 5, 0, 0, 0, 10, + 215, 0xFFFFFFFF, 2, 0, 0, 0, 5, 0, 0, 0, 10, IT_IRON_MINE, IT_FACTORY, IT_INVALID, CHECK_NOTHING, CT_STEEL, 0, CT_INVALID, 0, 5, CT_IRON_ORE, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1238,7 +1239,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_farm, 3, _farm_sounds, - 2000, 2, 4, 0, 0, 9, 9, 0, 0, 48, + 2000, 0xD9999999, 2, 4, 0, 0, 9, 9, 0, 0, 48, IT_FACTORY, IT_FOOD_PROCESS, IT_INVALID, CHECK_FARM, CT_GRAIN, 10, CT_LIVESTOCK, 10, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1248,7 +1249,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES), MI(_tile_table_copper_mine, 0, NULL, - 1640, 0, 0, 3, 0, 0, 0, 4, 0, 10, + 1640, 0xB3333333, 0, 0, 3, 0, 0, 0, 4, 0, 10, IT_FACTORY_2, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_COPPER_ORE, 10, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1258,7 +1259,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_oil_well, 0, NULL, - 1760, 0, 5, 3, 0, 4, 5, 5, 0, 152, + 1760, 0x99999999, 0, 5, 3, 0, 4, 5, 5, 0, 152, IT_OIL_REFINERY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_OIL, 12, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1268,7 +1269,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4837_NEW_OIL_RESERVES_FOUND, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_bank, 0, NULL, - 1544, 7, 0, 0, 0, 0, 0, 0, 0, 15, + 1544, 0xA6666666, 7, 0, 0, 0, 0, 0, 0, 0, 15, IT_BANK_TEMP, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_VALUABLES, 6, CT_INVALID, 0, 5, CT_VALUABLES, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1278,7 +1279,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_food_process, 0, NULL, - 206, 0, 2, 2, 0, 0, 3, 4, 0, 55, + 206, 0xFFFFFFFF, 0, 2, 2, 0, 0, 3, 4, 0, 55, IT_FRUIT_PLANTATION, IT_FARM, IT_FARM_2, CHECK_NOTHING, CT_FOOD, 0, CT_INVALID, 0, 5, CT_FRUIT, 256, CT_MAIZE, 256, CT_INVALID, 0, @@ -1288,7 +1289,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_paper_mill, 1, _sawmill_sounds, - 227, 0, 2, 0, 0, 0, 5, 0, 0, 10, + 227, 0xFFFFFFFF, 0, 2, 0, 0, 0, 5, 0, 0, 10, IT_FOREST, IT_PRINTING_WORKS, IT_INVALID, CHECK_NOTHING, CT_PAPER, 0, CT_INVALID, 0, 5, CT_WOOD, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1298,7 +1299,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_gold_mine, 0, NULL, - 1664, 0, 3, 0, 0, 0, 4, 0, 0, 194, + 1664, 0x99999999, 0, 3, 0, 0, 0, 4, 0, 0, 194, IT_BANK_TROPIC_ARCTIC, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_GOLD, 7, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1308,7 +1309,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_bank2, 0, NULL, - 151, 0, 3, 3, 0, 0, 6, 5, 0, 15, + 151, 0xA6666666, 0, 3, 3, 0, 0, 6, 5, 0, 15, IT_GOLD_MINE, IT_DIAMOND_MINE, IT_INVALID, CHECK_NOTHING, CT_INVALID, 0, CT_INVALID, 0, 5, CT_GOLD, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1318,7 +1319,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_diamond_mine, 0, NULL, - 1704, 0, 0, 3, 0, 0, 0, 4, 0, 184, + 1704, 0x99999999, 0, 0, 3, 0, 0, 0, 4, 0, 184, IT_BANK_TROPIC_ARCTIC, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_DIAMONDS, 7, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1328,7 +1329,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_iron_mine, 0, NULL, - 1760, 2, 0, 0, 0, 5, 0, 0, 0, 55, + 1760, 0xB3333333, 2, 0, 0, 0, 5, 0, 0, 0, 55, IT_STEEL_MILL, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_IRON_ORE, 10, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1338,7 +1339,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_fruit_plantation, 0, NULL, - 1800, 0, 0, 2, 0, 0, 0, 4, 0, 86, + 1800, 0xBFFFFFFF, 0, 0, 2, 0, 0, 0, 4, 0, 86, IT_FOOD_PROCESS, IT_INVALID, IT_INVALID, CHECK_PLANTATION, CT_FRUIT, 10, CT_INVALID, 0, 15, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1348,7 +1349,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES), MI(_tile_table_rubber_plantation, 0, NULL, - 1744, 0, 0, 3, 0, 0, 0, 4, 0, 39, + 1744, 0xBFFFFFFF, 0, 0, 3, 0, 0, 0, 4, 0, 39, IT_FACTORY_2, IT_INVALID, IT_INVALID, CHECK_PLANTATION, CT_RUBBER, 10, CT_INVALID, 0, 15, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1358,7 +1359,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES), MI(_tile_table_water_supply, 0, NULL, - 1592, 0, 0, 3, 0, 0, 0, 4, 0, 37, + 1592, 0xB3333333, 0, 0, 3, 0, 0, 0, 4, 0, 37, IT_WATER_TOWER, IT_INVALID, IT_INVALID, CHECK_WATER, CT_WATER, 12, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1368,7 +1369,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_water_tower, 0, NULL, - 115, 0, 0, 4, 0, 0, 0, 8, 0, 208, + 115, 0xFFFFFFFF, 0, 0, 4, 0, 0, 0, 8, 0, 208, IT_WATER_SUPPLY, IT_INVALID, IT_INVALID, CHECK_WATER, CT_INVALID, 0, CT_INVALID, 0, 5, CT_WATER, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1378,7 +1379,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_factory2, 1, _factory_sounds, - 208, 0, 0, 2, 0, 0, 0, 4, 0, 174, + 208, 0xFFFFFFFF, 0, 0, 2, 0, 0, 0, 4, 0, 174, IT_RUBBER_PLANTATION, IT_COPPER_MINE, IT_LUMBER_MILL, CHECK_PLANTATION, CT_GOODS, 0, CT_INVALID, 0, 5, CT_RUBBER, 256, CT_COPPER_ORE, 256, CT_WOOD, 256, @@ -1388,7 +1389,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_farm2, 0, NULL, - 2000, 0, 0, 1, 0, 0, 0, 2, 0, 48, + 2000, 0xD9999999, 0, 0, 1, 0, 0, 0, 2, 0, 48, IT_FOOD_PROCESS, IT_INVALID, IT_INVALID, CHECK_PLANTATION, CT_MAIZE, 11, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1398,7 +1399,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES), MI(_tile_table_lumber_mill, 0, NULL, - 135, 0, 0, 0, 0, 0, 0, 0, 0, 194, + 135, 0xFFFFFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 194, IT_FACTORY_2, IT_INVALID, IT_INVALID, CHECK_LUMBERMILL, CT_WOOD, 0, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1408,7 +1409,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4834_LACK_OF_NEARBY_TREES_CAUSES, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_cotton_candy, 0, NULL, - 1560, 0, 0, 0, 3, 0, 0, 0, 5, 48, + 1560, 0xBFFFFFFF, 0, 0, 0, 3, 0, 0, 0, 5, 48, IT_CANDY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_COTTON_CANDY, 13, CT_INVALID, 0, 30, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1418,7 +1419,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_candy_factory, 0, NULL, - 206, 0, 0, 0, 3, 0, 0, 0, 5, 174, + 206, 0xFFFFFFFF, 0, 0, 0, 3, 0, 0, 0, 5, 174, IT_COTTON_CANDY, IT_TOFFEE_QUARRY, IT_SUGAR_MINE, CHECK_NOTHING, CT_CANDY, 0, CT_INVALID, 0, 5, CT_SUGAR, 256, CT_TOFFEE, 256, CT_COTTON_CANDY, 256, @@ -1428,7 +1429,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_battery_farm, 0, NULL, - 1496, 0, 0, 0, 3, 0, 0, 0, 4, 39, + 1496, 0xB3333333, 0, 0, 0, 3, 0, 0, 0, 4, 39, IT_TOY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_BATTERIES, 11, CT_INVALID, 0, 30, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1438,7 +1439,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES), MI(_tile_table_cola_wells, 0, NULL, - 1544, 0, 0, 0, 3, 0, 0, 0, 5, 55, + 1544, 0x99999999, 0, 0, 0, 3, 0, 0, 0, 5, 55, IT_FIZZY_DRINK_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_COLA, 12, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1448,7 +1449,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_toy_shop, 0, NULL, - 133, 0, 0, 0, 3, 0, 0, 0, 4, 208, + 133, 0xFFFFFFFF, 0, 0, 0, 3, 0, 0, 0, 4, 208, IT_TOY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_INVALID, 0, CT_INVALID, 0, 5, CT_TOYS, 256, CT_INVALID, 0, CT_INVALID, 0, @@ -1458,7 +1459,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_toy_factory, 0, NULL, - 163, 0, 0, 0, 3, 0, 0, 0, 5, 10, + 163, 0xFFFFFFFF, 0, 0, 0, 3, 0, 0, 0, 5, 10, IT_PLASTIC_FOUNTAINS, IT_BATTERY_FARM, IT_TOY_SHOP, CHECK_NOTHING, CT_TOYS, 0, CT_INVALID, 0, 5, CT_PLASTIC, 256, CT_BATTERIES, 256, CT_INVALID, 0, @@ -1468,7 +1469,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_plastic_fountain, 1, _plastic_mine_sounds, - 1536, 0, 0, 0, 3, 0, 0, 0, 5, 37, + 1536, 0xA6666666, 0, 0, 0, 3, 0, 0, 0, 5, 37, IT_TOY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_PLASTIC, 14, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1478,7 +1479,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_fizzy_drink, 0, NULL, - 177, 0, 0, 0, 3, 0, 0, 0, 4, 184, + 177, 0xFFFFFFFF, 0, 0, 0, 3, 0, 0, 0, 4, 184, IT_COLA_WELLS, IT_BUBBLE_GENERATOR, IT_INVALID, CHECK_NOTHING, CT_FIZZY_DRINKS, 0, CT_INVALID, 0, 5, CT_COLA, 256, CT_BUBBLES, 256, CT_INVALID, 0, @@ -1488,7 +1489,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_bubble_generator, 0, NULL, - 1624, 0, 0, 0, 3, 0, 0, 0, 5, 152, + 1624, 0xB3333333, 0, 0, 0, 3, 0, 0, 0, 5, 152, IT_FIZZY_DRINK_FACTORY, IT_INVALID, IT_INVALID, CHECK_BUBBLEGEN, CT_BUBBLES, 13, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1498,7 +1499,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_toffee_quarry, 0, NULL, - 1704, 0, 0, 0, 3, 0, 0, 0, 5, 194, + 1704, 0xCCCCCCCC, 0, 0, 0, 3, 0, 0, 0, 5, 194, IT_CANDY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_TOFFEE, 10, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, @@ -1508,7 +1509,7 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = { STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50), MI(_tile_table_sugar_mine, 0, NULL, - 1680, 0, 0, 0, 2, 0, 0, 0, 4, 15, + 1680, 0xBFFFFFFF, 0, 0, 0, 2, 0, 0, 0, 4, 15, IT_CANDY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING, CT_SUGAR, 11, CT_INVALID, 0, 5, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, 0, diff --git a/src/variables.h b/src/variables.h index 704e58996..9a825354c 100644 --- a/src/variables.h +++ b/src/variables.h @@ -95,7 +95,7 @@ struct Patches { bool selectgoods; // only send the goods to station if a train has been there bool longbridges; // allow 100 tile long bridges bool gotodepot; // allow goto depot in orders - bool build_rawmaterial_ind; // allow building raw material industries + uint8 raw_industry_construction; ///< Type of (raw) industry construction (none, "normal", prospecting) bool multiple_industry_per_town; // allow many industries of the same type per town bool same_industry_close; // allow same type industries to be built close to each other bool lost_train_warn; // if a train can't find its destination, show a warning -- cgit v1.2.3-54-g00ecf