From 008c634c4b7c8b4b5e4fb1329e9bab0f676053cb Mon Sep 17 00:00:00 2001 From: Alberth Date: Sat, 27 Dec 2014 11:59:46 +0100 Subject: [PATCH] Add: Examine available cargoes. --- main.nut | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/main.nut b/main.nut index 69ea7eb..4e2e45d 100644 --- a/main.nut +++ b/main.nut @@ -5,16 +5,18 @@ class FMainClass extends GSController function FMainClass::Start() { -// for (local cid = 0; cid < 32; cid += 1) { -// if (!GSCargo.IsValidCargo(cid)) continue; -// if (GSCargo.IsFreight(cid)) { -// GSLog.Info(cid + " is freight."); -// } else if (GSCargo.GetTownEffect(cid) != GSCargo.Town_Effect.TE_NONE) { -// GSLog.Info(cid + " affects town."); -// } else { -// GSLog.Info(cid + " does nothing."); -// } -// } + for (local cid = 0; cid < 32; cid += 1) { + if (!GSCargo.IsValidCargo(cid)) continue; + local label = cid + " (" + GSCargo.GetCargoLabel(cid) + ")" + if (GSCargo.IsFreight(cid)) { + GSLog.Info(label + " is freight."); + } else if (GSCargo.GetTownEffect(cid) != GSCargo.TE_NONE) { + GSLog.Info(label + " affects town."); + } else { + GSLog.Info(label + " does nothing."); + } + } + while (true) { if (GSBase.Chance(1, 5)) { GSLog.Info("We're at at the bottom of the lake.");