diff --git a/addons/panku_console/console.gd b/addons/panku_console/console.gd index 38e76a4..6c50af4 100644 --- a/addons/panku_console/console.gd +++ b/addons/panku_console/console.gd @@ -40,7 +40,6 @@ func _ready(): # you can add or remove any modules here as you wish var modules:Array[PankuModule] = [ PankuModuleNativeLogger.new(), - PankuModuleSceneRootTracker.new(), PankuModuleScreenNotifier.new(), PankuModuleSystemReport.new(), PankuModuleHistoryManager.new(), @@ -52,6 +51,7 @@ func _ready(): PankuModuleDataController.new(), PankuModuleScreenCrtEffect.new(), PankuModuleExpressionMonitor.new(), + PankuModuleSceneRootTracker.new(), ] module_manager.init_manager(self, modules) diff --git a/addons/panku_console/modules/scene_root_tracker/module.gd b/addons/panku_console/modules/scene_root_tracker/module.gd index 1fbd7a6..4e1829a 100644 --- a/addons/panku_console/modules/scene_root_tracker/module.gd +++ b/addons/panku_console/modules/scene_root_tracker/module.gd @@ -7,6 +7,13 @@ var _tween_loop:Tween func init_module(): setup_scene_root_tracker() + # print a tip to interacvite_shell module + # modules load order matters + var tip:String = "\n[tip] you can always access current scene by [b]current[/b]" + if core.module_manager.has_module("interactive_shell"): + var ishell = core.module_manager.get_module("interactive_shell") + ishell.interactive_shell.output(tip) + # always register the current scene root as `current` func setup_scene_root_tracker(): _current_scene_root = get_scene_root() @@ -21,4 +28,4 @@ func setup_scene_root_tracker(): ).set_delay(0.1) func get_scene_root() -> Node: - return core.get_tree().root.get_child(core.get_tree().root.get_child_count() - 1) \ No newline at end of file + return core.get_tree().root.get_child(core.get_tree().root.get_child_count() - 1)