From 035b96f46975c25fbb4bc63529993d900f69c68d Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Wed, 18 Feb 2015 11:13:48 +0100 Subject: [PATCH 1/2] Made the ts conyard sellable --- mods/ts/rules/structures.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/mods/ts/rules/structures.yaml b/mods/ts/rules/structures.yaml index 1862aab951..e02bc20d19 100644 --- a/mods/ts/rules/structures.yaml +++ b/mods/ts/rules/structures.yaml @@ -32,7 +32,6 @@ GACNST: ProductionType: Building ProductionBar@Defense: ProductionType: Defense - -Sellable: WithIdleOverlay@TOP: Sequence: idle-top WithIdleOverlay@SIDE: From f63bc1e001638a64a6fea379b0d7cbe1004261e8 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Wed, 18 Feb 2015 11:15:11 +0100 Subject: [PATCH 2/2] Fix a glitch in WithBuildingPlacedOverlay when transforming the actor. --- .../Traits/Render/WithBuildingPlacedOverlay.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs b/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs index 92fe2c792e..3b1a90aa6b 100644 --- a/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs +++ b/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs @@ -33,7 +33,7 @@ namespace OpenRA.Mods.D2k.Traits public object Create(ActorInitializer init) { return new WithBuildingPlacedOverlay(init.Self, this); } } - public class WithBuildingPlacedOverlay : INotifyBuildComplete, INotifySold, INotifyDamageStateChanged, INotifyBuildingPlaced + public class WithBuildingPlacedOverlay : INotifyBuildComplete, INotifySold, INotifyDamageStateChanged, INotifyBuildingPlaced, INotifyTransform { Animation overlay; bool buildComplete; @@ -65,6 +65,14 @@ namespace OpenRA.Mods.D2k.Traits buildComplete = false; } + public void BeforeTransform(Actor self) + { + buildComplete = false; + } + + public void OnTransform(Actor self) { } + public void AfterTransform(Actor self) { } + public void DamageStateChanged(Actor self, AttackInfo e) { overlay.ReplaceAnim(RenderSprites.NormalizeSequence(overlay, e.DamageState, overlay.CurrentSequence.Name));