Merge pull request #6065 from atlimit8/SellNonBuildings

Sell non buildings
This commit is contained in:
Paul Chote
2014-07-26 15:52:33 +12:00
2 changed files with 4 additions and 2 deletions

View File

@@ -38,9 +38,11 @@ Also thanks to:
* Frank Razenberg (zzattack) * Frank Razenberg (zzattack)
* Gareth Needham (Ripley`) * Gareth Needham (Ripley`)
* Gordon Martin (Happy0) * Gordon Martin (Happy0)
* Ian T. Jacobsen (Smilex)
* Igor Popov (ihptru) * Igor Popov (ihptru)
* Iran * Iran
* James Dunne (jsd) * James Dunne (jsd)
* Jason (atlimit8)
* Jeff Harris (jeff_1amstudios) * Jeff Harris (jeff_1amstudios)
* Jes * Jes
* Joakim Lindberg (booom3) * Joakim Lindberg (booom3)
@@ -84,7 +86,6 @@ Also thanks to:
* Tristan Mühlbacher (MicroBit) * Tristan Mühlbacher (MicroBit)
* Vladimir Komarov (VrKomarov) * Vladimir Komarov (VrKomarov)
* Wuschel * Wuschel
* Ian T. Jacobsen (Smilex)
Using Simple DirectMedia Layer distributed under Using Simple DirectMedia Layer distributed under
the terms of the zlib license. the terms of the zlib license.

View File

@@ -31,7 +31,8 @@ namespace OpenRA.Mods.RA
public void Sell(Actor self) public void Sell(Actor self)
{ {
if (!self.Trait<Building>().Lock()) var building = self.TraitOrDefault<Building>();
if (building != null && !building.Lock())
return; return;
self.CancelActivity(); self.CancelActivity();