mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
Allow Mod Loader to automatically add hooks on export (#405)
* Update Mod Loader and Tool addons * Mod tool checks if script exists before reloading * Change script export mode to Text for hook export * Change return type of load_image_from_path to Texture2D
This commit is contained in:
@@ -10,7 +10,7 @@ class_name ModToolUtils
|
||||
static func reload_script(script: Script, mod_tool_store: ModToolStore) -> void:
|
||||
var pending_reloads := mod_tool_store.pending_reloads
|
||||
|
||||
if script.resource_path in pending_reloads:
|
||||
if script and script.resource_path in pending_reloads:
|
||||
var source_code_from_disc := FileAccess.open(script.resource_path, FileAccess.READ).get_as_text()
|
||||
|
||||
var script_editor := EditorInterface.get_script_editor()
|
||||
|
@@ -89,7 +89,7 @@ func add_custom_context_actions(context_menu: PopupMenu, file_paths: Array[Strin
|
||||
add_hooks_context_action(context_menu, script_paths)
|
||||
|
||||
if asset_override_paths.size() > 0:
|
||||
add_asset_override_context_action(context_menu, script_paths)
|
||||
add_asset_override_context_action(context_menu, asset_override_paths)
|
||||
|
||||
|
||||
func create_script_extension(file_path: String) -> String:
|
||||
|
Reference in New Issue
Block a user