Replace ITraitInfo interface with TraitInfo class.
This commit is contained in:
@@ -19,11 +19,11 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Scripting
|
||||
{
|
||||
[Desc("Part of the new Lua API.")]
|
||||
public class LuaScriptInfo : ITraitInfo, Requires<SpawnMapActorsInfo>
|
||||
public class LuaScriptInfo : TraitInfo, Requires<SpawnMapActorsInfo>
|
||||
{
|
||||
public readonly HashSet<string> Scripts = new HashSet<string>();
|
||||
|
||||
public object Create(ActorInitializer init) { return new LuaScript(this); }
|
||||
public override object Create(ActorInitializer init) { return new LuaScript(this); }
|
||||
}
|
||||
|
||||
public class LuaScript : ITick, IWorldLoaded, INotifyActorDisposing
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
|
||||
[Desc("Allows map scripts to attach triggers to this actor via the Triggers global.")]
|
||||
public class ScriptTriggersInfo : ITraitInfo
|
||||
public class ScriptTriggersInfo : TraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new ScriptTriggers(init.World, init.Self); }
|
||||
public override object Create(ActorInitializer init) { return new ScriptTriggers(init.World, init.Self); }
|
||||
}
|
||||
|
||||
public sealed class ScriptTriggers : INotifyIdle, INotifyDamage, INotifyKilled, INotifyProduction, INotifyOtherProduction,
|
||||
|
||||
Reference in New Issue
Block a user