Remove arguments from remove_cutscene/action

This commit is contained in:
JeremyStar™ 2023-08-25 16:49:53 +02:00
parent 2b757dd64e
commit b574ca6900

16
smgr.gd
View file

@ -171,15 +171,15 @@ func remove_debug(resource_name:String) -> int:
debug_overlay_scene.erase(resource_name)
return core.Errors.OK
func remove_cutscene(resource_name:String) -> int:
func remove_cutscene() -> int:
if core.protection_mode: return core.Errors.CORE_PROTECTIONMODE
logger.diag("CORE/smgr.gd","Removing cutscene scene \"" + resource_name + "\"")
logger.diag("CORE/smgr.gd","Removing cutscene scene \"" + cutscene_overlay_scene + "\"")
for child in cutscene_overlay.get_children():
if child.name == resource_name:
if child.name == cutscene_overlay_scene:
cutscene_overlay.remove_child(child)
break
else:
core.exception("SceneManager","Could not remove \"" + resource_name + "\" from the cutscene overlay as cutscene_overlay does have a child with that name")
core.exception("SceneManager","Could not remove \"" + cutscene_overlay_scene + "\" from the cutscene overlay as cutscene_overlay does have a child with that name")
return core.Errors.CORE_EXCEPTION
cutscene_overlay_scene = ""
return core.Errors.OK
@ -197,15 +197,15 @@ func remove_menu(resource_name:String) -> int:
menu_overlay_scene.erase(resource_name)
return core.Errors.OK
func remove_action(resource_name:String) -> int:
func remove_action() -> int:
if core.protection_mode: return core.Errors.CORE_PROTECTIONMODE
logger.diag("CORE/smgr.gd","Removing action scene \"" + resource_name + "\"")
logger.diag("CORE/smgr.gd","Removing action scene \"" + cutscene_overlay_scene + "\"")
for child in action_overlay.get_children():
if child.name == resource_name:
if child.name == cutscene_overlay_scene:
action_overlay.remove_child(child)
break
else:
core.exception("SceneManager","Could not remove \"" + resource_name + "\" from the action overlay as action_overlay does have a child with that name")
core.exception("SceneManager","Could not remove \"" + cutscene_overlay_scene + "\" from the action overlay as action_overlay does have a child with that name")
return core.Errors.CORE_EXCEPTION
action_overlay_scene = ""
return core.Errors.OK