|
@@ -1796,11 +1796,11 @@ static void DoCreateNewIndustry(Industry
|
|
|
i->counter = GB(r, 4, 12);
|
|
|
i->random = initial_random_bits;
|
|
|
i->was_cargo_delivered = false;
|
|
|
i->last_prod_year = _cur_year;
|
|
|
i->last_prod_year = TimerGameCalendar::year;
|
|
|
i->founder = founder;
|
|
|
i->ctlflags = INDCTL_NONE;
|
|
|
|
|
|
i->construction_date = _date;
|
|
|
i->construction_date = TimerGameCalendar::date;
|
|
|
i->construction_type = (_game_mode == GM_EDITOR) ? ICT_SCENARIO_EDITOR :
|
|
|
(_generating_world ? ICT_MAP_GENERATION : ICT_NORMAL_GAMEPLAY);
|
|
|
|
|
@@ -2246,8 +2246,8 @@ static uint16 GetIndustryGamePlayProbabi
|
|
|
const IndustrySpec *ind_spc = GetIndustrySpec(it);
|
|
|
byte chance = ind_spc->appear_ingame[_settings_game.game_creation.landscape];
|
|
|
if (!ind_spc->enabled || ind_spc->layouts.empty() ||
|
|
|
((ind_spc->behaviour & INDUSTRYBEH_BEFORE_1950) && _cur_year > 1950) ||
|
|
|
((ind_spc->behaviour & INDUSTRYBEH_AFTER_1960) && _cur_year < 1960) ||
|
|
|
((ind_spc->behaviour & INDUSTRYBEH_BEFORE_1950) && TimerGameCalendar::year > 1950) ||
|
|
|
((ind_spc->behaviour & INDUSTRYBEH_AFTER_1960) && TimerGameCalendar::year < 1960) ||
|
|
|
(chance = GetIndustryProbabilityCallback(it, IACT_RANDOMCREATION, chance)) == 0) {
|
|
|
*min_number = 0;
|
|
|
return 0;
|
|
@@ -2421,7 +2421,7 @@ static void UpdateIndustryStatistics(Ind
|
|
|
if (i->produced_cargo[j] != CT_INVALID) {
|
|
|
byte pct = 0;
|
|
|
if (i->this_month_production[j] != 0) {
|
|
|
i->last_prod_year = _cur_year;
|
|
|
i->last_prod_year = TimerGameCalendar::year;
|
|
|
pct = std::min(i->this_month_transported[j] * 256 / i->this_month_production[j], 255);
|
|
|
}
|
|
|
i->last_month_pct_transported[j] = pct;
|
|
@@ -2856,7 +2856,7 @@ static void ChangeIndustryProduction(Ind
|
|
|
if ((i->ctlflags & INDCTL_NO_PRODUCTION_INCREASE) && (mul > 0 || increment > 0)) return;
|
|
|
|
|
|
if (!callback_enabled && (indspec->life_type & INDUSTRYLIFE_PROCESSING)) {
|
|
|
if ( (byte)(_cur_year - i->last_prod_year) >= 5 && Chance16(1, original_economy ? 2 : 180)) {
|
|
|
if ( (byte)(TimerGameCalendar::year - i->last_prod_year) >= 5 && Chance16(1, original_economy ? 2 : 180)) {
|
|
|
closeit = true;
|
|
|
}
|
|
|
}
|