Code cleanup.

This was SVN commit r16778.
This commit is contained in:
leper 2015-06-16 14:35:16 +00:00
parent c8a5708654
commit a568b42bf9

View File

@ -34,7 +34,6 @@ Armour.prototype.Schema =
Armour.prototype.Init = function() Armour.prototype.Init = function()
{ {
this.nextAlertTime = 0;
this.invulnerable = false; this.invulnerable = false;
}; };
@ -78,30 +77,18 @@ Armour.prototype.GetArmourStrengths = function()
type = "Foundation/" + type; type = "Foundation/" + type;
} }
else else
{
strength = +this.template[type]; strength = +this.template[type];
}
strength = ApplyValueModificationsToEntity("Armour/" + type, strength, this.entity); return ApplyValueModificationsToEntity("Armour/" + type, strength, this.entity);
return strength;
}; };
if (Engine.QueryInterface(this.entity, IID_Foundation) && this.template.Foundation) var foundation = Engine.QueryInterface(this.entity, IID_Foundation) && this.template.Foundation;
{
return { return {
hack: applyMods("Hack", true), "hack": applyMods("Hack", foundation),
pierce: applyMods("Pierce", true), "pierce": applyMods("Pierce", foundation),
crush: applyMods("Crush", true) "crush": applyMods("Crush", foundation)
}; };
}
else
{
return {
hack: applyMods("Hack"),
pierce: applyMods("Pierce"),
crush: applyMods("Crush")
};
}
}; };
Engine.RegisterComponentType(IID_DamageReceiver, "Armour", Armour); Engine.RegisterComponentType(IID_DamageReceiver, "Armour", Armour);