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:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user