Allow actors that are not buildings to be sold.

The more humane way to refund units (as opposed the grinding them).
This commit is contained in:
atlimit8
2014-07-25 17:16:54 -05:00
parent 027887aa13
commit 0ba1fdcea3

View File

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