Change: prettify the display of goals a bit with destination name
This commit is contained in:
13
main.nut
13
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user