In some cases, I want to allow different input format for defintions.
One use case for it is I need to provide a script to a task that updates items. The idea is to store a script reference on the item scripts:
my_item:
type: item
...
data:
refresh: my_item_refresh_script
# or
my_item:
type: item
...
data:
refresh:
script: all_items_refresh_scripts
path: subscripts.my_specific_subtask
The other use case is for item lores. I want to be able to provide either a string (element) or list to my helper procedure:
my_item:
type: item
...
data:
dynamic_lore: This lore is short. Works fine inline.
# or
my_item:
type: item
...
data:
dynamic_lore:
- This lore is rather long,
- and I need to insert a bunch of tag
- in order to tell you that you own <player.flag[MONEY]>
- and that your name is <player.name>
The only type checkers I found are is_boolean, and is_decimal|odd|even .
Is there any way to support that ?