Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/mod_loader/internal/hooks.gd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static func add_hook(mod_callable: Callable, script_path: String, method_name: S
% [script_path, "before" if is_before else "after", method_name ], LOG_NAME
)
if not ModLoaderStore.hooked_script_paths.has(script_path):
ModLoaderStore.hooked_script_paths[script_path] = null
ModLoaderStore.hooked_script_paths[script_path] = true


static func call_hooks(self_object: Object, args: Array, hook_hash:int) -> void:
Expand Down
4 changes: 2 additions & 2 deletions addons/mod_loader/internal/mod_hook_preprocessor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,10 @@ static func collect_getters_and_setters(text: String, regex_getter_setter: RegEx
for mat in regex_getter_setter.search_all(text):
if mat.get_string(1).is_empty() or mat.get_string(1).contains("#"):
continue
result[mat.get_string(2)] = null
result[mat.get_string(2)] = true

if mat.get_string(3).is_empty() or mat.get_string(3).contains("#"):
continue
result[mat.get_string(4)] = null
result[mat.get_string(4)] = true

return result
2 changes: 1 addition & 1 deletion addons/mod_loader/mod_loader_store.gd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var modding_hooks := {}

# Example:
# var hooked_script_paths := {
# "res://game/game.gd": null,
# "res://game/game.gd": true,
# }
var hooked_script_paths := {}

Expand Down