2
0
Fork 0

Update to 517e36e95dd65071e10ea065807ddbc4bd959f80

This commit is contained in:
JeremyStar™ 2024-04-03 20:06:15 +02:00
parent b9bd91e76a
commit 87ff8f85d8
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -56,7 +56,10 @@ func add_scene(sname: String, sclass: Node, type: CoreTypes.SceneType) -> bool:
logger.verbf("sms", "Adding scene \"" + sname + "\" of type " + str(type)) logger.verbf("sms", "Adding scene \"" + sname + "\" of type " + str(type))
if exists(sname) != CoreTypes.SceneType.NONE: if exists(sname) != CoreTypes.SceneType.NONE:
logger.errorf("sms", "Scene with name \"" + sname + "\" already exists") logger.errorf("sms", "Scene with name \"" + sname + "\" already exists")
return true return false
if typeof(sclass) != TYPE_OBJECT or !sclass.is_class("Node"):
logger.errorf("sms", "Scene class \"" + sname + "\" is not of type Node"
return false
sclass.name = sname sclass.name = sname
match(type): match(type):
CoreTypes.SceneType.DEBUG: scenes_debug.add_child(sclass) CoreTypes.SceneType.DEBUG: scenes_debug.add_child(sclass)