Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
Show First 20 Lines • Show All 5,431 Lines • ▼ Show 20 Lines | |||||
* interrupted by attacks. | * interrupted by attacks. | ||||
*/ | */ | ||||
UnitAI.prototype.Flee = function(target, queued) | UnitAI.prototype.Flee = function(target, queued) | ||||
{ | { | ||||
this.AddOrder("Flee", { "target": target, "force": false }, queued); | this.AddOrder("Flee", { "target": target, "force": false }, queued); | ||||
}; | }; | ||||
/** | /** | ||||
* Adds cheer order to the queue. Forced so it won't be interrupted by attacks. | * Pushes a cheer order to the front of the queue. Forced so it won't be interrupted by attacks. | ||||
*/ | */ | ||||
UnitAI.prototype.Cheer = function() | UnitAI.prototype.Cheer = function() | ||||
{ | { | ||||
this.AddOrder("Cheering", { "force": true }, false); | this.PushOrderFront("Cheering", { "force": true }); | ||||
}; | }; | ||||
UnitAI.prototype.Pack = function(queued) | UnitAI.prototype.Pack = function(queued) | ||||
{ | { | ||||
// Check that we can pack | // Check that we can pack | ||||
if (this.CanPack()) | if (this.CanPack()) | ||||
this.AddOrder("Pack", { "force": true }, queued); | this.AddOrder("Pack", { "force": true }, queued); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 663 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator