Fix #2070; cannot sell when building is being captured
This commit is contained in:
committed by
Chris Forbes
parent
15dcd6a9f6
commit
45f5c054d5
@@ -19,6 +19,9 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
{
|
{
|
||||||
public override Activity Tick(Actor self)
|
public override Activity Tick(Actor self)
|
||||||
{
|
{
|
||||||
|
var capturing = self.TraitOrDefault<Capturable>();
|
||||||
|
if (capturing != null && capturing.CaptureInProgress) return NextActivity;
|
||||||
|
|
||||||
var h = self.TraitOrDefault<Health>();
|
var h = self.TraitOrDefault<Health>();
|
||||||
var si = self.Info.Traits.Get<SellableInfo>();
|
var si = self.Info.Traits.Get<SellableInfo>();
|
||||||
var pr = self.Owner.PlayerActor.Trait<PlayerResources>();
|
var pr = self.Owner.PlayerActor.Trait<PlayerResources>();
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
if (order.OrderString == "Sell" && !Selling)
|
if (order.OrderString == "Sell" && !Selling)
|
||||||
{
|
{
|
||||||
|
var capturing = self.TraitOrDefault<Capturable>();
|
||||||
|
if (capturing != null && capturing.CaptureInProgress)
|
||||||
|
return;
|
||||||
|
|
||||||
Selling = true;
|
Selling = true;
|
||||||
|
|
||||||
foreach( var ns in self.TraitsImplementing<INotifySold>() )
|
foreach( var ns in self.TraitsImplementing<INotifySold>() )
|
||||||
|
|||||||
Reference in New Issue
Block a user