Skip to content
Closed
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
8 changes: 5 additions & 3 deletions addons/mod_loader/internal/mod_hook_preprocessor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ func process_begin() -> void:
hashmap.clear()


func process_script(path: String) -> String:
func process_script(path: String, is_silent := false) -> String:
var start_time := Time.get_ticks_msec()
ModLoaderLog.debug("Start processing script at path: %s" % path, LOG_NAME)
if not is_silent:
ModLoaderLog.debug("Start processing script at path: %s" % path, LOG_NAME)
var current_script := load(path) as GDScript

var source_code := current_script.source_code
Expand Down Expand Up @@ -109,7 +110,8 @@ func process_script(path: String) -> String:
if source_code_additions != "":
source_code = "%s\n%s\n%s" % [source_code, MOD_LOADER_HOOKS_START_STRING, source_code_additions]

ModLoaderLog.debug("Finished processing script at path: %s in %s ms" % [path, Time.get_ticks_msec() - start_time], LOG_NAME)
if not is_silent:
ModLoaderLog.debug("Finished processing script at path: %s in %s ms" % [path, Time.get_ticks_msec() - start_time], LOG_NAME)

return source_code

Expand Down