Loading

Paste #pycvqzxce

  1. switch (FEAT_TRAINS, SELF, unicorn_resting_cost2, [
  2.   var[0xB4, 0, 0xFFFF]
  3. ]) {
  4.   0:       return 100; // cost when waiting for no reason
  5.   1..30:   return 50; // cost when driving very slow/accelerating/beaking
  6.   default: return 0; // normal operation
  7. }
  8.  
  9. switch (FEAT_TRAINS, SELF, unicorn_resting_cost, [
  10.   var[0x8A, 0, 0x0F] | (var[0xB2, 1, 0x01] << 4)
  11. ]) {
  12.   0x03:       return 10;  // cost when vehicle is loading/unloading
  13.   0x10..0x1F: return 10;  // cost when vehicle is stopped
  14.   default: unicorn_resting_cost2;
  15. }
  16.  
  17. item(...) {
  18.   ...
  19.   graphics {
  20.     running_cost_factor: unicorn_resting_cost;
  21.   }
  22. }

Version history

Revision # Author Created at
p6nxtyus2 Anonymous 25 Apr 2018, 18:12:48 UTC Diff

Comments