Change: proof of concept lang file with string parameter

This commit is contained in:
Andy
2014-12-27 15:12:21 +00:00
parent b0ab20f62b
commit 222bd24ea9
2 changed files with 5 additions and 1 deletions

1
lang/english.txt Normal file
View File

@@ -0,0 +1 @@
STR_LAKE_NEWS :There are {NUM} {}fish here

View File

@@ -18,12 +18,15 @@ function FMainClass::Start()
} }
while (true) { while (true) {
local lake_news = GSText(GSText.STR_LAKE_NEWS);
if (GSBase.Chance(1, 5)) { if (GSBase.Chance(1, 5)) {
GSLog.Info("We're at at the bottom of the lake."); GSLog.Info("We're at at the bottom of the lake.");
lake_news.AddParam(100);
} else { } else {
GSLog.Info("We're not at the bottom of the lake."); GSLog.Info("We're not at the bottom of the lake.");
lake_news.AddParam(200);
} }
GSNews.Create(GSNews.NT_GENERAL, "There is a fish here", GSCompany.COMPANY_INVALID); GSNews.Create(GSNews.NT_GENERAL, lake_news, GSCompany.COMPANY_INVALID);
// GSLog.Info("I am a very new AI with a ticker called MyNewAI and I am at tick " + this.GetTick()); // GSLog.Info("I am a very new AI with a ticker called MyNewAI and I am at tick " + this.GetTick());
this.Sleep(50); this.Sleep(50);
} }