Skip to content
ThePotatoGuy edited this page Sep 24, 2022 · 4 revisions

Decorators

These are the standard decorators available with the mod.

top

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

top

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
  • 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

top

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: []
  • 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
  • priority - defines order of function execution. Lower priority runs first.
    • Default: 0