From 17683f83d666812c985cbad1f97068c5295a1641 Mon Sep 17 00:00:00 2001 From: Jowan-Spooner <42868150+Jowan-Spooner@users.noreply.github.com> Date: Fri, 26 Jan 2024 18:55:38 +0100 Subject: [PATCH] Rename the Other folder to Core (#2047) * Rename the Other folder to Core * Add a small auto-update * Fix unit test --- .github/workflows/resources/project.godot | 2 +- addons/dialogic/{Other => Core}/DialogicGameHandler.gd | 0 addons/dialogic/{Other => Core}/DialogicResourceUtil.gd | 0 addons/dialogic/{Other => Core}/DialogicUtil.gd | 2 +- addons/dialogic/{Other => Core}/Dialogic_Subsystem.gd | 0 addons/dialogic/{Other => Core}/index_class.gd | 0 addons/dialogic/plugin.gd | 7 ++++++- 7 files changed, 8 insertions(+), 3 deletions(-) rename addons/dialogic/{Other => Core}/DialogicGameHandler.gd (100%) rename addons/dialogic/{Other => Core}/DialogicResourceUtil.gd (100%) rename addons/dialogic/{Other => Core}/DialogicUtil.gd (99%) rename addons/dialogic/{Other => Core}/Dialogic_Subsystem.gd (100%) rename addons/dialogic/{Other => Core}/index_class.gd (100%) diff --git a/.github/workflows/resources/project.godot b/.github/workflows/resources/project.godot index 7a40c37f9..dd648de72 100644 --- a/.github/workflows/resources/project.godot +++ b/.github/workflows/resources/project.godot @@ -21,4 +21,4 @@ renderer/rendering_method.mobile="gl_compatibility" [autoload] -Dialogic="*res://addons/dialogic/Other/DialogicGameHandler.gd" +Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd" diff --git a/addons/dialogic/Other/DialogicGameHandler.gd b/addons/dialogic/Core/DialogicGameHandler.gd similarity index 100% rename from addons/dialogic/Other/DialogicGameHandler.gd rename to addons/dialogic/Core/DialogicGameHandler.gd diff --git a/addons/dialogic/Other/DialogicResourceUtil.gd b/addons/dialogic/Core/DialogicResourceUtil.gd similarity index 100% rename from addons/dialogic/Other/DialogicResourceUtil.gd rename to addons/dialogic/Core/DialogicResourceUtil.gd diff --git a/addons/dialogic/Other/DialogicUtil.gd b/addons/dialogic/Core/DialogicUtil.gd similarity index 99% rename from addons/dialogic/Other/DialogicUtil.gd rename to addons/dialogic/Core/DialogicUtil.gd index b9b6ab508..568ea70db 100644 --- a/addons/dialogic/Other/DialogicUtil.gd +++ b/addons/dialogic/Core/DialogicUtil.gd @@ -66,7 +66,7 @@ static func get_module_path(name:String, builtin:=true) -> String: static func update_autoload_subsystem_access() -> void: - var script: Script = load("res://addons/dialogic/Other/DialogicGameHandler.gd") + var script: Script = load("res://addons/dialogic/Core/DialogicGameHandler.gd") var new_subsystem_access_list := "#region SUBSYSTEMS\n" diff --git a/addons/dialogic/Other/Dialogic_Subsystem.gd b/addons/dialogic/Core/Dialogic_Subsystem.gd similarity index 100% rename from addons/dialogic/Other/Dialogic_Subsystem.gd rename to addons/dialogic/Core/Dialogic_Subsystem.gd diff --git a/addons/dialogic/Other/index_class.gd b/addons/dialogic/Core/index_class.gd similarity index 100% rename from addons/dialogic/Other/index_class.gd rename to addons/dialogic/Core/index_class.gd diff --git a/addons/dialogic/plugin.gd b/addons/dialogic/plugin.gd index 2d3dfdd7a..40de860e2 100644 --- a/addons/dialogic/plugin.gd +++ b/addons/dialogic/plugin.gd @@ -4,7 +4,7 @@ extends EditorPlugin ## Preload the main panel scene const MainPanel := preload("res://addons/dialogic/Editor/editor_main.tscn") const PLUGIN_NAME := "Dialogic" -const PLUGIN_HANDLER_PATH := "res://addons/dialogic/Other/DialogicGameHandler.gd" +const PLUGIN_HANDLER_PATH := "res://addons/dialogic/Core/DialogicGameHandler.gd" const PLUGIN_ICON_PATH := "res://addons/dialogic/Editor/Images/plugin-icon.svg" ## References used by various other scripts to quickly reference these things @@ -40,6 +40,11 @@ func _enter_tree() -> void: get_editor_interface().get_editor_main_screen().add_child(editor_view) _make_visible(false) + # Auto-update the singleton path for alpha users + # TODO remove at some point during beta or later + remove_autoload_singleton(PLUGIN_NAME) + add_autoload_singleton(PLUGIN_NAME, PLUGIN_HANDLER_PATH) + func _exit_tree() -> void: if editor_view: