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) {
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user