From 7d16de450f6f829f681cf6c42adac13276ba97fb Mon Sep 17 00:00:00 2001 From: Andy <1780327+andythenorth@users.noreply.github.com> Date: Sun, 28 Dec 2014 14:53:21 +0000 Subject: [PATCH] Change: prettify the display of goals a bit with destination name --- main.nut | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main.nut b/main.nut index 656f85b..cb75132 100644 --- a/main.nut +++ b/main.nut @@ -165,9 +165,16 @@ function FMainClass::CreateChallenge(cid) } if (cdata != null) { cdata.AddActiveGoal(cargo, accept, amount); - local goal_text = "Company " + cid + " should deliver " + amount + - " of " + GSCargo.GetCargoLabel(this.cargoes[cargo].cid); - GSLog.Info(goal_text); + local destination_name = "foo"; + if ("town" in accept) { + destination_name = GSTown.GetName(accept.town); + } else if ("ind" in accept) { + destination_name = GSIndustry.GetName(accept.ind); + } + local goal_text = "Deliver " + amount + + " of " + GSCargo.GetCargoLabel(this.cargoes[cargo].cid) + + " to " + destination_name; + GSLog.Info("Company " + cid + ": " + goal_text); GSGoal.New(cid, goal_text, GSGoal.GT_NONE, 0); break; }