Loading

Paste #pf39rhyks

  1. // Examine cargo types of the game.
  2. function FMainClass::ExamineCargoes()
  3. {
  4.     this.cargoes = {};
  5.     this.num_cargoes = 0;
  6.  
  7.     for (local cid = 0; cid < 32; cid += 1) {
  8.         if (!GSCargo.IsValidCargo(cid)) continue;
  9.  
  10.         local is_freight = GSCargo.IsFreight(cid);
  11.         local town_effect = GSCargo.GetTownEffect(cid);
  12.         cargoes[num_cargoes] <- {cid=cid, freight=is_freight, effect=town_effect};
  13.         num_cargoes += 1;
  14.     }
  15. }

Comments