-
Notifications
You must be signed in to change notification settings - Fork 684
Decorators
ThePotatoGuy edited this page Sep 24, 2022
·
4 revisions
These are the standard decorators available with the mod.
Marks a function to be called during ch30_reset
.
Should be used to initialize/default Monika state.
Params:
-
priority
- defines order of function execution. Lower priority runs first.-
PLEASE USE PRIORITIES >= 0. If you need to slip something between existing reset code, check
script-ch30
for correct placement. - Default: 0
-
PLEASE USE PRIORITIES >= 0. If you need to slip something between existing reset code, check
Marks functions and classes as deprecated
Params:
-
use_instead
- string with the name of the function/class to use instead- Default:
None
- Default:
-
should_raise
- bool that determines if the usage of this function or class raises an exception- True will raise an exception if the function is used
- Default:
False
Marks a function to be called when a label or another function is called. Basically allows you to hook into anything that is a label or function.
Params:
-
_label
- the label or function to hook to -
_args
- list of arguments to pass into the function being marked- Default:
[]
- Default:
-
auto_error_handling
- bool that determines if exceptions are caught and logged instead of raised- True will catch exceptions and log them to
mas_log
- Default:
True
- True will catch exceptions and log them to
-
priority
- defines order of function execution. Lower priority runs first.- Default: 0