summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index b6a45382d..4fd566b17 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1459,6 +1459,11 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
i->last_month_production[1] = i->production_rate[1] * 8;
i->founder = _current_player;
+ if (HASBIT(indspec->callback_flags, CBM_IND_DECIDE_COLOUR)) {
+ uint16 res = GetIndustryCallback(CBID_INDUSTRY_DECIDE_COLOUR, 0, 0, i, type, INVALID_TILE);
+ if (res != CALLBACK_FAILED) i->random_color = GB(res, 0, 4);
+ }
+
if (HASBIT(indspec->callback_flags, CBM_IND_INPUT_CARGO_TYPES)) {
for (j = 0; j < lengthof(i->accepts_cargo); j++) i->accepts_cargo[j] = CT_INVALID;
for (j = 0; j < lengthof(i->accepts_cargo); j++) {