// If any cargo has been transported from this industry, reset the counter.
// Then increment the counter.
// If counter is greater than 96 (8 years of inactivity), the industry has 0.5% chance of closing
switch(FEAT_INDUSTRIES, SELF, monthly_prod_change_switch,
[
STORE_PERM ((transported_last_month_1 + transported_last_month_2)>0 ? 0 : (LOAD_PERM(0x00) + 1), 0x00),
(LOAD_PERM(0x00) > 96) ? (((extra_callback_info2 % 200) < 1 ) ? 1 : 0): 0
]) {
0: return CB_RESULT_IND_PROD_NO_CHANGE;
return CB_RESULT_IND_PROD_CLOSE;
}
/* Whenever any cargo is supplied to the industry, reset the counter to 0 */
produce (production_counter_reset, 0,0,0,0,STORE_PERM(0,0x00));