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.
This commit is contained in:
@@ -41,10 +41,12 @@ setmetatable( Def, {
|
|||||||
-- t is an actor definition table. name is the type
|
-- t is an actor definition table. name is the type
|
||||||
-- given to Def. Fill in standard fields.
|
-- given to Def. Fill in standard fields.
|
||||||
return function(t)
|
return function(t)
|
||||||
if not t.Type then
|
if not ActorUtil.IsRegisteredType(Type) then
|
||||||
t.Type = Type;
|
error( Type .. " is not a registered type", 2 );
|
||||||
end
|
end
|
||||||
|
|
||||||
|
t.Type = Type;
|
||||||
|
|
||||||
local level = 2
|
local level = 2
|
||||||
if t._Level then
|
if t._Level then
|
||||||
level = t._Level + 1
|
level = t._Level + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user