From 448993181b95c8940995bfc94e766976ba2ac271 Mon Sep 17 00:00:00 2001 From: Alberth Date: Sat, 27 Dec 2014 11:52:49 +0100 Subject: [PATCH] A little random functionality for the GS --- main.nut | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/main.nut b/main.nut index e69de29..69ea7eb 100644 --- a/main.nut +++ b/main.nut @@ -0,0 +1,27 @@ +class FMainClass extends GSController +{ + function Start(); +} + +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."); +// } +// } + while (true) { + if (GSBase.Chance(1, 5)) { + GSLog.Info("We're at at the bottom of the lake."); + } else { + GSLog.Info("We're not at the bottom of the lake."); + } +// GSLog.Info("I am a very new AI with a ticker called MyNewAI and I am at tick " + this.GetTick()); + this.Sleep(50); + } +}