Closed ItsTheSky closed 2 years ago
This new commit brings a lot of new things, as the commit mention:
show
part, for example, show "%_test%"
or show "%_players::*%" in lower case
(combining with expressions)This new commit completely reworks the parser and is currently from our side only. Made it not static, to possibly make multiple instances of the parser, but you can change it if you want. Also changed the way to get file's content, more optimized one.
What can be done?
{{var_name}}
(list too {{var_name::*}}
){{show %expr%}}
aka {{show size of all players}}
(surround variable with %%
like {{show name of %_player%}}
){{loop members::*}}
or {{loop members of guild with id "XXX"}}
)loop entity
expression (aka {{show discord name of loop entity}}
)What can not be done (yet)?
{{}}
codes (if you want so, why not adding like {{execute <effect>}}
?)
This pull request offer the way to parse expression directly in a template file:
With template:
Show:
I currently set the special mark as
show
, but you can change it at any time as you like ^^ Moreover, it should parse expression according to the current event, which means the local variables and the event values will be set and usable.