Replace ITraitInfo interface with TraitInfo class.

This commit is contained in:
Paul Chote
2020-05-11 18:12:19 +01:00
committed by reaperrr
parent 3cd7ec3878
commit 86f61298e6
243 changed files with 510 additions and 505 deletions

View File

@@ -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

View File

@@ -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,