From 5631d8683ec5e1adb126630a4efc6a093e2393d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-R=C3=A9my=20Buchs?= Date: Thu, 25 May 2017 18:11:20 +0200 Subject: [PATCH] Add KillCargo and FlashScreen to PortableChrono --- OpenRA.Mods.Cnc/Traits/PortableChrono.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Cnc/Traits/PortableChrono.cs b/OpenRA.Mods.Cnc/Traits/PortableChrono.cs index 992b818e2b92..9ebf5c20fcf3 100644 --- a/OpenRA.Mods.Cnc/Traits/PortableChrono.cs +++ b/OpenRA.Mods.Cnc/Traits/PortableChrono.cs @@ -45,6 +45,12 @@ class PortableChronoInfo : ITraitInfo [Desc("Cursor to display when the targeted location is blocked.")] public readonly string TargetBlockedCursor = "move-blocked"; + [Desc("Kill cargo on teleporting.")] + public readonly bool KillCargo = true; + + [Desc("Flash the screen on teleporting.")] + public readonly bool FlashScreen = false; + [VoiceReference] public readonly string Voice = "Action"; public object Create(ActorInitializer init) { return new PortableChrono(this); } @@ -93,7 +99,7 @@ public void ResolveOrder(Actor self, Order order) { var maxDistance = Info.HasDistanceLimit ? Info.MaxDistance : (int?)null; self.CancelActivity(); - self.QueueActivity(new Teleport(self, order.TargetLocation, maxDistance, true, false, Info.ChronoshiftSound)); + self.QueueActivity(new Teleport(self, order.TargetLocation, maxDistance, Info.KillCargo, Info.FlashScreen, Info.ChronoshiftSound)); } }