From 222bd24ea9326b4e0b9c0a46da22548315aa3807 Mon Sep 17 00:00:00 2001 From: Andy <1780327+andythenorth@users.noreply.github.com> Date: Sat, 27 Dec 2014 15:12:21 +0000 Subject: [PATCH] Change: proof of concept lang file with string parameter --- lang/english.txt | 1 + main.nut | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 lang/english.txt diff --git a/lang/english.txt b/lang/english.txt new file mode 100644 index 0000000..e6e2845 --- /dev/null +++ b/lang/english.txt @@ -0,0 +1 @@ +STR_LAKE_NEWS :There are {NUM} {}fish here diff --git a/main.nut b/main.nut index 04955a6..9367538 100644 --- a/main.nut +++ b/main.nut @@ -18,12 +18,15 @@ function FMainClass::Start() } while (true) { + local lake_news = GSText(GSText.STR_LAKE_NEWS); if (GSBase.Chance(1, 5)) { GSLog.Info("We're at at the bottom of the lake."); + lake_news.AddParam(100); } else { 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()); this.Sleep(50); }