Remove dumb scene_name variables
This commit is contained in:
parent
0e843d3d8f
commit
d5f4874100
1 changed files with 12 additions and 12 deletions
24
smgr.gd
24
smgr.gd
|
@ -42,18 +42,18 @@ func remove_game() -> bool:
|
||||||
Logger.info("smgr","Removed game scene")
|
Logger.info("smgr","Removed game scene")
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func add_menu(scene_name:String,resname:String) -> bool:
|
func add_menu(resname:String) -> bool:
|
||||||
Logger.info("smgr","Adding menu scene \"" + scene_name + "\"")
|
Logger.info("smgr","Adding menu scene \"" + resname + "\"")
|
||||||
if ccr_menu_names.has(scene_name):
|
if ccr_menu_names.has(resname):
|
||||||
Logger.error("smgr","Failed adding menu scene: Menu scene with name \"" + scene_name + "\" already exists")
|
Logger.error("smgr","Failed adding menu scene: Menu scene with name \"" + resname + "\" already exists")
|
||||||
return false
|
return false
|
||||||
var res = core.resmgr.getres(resname)
|
var res = core.resmgr.getres(resname)
|
||||||
if res == null or res.get_class() != "PackedScene":
|
if res == null or res.get_class() != "PackedScene":
|
||||||
Logger.error("smgr","Resource is not type of PackedScene")
|
Logger.error("smgr","Resource is not type of PackedScene")
|
||||||
return false
|
return false
|
||||||
ccr_menu.add_child(res.instantiate())
|
ccr_menu.add_child(res.instantiate())
|
||||||
ccr_menu_names.append(scene_name)
|
ccr_menu_names.append(resname)
|
||||||
Logger.info("smgr","Added menu scene \"" + scene_name + "\"")
|
Logger.info("smgr","Added menu scene \"" + resname + "\"")
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func remove_menu(scene_name:String) -> bool:
|
func remove_menu(scene_name:String) -> bool:
|
||||||
|
@ -92,18 +92,18 @@ func remove_cutscene() -> bool:
|
||||||
Logger.info("smgr","Removed cutscene scene")
|
Logger.info("smgr","Removed cutscene scene")
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func add_debug(scene_name:String,resname:String) -> bool:
|
func add_debug(resname:String) -> bool:
|
||||||
Logger.info("smgr","Adding debug scene \"" + scene_name + "\"")
|
Logger.info("smgr","Adding debug scene \"" + resname + "\"")
|
||||||
if ccr_debug_names.has(scene_name):
|
if ccr_debug_names.has(resname):
|
||||||
Logger.error("smgr","Failed adding debug scene: Debug scene with name \"" + scene_name + "\" already exists")
|
Logger.error("smgr","Failed adding debug scene: Debug scene with name \"" + resname + "\" already exists")
|
||||||
return false
|
return false
|
||||||
var res = core.resmgr.getres(resname)
|
var res = core.resmgr.getres(resname)
|
||||||
if res == null or res.get_class() != "PackedScene":
|
if res == null or res.get_class() != "PackedScene":
|
||||||
Logger.error("smgr","Resource is not type of PackedScene")
|
Logger.error("smgr","Resource is not type of PackedScene")
|
||||||
return false
|
return false
|
||||||
ccr_debug.add_child(res.instantiate())
|
ccr_debug.add_child(res.instantiate())
|
||||||
ccr_debug_names.append(scene_name)
|
ccr_debug_names.append(resname)
|
||||||
Logger.info("smgr","Added debug scene \"" + scene_name + "\"")
|
Logger.info("smgr","Added debug scene \"" + resname + "\"")
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func remove_debug(scene_name:String) -> bool:
|
func remove_debug(scene_name:String) -> bool:
|
||||||
|
|
Loading…
Reference in a new issue