Change: proof of concept lang file with string parameter
This commit is contained in:
1
lang/english.txt
Normal file
1
lang/english.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
STR_LAKE_NEWS :There are {NUM} {}fish here
|
||||||
5
main.nut
5
main.nut
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user