get rid of Sellable.Selling state
This commit is contained in:
@@ -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<Capturable>();
|
||||
if (capturing != null && capturing.CaptureInProgress)
|
||||
@@ -35,8 +33,6 @@ namespace OpenRA.Mods.RA
|
||||
if (!self.Trait<Building>().Lock())
|
||||
return;
|
||||
|
||||
Selling = true;
|
||||
|
||||
foreach( var ns in self.TraitsImplementing<INotifySold>() )
|
||||
ns.Selling( self );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user