You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of writing this, MMSpellbook is servery lacking in components, it hasn't been my top priority as I've wanted to make all the basics work first before adding more components. To add components, a new entry needs to be made in both COMPONENT_TO_NUM_MAP in spelltranslator.rs and COMPONENT_TO_FUNCTION_MAP in lib.rs and a corresponding function needs to be added in component_functions.rs. The corresponding function should return the energy required to cast it when the bool should_execute is false and shouldn't be cast, when the bool should_execute is true, it should be cast, and it should return any return type the component returns. Look at the other components in component_functions.rs to see the format used.
The text was updated successfully, but these errors were encountered:
As of writing this, MMSpellbook is servery lacking in components, it hasn't been my top priority as I've wanted to make all the basics work first before adding more components. To add components, a new entry needs to be made in both
COMPONENT_TO_NUM_MAP
inspelltranslator.rs
andCOMPONENT_TO_FUNCTION_MAP
inlib.rs
and a corresponding function needs to be added incomponent_functions.rs
. The corresponding function should return the energy required to cast it when the boolshould_execute
is false and shouldn't be cast, when the boolshould_execute
is true, it should be cast, and it should return any return type the component returns. Look at the other components incomponent_functions.rs
to see the format used.The text was updated successfully, but these errors were encountered: