-
Couldn't load subscription status.
- Fork 44
Closed
Labels
4.xbugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Milestone
Description
I think the` ModLoaderStore.get("any_mod_hooked")` kills all the performance-benefits of checking ModLoaderStore.any_mod_hooked.This was originally a way to reduce the modding overhead when running a modless version of a game.
2 topics:
- can we somehow skip the
ModLoaderStore.get("any_mod_hooked")call?- can we skip the check altogether when dynamically generating the scripts, since there we only create the methods when hooks actually exist.
(Same below on l.271)
Originally posted by @pirey0 in #408 (comment)
Note
#429 Removed this check from dynamic hook creation.
In addition to the mentioned performance issue, we currently have the following Parse error:
SCRIPT ERROR: Parse Error: Not all code paths return a value.
Example:
func check_sight(target_position: Vector3) -> bool:
if ModLoaderStore.get("any_mod_hooked") and ModLoaderStore.any_mod_hooked:
return _ModLoaderHooks.call_hooks(vanilla_608418131_check_sight, [target_position], 1845897103)Metadata
Metadata
Assignees
Labels
4.xbugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Type
Projects
Status
Done