Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KillCargo and FlashScreen to PortableChrono #13354

Merged
merged 1 commit into from May 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion OpenRA.Mods.Cnc/Traits/PortableChrono.cs
Expand Up @@ -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); }
Expand Down Expand Up @@ -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));
}
}

Expand Down