Fix a typo in ChronosphereProperties class name.
This commit is contained in:
@@ -17,9 +17,9 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Scripting
|
namespace OpenRA.Mods.Cnc.Scripting
|
||||||
{
|
{
|
||||||
[ScriptPropertyGroup("Support Powers")]
|
[ScriptPropertyGroup("Support Powers")]
|
||||||
public class ChronsphereProperties : ScriptActorProperties, Requires<ChronoshiftPowerInfo>
|
public class ChronosphereProperties : ScriptActorProperties, Requires<ChronoshiftPowerInfo>
|
||||||
{
|
{
|
||||||
public ChronsphereProperties(ScriptContext context, Actor self)
|
public ChronosphereProperties(ScriptContext context, Actor self)
|
||||||
: base(context, self) { }
|
: base(context, self) { }
|
||||||
|
|
||||||
[Desc("Chronoshift a group of actors. A duration of 0 will teleport the actors permanently.")]
|
[Desc("Chronoshift a group of actors. A duration of 0 will teleport the actors permanently.")]
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using OpenRA.Mods.Cnc.Activities;
|
using OpenRA.Mods.Cnc.Activities;
|
||||||
|
using OpenRA.Mods.Common.Activities;
|
||||||
using OpenRA.Mods.Common.Traits;
|
using OpenRA.Mods.Common.Traits;
|
||||||
using OpenRA.Primitives;
|
using OpenRA.Primitives;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
@@ -18,7 +19,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Can be teleported via Chronoshift power.")]
|
[Desc("Can be teleported via Chronoshift power.")]
|
||||||
public class ChronoshiftableInfo : ITraitInfo
|
public class ChronoshiftableInfo : ConditionalTraitInfo
|
||||||
{
|
{
|
||||||
[Desc("Should the actor die instead of being teleported?")]
|
[Desc("Should the actor die instead of being teleported?")]
|
||||||
public readonly bool ExplodeInstead = false;
|
public readonly bool ExplodeInstead = false;
|
||||||
@@ -37,9 +38,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public object Create(ActorInitializer init) { return new Chronoshiftable(init, this); }
|
public object Create(ActorInitializer init) { return new Chronoshiftable(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Chronoshiftable : ITick, ISync, ISelectionBar, IDeathActorInitModifier, ITransformActorInitModifier, INotifyCreated
|
public class Chronoshiftable : ConditionalTrait<ChronoshiftableInfo>, ITick, ISync, ISelectionBar,
|
||||||
|
IDeathActorInitModifier, ITransformActorInitModifier, INotifyCreated
|
||||||
{
|
{
|
||||||
readonly ChronoshiftableInfo info;
|
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
Actor chronosphere;
|
Actor chronosphere;
|
||||||
bool killCargo;
|
bool killCargo;
|
||||||
@@ -51,8 +52,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
[Sync] public int ReturnTicks = 0;
|
[Sync] public int ReturnTicks = 0;
|
||||||
|
|
||||||
public Chronoshiftable(ActorInitializer init, ChronoshiftableInfo info)
|
public Chronoshiftable(ActorInitializer init, ChronoshiftableInfo info)
|
||||||
|
: base(info)
|
||||||
{
|
{
|
||||||
this.info = info;
|
|
||||||
self = init.Self;
|
self = init.Self;
|
||||||
|
|
||||||
if (init.Contains<ChronoshiftReturnInit>())
|
if (init.Contains<ChronoshiftReturnInit>())
|
||||||
@@ -70,7 +71,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
|
|
||||||
void ITick.Tick(Actor self)
|
void ITick.Tick(Actor self)
|
||||||
{
|
{
|
||||||
if (!info.ReturnToOrigin || ReturnTicks <= 0)
|
if (IsTraitDisabled || !Info.ReturnToOrigin || ReturnTicks <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Return to original location
|
// Return to original location
|
||||||
|
|||||||
Reference in New Issue
Block a user