Loading
  1.  
  2.  
  3. // If any cargo has been transported from this industry, reset the counter.
  4.  
  5. // Then increment the counter.
  6.  
  7. // If counter is greater than 96 (8 years of inactivity), the industry has 0.5% chance of closing
  8.  
  9. switch(FEAT_INDUSTRIES, SELF, monthly_prod_change_switch,
  10.  
  11.     [
  12.  
  13.         STORE_PERM ((transported_last_month_1 + transported_last_month_2)>0 ? 0 : (LOAD_PERM(0x00) + 1), 0x00),
  14.  
  15.         (LOAD_PERM(0x00) > 96) ? (((extra_callback_info2 % 200) < 1 ) ? 1 : 0): 0
  16.  
  17.     ]) {
  18.  
  19.         0: return CB_RESULT_IND_PROD_NO_CHANGE;
  20.  
  21.         return CB_RESULT_IND_PROD_CLOSE;
  22.  
  23. }
  24.  
  25. /* Whenever any cargo is supplied to the industry, reset the counter to 0 */
  26.  
  27. produce (production_counter_reset, 0,0,0,0,STORE_PERM(0,0x00));

Comments