Change: prettify the display of goals a bit with destination name

This commit is contained in:
Andy
2014-12-28 14:53:21 +00:00
parent 672cf68352
commit 7d16de450f

View File

@@ -165,9 +165,16 @@ function FMainClass::CreateChallenge(cid)
} }
if (cdata != null) { if (cdata != null) {
cdata.AddActiveGoal(cargo, accept, amount); cdata.AddActiveGoal(cargo, accept, amount);
local goal_text = "Company " + cid + " should deliver " + amount + local destination_name = "foo";
" of " + GSCargo.GetCargoLabel(this.cargoes[cargo].cid); if ("town" in accept) {
GSLog.Info(goal_text); 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); GSGoal.New(cid, goal_text, GSGoal.GT_NONE, 0);
break; break;
} }