Add sanity checks to the Lua script trait.

This commit is contained in:
Matthias Mailänder
2023-06-03 14:14:31 +02:00
committed by Gustas
parent 06df75ffee
commit c31f2abfc9
2 changed files with 44 additions and 0 deletions

View File

@@ -18,9 +18,11 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Scripting
{
[TraitLocation(SystemActors.World)]
[Desc("Part of the new Lua API.")]
public class LuaScriptInfo : TraitInfo, Requires<SpawnMapActorsInfo>
{
[Desc("File names with location relative to the map.")]
public readonly HashSet<string> Scripts = new();
public override object Create(ActorInitializer init) { return new LuaScript(this); }