Decorators - Monika-After-Story/MonikaModDev GitHub Wiki
Decorators
These are the standard decorators available with the mod.
mas_reset.ch30_reset
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
mas_utils.deprecated
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
mas_submod_utils.functionplugin
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