From 2e0d7d0e79a37ac3f452a4aa5eebff7f710fb656 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 992b818e2b..9ebf5c20fc 100644 --- a/OpenRA.Mods.Cnc/Traits/PortableChrono.cs +++ b/OpenRA.Mods.Cnc/Traits/PortableChrono.cs @@ -45,6 +45,12 @@ namespace OpenRA.Mods.Cnc.Traits [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 @@ namespace OpenRA.Mods.Cnc.Traits { 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)); } }