Hook up Building.Capturable and remove unused field
This commit is contained in:
@@ -34,7 +34,6 @@ namespace OpenRA.Traits
|
|||||||
public readonly bool Capturable = false;
|
public readonly bool Capturable = false;
|
||||||
public readonly bool Repairable = true;
|
public readonly bool Repairable = true;
|
||||||
public readonly string Footprint = "x";
|
public readonly string Footprint = "x";
|
||||||
public readonly string[] Produces = { }; // does this go somewhere else?
|
|
||||||
public readonly int2 Dimensions = new int2(1, 1);
|
public readonly int2 Dimensions = new int2(1, 1);
|
||||||
public readonly bool Unsellable = false;
|
public readonly bool Unsellable = false;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA
|
|||||||
if (mi.Button != MouseButton.Right) return null;
|
if (mi.Button != MouseButton.Right) return null;
|
||||||
if (underCursor == null) return null;
|
if (underCursor == null) return null;
|
||||||
if (self.Owner.Stances[underCursor.Owner] != Stance.Enemy) return null;
|
if (self.Owner.Stances[underCursor.Owner] != Stance.Enemy) return null;
|
||||||
if (!underCursor.traits.Contains<Building>()) return null;
|
if (!underCursor.traits.Contains<Building>() || !underCursor.Info.Traits.Get<BuildingInfo>().Capturable) return null;
|
||||||
|
|
||||||
return new Order("CaptureBuilding", self, underCursor);
|
return new Order("CaptureBuilding", self, underCursor);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user