Differential D3134 Diff 14803 ps/trunk/binaries/data/mods/public/maps/tutorials/starting_economy_walkthrough.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/tutorials/starting_economy_walkthrough.js
Show First 20 Lines • Show All 305 Lines • ▼ Show 20 Lines | Trigger.prototype.tutorialGoals = [ | ||||
{ | { | ||||
if (msg.cmd.type == "gather" && msg.cmd.target && | if (msg.cmd.type == "gather" && msg.cmd.target && | ||||
TriggerHelper.GetResourceType(msg.cmd.target).specific == "meat") | TriggerHelper.GetResourceType(msg.cmd.target).specific == "meat") | ||||
this.NextGoal(); | this.NextGoal(); | ||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("A field can have up to five farmers working on it. To add additional gatherers, select the Civic Center and setup a rally point on a field by right-clicking on it. As long as the field is not yet build, new workers sent by a rally point will help building it, while they will gather it when built.") | markForTranslation("Up to five Workers can gather from a Field. To add additional Workers, select the Civic Center and set a rally point on a Field by right-clicking on it. If the Field is not yet finished, new Workers sent by a rally point will help building it, and when built, they will gather food.") | ||||
], | ], | ||||
"OnPlayerCommand": function(msg) | "OnPlayerCommand": function(msg) | ||||
{ | { | ||||
if (msg.cmd.type != "set-rallypoint" || !msg.cmd.data || !msg.cmd.data.command || | if (msg.cmd.type != "set-rallypoint" || !msg.cmd.data || !msg.cmd.data.command || | ||||
(msg.cmd.data.command != "build" || !msg.cmd.data.target || !TriggerHelper.EntityMatchesClassList(msg.cmd.data.target, "Field")) && | (msg.cmd.data.command != "build" || !msg.cmd.data.target || !TriggerHelper.EntityMatchesClassList(msg.cmd.data.target, "Field")) && | ||||
(msg.cmd.data.command != "gather" || !msg.cmd.data.resourceType || msg.cmd.data.resourceType.specific != "grain")) | (msg.cmd.data.command != "gather" || !msg.cmd.data.resourceType || msg.cmd.data.resourceType.specific != "grain")) | ||||
{ | { | ||||
this.WarningMessage(markForTranslation("Select the Civic Center and right-click on the field.")); | this.WarningMessage(markForTranslation("Select the Civic Center and right-click on the field.")); | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator