Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Heal.js
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | "<element name='HealableClasses' a:help='The target must have one of these classes to be healable.'>" + | ||||
"</attribute>" + | "</attribute>" + | ||||
"<text/>" + | "<text/>" + | ||||
"</element>"; | "</element>"; | ||||
Heal.prototype.Init = function() | Heal.prototype.Init = function() | ||||
{ | { | ||||
}; | }; | ||||
Heal.prototype.Update = function(newTemplate) | |||||
{ | |||||
this.template = newTemplate; | |||||
// TODO: only do this if something changed | |||||
let cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI); | |||||
if (!cmpUnitAI) | |||||
return; | |||||
cmpUnitAI.UpdateRangeQueries(); | |||||
}; | |||||
Heal.prototype.GetTimers = function() | Heal.prototype.GetTimers = function() | ||||
{ | { | ||||
return { | return { | ||||
"prepare": 1000, | "prepare": 1000, | ||||
"repeat": this.GetInterval() | "repeat": this.GetInterval() | ||||
}; | }; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 219 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator