Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/AuraManager.js
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | for (let [key, mod] of mods) | ||||
usedKeys.add(key); | usedKeys.add(key); | ||||
} | } | ||||
} | } | ||||
return value * multiply + add; | return value * multiply + add; | ||||
}; | }; | ||||
AuraManager.prototype.OnGlobalOwnershipChanged = function(msg) | AuraManager.prototype.OnGlobalOwnershipChanged = function(msg) | ||||
{ | { | ||||
if (msg.to == -1) | |||||
wraitii: Might be worth commenting why this is useful and/or necessary. | |||||
Not Done Inline ActionsSomething like "Don't try to apply or remove bonus for units which are destroyed." fatherbushido: Something like "Don't try to apply or remove bonus for units which are destroyed."
That has to… | |||||
return; | |||||
for (let ent of this.globalAuraSources) | for (let ent of this.globalAuraSources) | ||||
{ | { | ||||
let cmpAuras = Engine.QueryInterface(ent, IID_Auras); | let cmpAuras = Engine.QueryInterface(ent, IID_Auras); | ||||
if (cmpAuras) | if (cmpAuras) | ||||
cmpAuras.RegisterGlobalOwnershipChanged(msg); | cmpAuras.RegisterGlobalOwnershipChanged(msg); | ||||
} | } | ||||
}; | }; | ||||
Engine.RegisterSystemComponentType(IID_AuraManager, "AuraManager", AuraManager); | Engine.RegisterSystemComponentType(IID_AuraManager, "AuraManager", AuraManager); |
Wildfire Games · Phabricator
Might be worth commenting why this is useful and/or necessary.