From 9680d08b964213e327d0fd41d1b0236ae6a0982c Mon Sep 17 00:00:00 2001 From: bb Date: Mon, 22 Jun 2020 20:12:10 +0000 Subject: [PATCH] Remove unused bonuses schema from deathDamage refs 16b452cf91 Patch By: Freagarach Differential Revision: https://code.wildfiregames.com/D2831 This was SVN commit r23785. --- .../simulation/components/DeathDamage.js | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/binaries/data/mods/public/simulation/components/DeathDamage.js b/binaries/data/mods/public/simulation/components/DeathDamage.js index dad477ed43..5f2ec3f5c1 100644 --- a/binaries/data/mods/public/simulation/components/DeathDamage.js +++ b/binaries/data/mods/public/simulation/components/DeathDamage.js @@ -1,23 +1,5 @@ function DeathDamage() {} -DeathDamage.prototype.bonusesSchema = - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - ""; - DeathDamage.prototype.Schema = "When a unit or building is destroyed, it inflicts damage to nearby units." + "" + @@ -30,16 +12,17 @@ DeathDamage.prototype.Schema = "50.0" + "" + "" + - "" + - "" + - "" + + "" + + "" + + "" + Attacking.BuildAttackEffectsSchema(); DeathDamage.prototype.Init = function() { }; -DeathDamage.prototype.Serialize = null; // we have no dynamic state to save +// We have no dynamic state to save. +DeathDamage.prototype.Serialize = null; DeathDamage.prototype.GetDeathDamageEffects = function() { @@ -58,15 +41,13 @@ DeathDamage.prototype.CauseDeathDamage = function() if (owner == INVALID_PLAYER) warn("Unit causing death damage does not have any owner."); - let radius = ApplyValueModificationsToEntity("DeathDamage/Range", +this.template.Range, this.entity); - Attacking.CauseDamageOverArea({ "type": "Death", "attackData": this.GetDeathDamageEffects(), "attacker": this.entity, "attackerOwner": owner, "origin": pos, - "radius": radius, + "radius": ApplyValueModificationsToEntity("DeathDamage/Range", +this.template.Range, this.entity), "shape": this.template.Shape, "friendlyFire": this.template.FriendlyFire == "true", });