diff --git a/lang/english.txt b/lang/english.txt index e6e2845..1ff66fc 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1 +1,4 @@ -STR_LAKE_NEWS :There are {NUM} {}fish here +STR_LAKE_NEWS :There are {NUM} {}fish here +STR_COMPANY_GOAL :Deliver {NUM} of {CARGO_LIST} to {STRING} +STR_TOWN_NAME :{TOWN} +STR_INDUSTRY_NAME :{INDUSTRY} diff --git a/main.nut b/main.nut index cb75132..bd129eb 100644 --- a/main.nut +++ b/main.nut @@ -166,15 +166,18 @@ function FMainClass::CreateChallenge(cid) if (cdata != null) { cdata.AddActiveGoal(cargo, accept, amount); local destination_name = "foo"; + local destination_string = "foo"; if ("town" in accept) { destination_name = GSTown.GetName(accept.town); + destination_string = GSText(GSText.STR_TOWN_NAME, accept.town); } else if ("ind" in accept) { destination_name = GSIndustry.GetName(accept.ind); + destination_string = GSText(GSText.STR_INDUSTRY_NAME, accept.ind); } - local goal_text = "Deliver " + amount + - " of " + GSCargo.GetCargoLabel(this.cargoes[cargo].cid) - + " to " + destination_name; - GSLog.Info("Company " + cid + ": " + goal_text); + local goal_text = GSText(GSText.STR_COMPANY_GOAL, amount, 1 << cargo, destination_string); + GSLog.Info("Company " + cid + ": " + amount + " of " + + GSCargo.GetCargoLabel(this.cargoes[cargo].cid) + + " to " + destination_name); GSGoal.New(cid, goal_text, GSGoal.GT_NONE, 0); break; }