Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/ai/petra/worker.js
Show First 20 Lines • Show All 870 Lines • ▼ Show 20 Lines | for (let dropsite of fishDropsites) | ||||
continue; | continue; | ||||
distMin = Math.min(distMin, API3.SquareVectorDistance(pos, dropsite.position())); | distMin = Math.min(distMin, API3.SquareVectorDistance(pos, dropsite.position())); | ||||
} | } | ||||
return distMin; | return distMin; | ||||
}; | }; | ||||
let exhausted = true; | let exhausted = true; | ||||
let gatherRates = this.ent.resourceGatherRates(); | let gatherRates = this.ent.resourceGatherRates(); | ||||
resources.forEach(function(supply) | resources.forEach((supply) => { | ||||
{ | |||||
if (!supply.position()) | if (!supply.position()) | ||||
return; | return; | ||||
// check that it is accessible | // check that it is accessible | ||||
if (gameState.ai.HQ.navalManager.getFishSea(gameState, supply) != fisherSea) | if (gameState.ai.HQ.navalManager.getFishSea(gameState, supply) != fisherSea) | ||||
return; | return; | ||||
exhausted = false; | exhausted = false; | ||||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator