Added visionRange function to read this value from the templates for the AI to use.

This was SVN commit r10553.
This commit is contained in:
Jonathan Waller 2011-11-18 21:11:15 +00:00
parent 7a164c6a7b
commit fc325991a0

View File

@ -216,6 +216,12 @@ var EntityTemplate = Class({
var territories = this.buildTerritories();
return (territories && territories.indexOf(territory) != -1);
},
visionRange: function() {
if (!this._template.Vision)
return undefined;
return this._template.Vision.Range;
},
});