merged
This commit is contained in:
@@ -46,9 +46,14 @@ namespace OpenRa.Game.Traits
|
|||||||
var movement = self.traits.WithInterface<IMovement>().FirstOrDefault();
|
var movement = self.traits.WithInterface<IMovement>().FirstOrDefault();
|
||||||
if (order.OrderString == "Chronoshift" && movement.CanEnterCell(order.TargetLocation))
|
if (order.OrderString == "Chronoshift" && movement.CanEnterCell(order.TargetLocation))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Set up return-to-sender info
|
||||||
chronoshiftOrigin = self.Location;
|
chronoshiftOrigin = self.Location;
|
||||||
chronoshiftReturnTicks = (int)(Rules.General.ChronoDuration * 60 * 25);
|
chronoshiftReturnTicks = (int)(Rules.General.ChronoDuration * 60 * 25);
|
||||||
|
|
||||||
// TODO: Kill cargo if Rules.General.ChronoKillCargo says so
|
// TODO: Kill cargo if Rules.General.ChronoKillCargo says so
|
||||||
|
|
||||||
|
// Set up the teleport
|
||||||
Game.controller.CancelInputMode();
|
Game.controller.CancelInputMode();
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
self.QueueActivity(new Activities.Teleport(order.TargetLocation));
|
self.QueueActivity(new Activities.Teleport(order.TargetLocation));
|
||||||
@@ -56,6 +61,11 @@ namespace OpenRa.Game.Traits
|
|||||||
|
|
||||||
foreach (var a in Game.world.Actors.Where(a => a.traits.Contains<ChronoshiftPaletteEffect>()))
|
foreach (var a in Game.world.Actors.Where(a => a.traits.Contains<ChronoshiftPaletteEffect>()))
|
||||||
a.traits.Get<ChronoshiftPaletteEffect>().DoChronoshift();
|
a.traits.Get<ChronoshiftPaletteEffect>().DoChronoshift();
|
||||||
|
|
||||||
|
// Play chronosphere active anim
|
||||||
|
var chronosphere = Game.world.Actors.Where(a => a.Owner == order.Subject.Owner && a.traits.Contains<Chronosphere>()).FirstOrDefault();
|
||||||
|
if (chronosphere != null)
|
||||||
|
chronosphere.traits.Get<RenderBuilding>().PlayCustomAnim(chronosphere, "active");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ Recoil=3
|
|||||||
[LST]
|
[LST]
|
||||||
Description=Transport
|
Description=Transport
|
||||||
WaterBound=yes
|
WaterBound=yes
|
||||||
Traits=Unit, Mobile, RenderUnit, Chronoshiftable
|
Traits=Unit, Mobile, RenderUnit
|
||||||
LongDesc=General-purpose naval transport.\nCan carry infantry and tanks.\n Unarmed
|
LongDesc=General-purpose naval transport.\nCan carry infantry and tanks.\n Unarmed
|
||||||
[PT]
|
[PT]
|
||||||
Description=Gunboat
|
Description=Gunboat
|
||||||
|
|||||||
Reference in New Issue
Block a user