From 68064ec6aa3991799e8e14adb01a7a7b009030f9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Oct 2006 05:56:30 +0000 Subject: [PATCH] Always use a real type with Def; don't say "Def.Layer". If you don't know the type you're using, you should be using LoadActor. --- stepmania/Themes/default/Scripts/ActorDef.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/Themes/default/Scripts/ActorDef.lua b/stepmania/Themes/default/Scripts/ActorDef.lua index 50679e4199..cdac7976e8 100644 --- a/stepmania/Themes/default/Scripts/ActorDef.lua +++ b/stepmania/Themes/default/Scripts/ActorDef.lua @@ -41,9 +41,11 @@ setmetatable( Def, { -- t is an actor definition table. name is the type -- given to Def. Fill in standard fields. return function(t) - if not t.Type then - t.Type = Type; + if not ActorUtil.IsRegisteredType(Type) then + error( Type .. " is not a registered type", 2 ); end + + t.Type = Type; local level = 2 if t._Level then