mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 15:30:00 +00:00
(svn r22548) -Codechange: Name also the magic number for the lumber mill's tree cutting action (FeyFre)
This commit is contained in:
parent
692d3433fb
commit
e5a88a1077
@ -36,6 +36,7 @@ static const int STATION_ACCEPTANCE_TICKS = 250; ///< cycle duration for updatin
|
|||||||
static const int CARGO_AGING_TICKS = 185; ///< cycle duration for aging cargo
|
static const int CARGO_AGING_TICKS = 185; ///< cycle duration for aging cargo
|
||||||
static const int INDUSTRY_PRODUCE_TICKS = 256; ///< cycle duration for industry production
|
static const int INDUSTRY_PRODUCE_TICKS = 256; ///< cycle duration for industry production
|
||||||
static const int TOWN_GROWTH_TICKS = 70; ///< cycle duration for towns trying to grow. (this originates from the size of the town array in TTD
|
static const int TOWN_GROWTH_TICKS = 70; ///< cycle duration for towns trying to grow. (this originates from the size of the town array in TTD
|
||||||
|
static const int INDUSTRY_CUT_TREE_TICKS = INDUSTRY_PRODUCE_TICKS * 2; ///< cycle duration for lumber mill's extra action
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1086,7 +1086,7 @@ static void ProduceIndustryGoods(Industry *i)
|
|||||||
if (plant) PlantRandomFarmField(i);
|
if (plant) PlantRandomFarmField(i);
|
||||||
}
|
}
|
||||||
if ((indbehav & INDUSTRYBEH_CUT_TREES) != 0) {
|
if ((indbehav & INDUSTRYBEH_CUT_TREES) != 0) {
|
||||||
bool cut = ((i->counter & 0x1FF) == 0);
|
bool cut = ((i->counter % INDUSTRY_CUT_TREE_TICKS) == 0);
|
||||||
if (HasBit(indsp->callback_mask, CBM_IND_SPECIAL_EFFECT)) {
|
if (HasBit(indsp->callback_mask, CBM_IND_SPECIAL_EFFECT)) {
|
||||||
cut = (GetIndustryCallback(CBID_INDUSTRY_SPECIAL_EFFECT, 0, 1, i, i->type, i->location.tile) != 0);
|
cut = (GetIndustryCallback(CBID_INDUSTRY_SPECIAL_EFFECT, 0, 1, i, i->type, i->location.tile) != 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user