Adds attackTimes to AI entity templates. Fixes #991.

This was SVN commit r10407.
This commit is contained in:
historic_bruno 2011-10-15 23:38:58 +00:00
parent 20047ffe76
commit c73c0870f1

View File

@ -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)