From b0b0fac84764c7da015de1dc0f4d58a3703daba0 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 13 Sep 2012 07:09:44 +1200 Subject: [PATCH] get rid of Sellable.Selling state --- OpenRA.Mods.RA/Activities/CaptureActor.cs | 4 ---- OpenRA.Mods.RA/Sellable.cs | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/OpenRA.Mods.RA/Activities/CaptureActor.cs b/OpenRA.Mods.RA/Activities/CaptureActor.cs index 0dfb33f05d..765832ac16 100644 --- a/OpenRA.Mods.RA/Activities/CaptureActor.cs +++ b/OpenRA.Mods.RA/Activities/CaptureActor.cs @@ -36,10 +36,6 @@ namespace OpenRA.Mods.RA.Activities if (capturable != null && capturable.CaptureInProgress && capturable.Captor.Owner.Stances[self.Owner] == Stance.Ally) return NextActivity; - var sellable = target.TraitOrDefault(); - if (sellable != null && sellable.Selling) - return NextActivity; - if (!target.Trait().BeginCapture(target, self)) return NextActivity; diff --git a/OpenRA.Mods.RA/Sellable.cs b/OpenRA.Mods.RA/Sellable.cs index b4f014e1fe..a70fbac450 100644 --- a/OpenRA.Mods.RA/Sellable.cs +++ b/OpenRA.Mods.RA/Sellable.cs @@ -22,11 +22,9 @@ namespace OpenRA.Mods.RA public class Sellable : IResolveOrder { - [Sync] public bool Selling = false; - public void ResolveOrder(Actor self, Order order) { - if (order.OrderString == "Sell" && !Selling) + if (order.OrderString == "Sell") { var capturing = self.TraitOrDefault(); if (capturing != null && capturing.CaptureInProgress) @@ -35,8 +33,6 @@ namespace OpenRA.Mods.RA if (!self.Trait().Lock()) return; - Selling = true; - foreach( var ns in self.TraitsImplementing() ) ns.Selling( self );