forked from 0ad/0ad
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:
parent
7a164c6a7b
commit
fc325991a0
@ -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;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user