forked from 0ad/0ad
Adds attackTimes to AI entity templates. Fixes #991.
This was SVN commit r10407.
This commit is contained in:
parent
20047ffe76
commit
c73c0870f1
@ -107,6 +107,16 @@ var EntityTemplate = Class({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
attackTimes: function(type) {
|
||||||
|
if (!this._template.Attack || !this._template.Attack[type])
|
||||||
|
return undefined;
|
||||||
|
|
||||||
|
return {
|
||||||
|
prepare: +(this.template[type].PrepareTime || 0),
|
||||||
|
repeat: +(this.template[type].RepeatTime || 1000)
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
buildableEntities: function() {
|
buildableEntities: function() {
|
||||||
if (!this._template.Builder)
|
if (!this._template.Builder)
|
||||||
|
Loading…
Reference in New Issue
Block a user