Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/worker.js
var PETRA = function(m) | (function(m) | ||||
{ | { | ||||
/** | /** | ||||
* This class makes a worker do as instructed by the economy manager | * This class makes a worker do as instructed by the economy manager | ||||
*/ | */ | ||||
m.Worker = function(base) | m.Worker = function(base) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,095 Lines • ▼ Show 20 Lines | if (gameState.ai.elapsedTime - approachingTime > 10) | ||||
this.ent.setMetadata(PlayerID, "approachingTarget", undefined); | this.ent.setMetadata(PlayerID, "approachingTarget", undefined); | ||||
this.ent.gather(target); | this.ent.gather(target); | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
return false; | return false; | ||||
}; | }; | ||||
return m; | }(PETRA)); | ||||
}(PETRA); |
Wildfire Games · Phabricator