Port RepairBridge to the new Enter activity.

This commit is contained in:
Paul Chote
2019-02-01 20:51:34 +00:00
committed by Oliver Brakmann
parent 49e3c46d00
commit 4551625bb4
3 changed files with 51 additions and 27 deletions

View File

@@ -82,6 +82,7 @@ namespace OpenRA.Mods.Common.Traits
public void ResolveOrder(Actor self, Order order)
{
// TODO: Add support for FrozenActors
// The activity supports it, but still missing way to freeze bridge state on the hut
if (order.OrderString == "RepairBridge" && order.Target.Type == TargetType.Actor)
{
var targetActor = order.Target.Actor;
@@ -104,7 +105,7 @@ namespace OpenRA.Mods.Common.Traits
self.CancelActivity();
self.SetTargetLine(order.Target, Color.Yellow);
self.QueueActivity(new RepairBridge(self, targetActor, info.EnterBehaviour, info.RepairNotification));
self.QueueActivity(new RepairBridge(self, order.Target, info.EnterBehaviour, info.RepairNotification));
}
}