Index: binaries/data/mods/public/art/actors/structures/carthaginians/wall_long.xml =================================================================== --- binaries/data/mods/public/art/actors/structures/carthaginians/wall_long.xml +++ binaries/data/mods/public/art/actors/structures/carthaginians/wall_long.xml @@ -19,6 +19,15 @@ + + + + + + + + + Index: binaries/data/mods/public/simulation/components/Upgrade.js =================================================================== --- binaries/data/mods/public/simulation/components/Upgrade.js +++ binaries/data/mods/public/simulation/components/Upgrade.js @@ -16,6 +16,11 @@ "" + "" + "" + + "" + + "" + + "" + + "" + + "" + "" + "" + "" + @@ -232,6 +237,7 @@ } this.upgrading = template; + this.SetUpgradeAnimationVariant(template); // Prevent cheating this.ChangeUpgradedEntityCount(1); @@ -262,6 +268,12 @@ this.upgrading = false; this.CancelTimer(); this.SetElapsedTime(0); + + let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual); + if (!cmpVisual) + return; + + cmpVisual.SelectAnimation("idle", false, 1.0); }; Upgrade.prototype.GetUpgradeTime = function(templateArg) @@ -295,6 +307,27 @@ this.elapsedTime = time; }; +/** + * @param {Object} templateArg - The object containing the upgrade data. + */ +Upgrade.prototype.SetUpgradeAnimationVariant = function(templateArg) +{ + let template = this.upgrading || templateArg; + let choice = this.upgradeTemplates[template]; + + if (!choice) + return; + + if (!this.template[choice].Variant) + return; + + let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual); + if (!cmpVisual) + return; + + cmpVisual.SelectAnimation(this.template[choice].Variant, false, 1.0); +}; + Upgrade.prototype.UpgradeProgress = function(data, lateness) { if (this.elapsedTime/1000.0 < this.GetUpgradeTime()) Index: binaries/data/mods/public/simulation/templates/template_structure_defensive_wall_long.xml =================================================================== --- binaries/data/mods/public/simulation/templates/template_structure_defensive_wall_long.xml +++ binaries/data/mods/public/simulation/templates/template_structure_defensive_wall_long.xml @@ -46,6 +46,7 @@ structures/{civ}_wall_gate + Upgrade This will allow you to let units circulate through your fortifications. 60