Short-circuit tags
Morphan1 opened this issue · 1 comments
Morphan1 commented
It would be nice if tags such as .and
and .or
would short-circuit and not parse extra tags when not necessary.
For example
<server.flag[check_if_ten_entities_are_looking_at_y_value_78].exists.and[<server.worlds.parse[entities].combine.parse[cursor_on].filter[y.equals[78]].size.is[or_more].than[10]>]>
is slightly inefficient when the flag doesn't exist because of the extra parsing.
For now, there are workarounds available using tern
for these two operations but it is obviously less clear
For and: <tern[false].pass[<expensive_tag>].fail[false]>
For or: <tern[true].pass[true].fail[<expensive_tag>]>
mcmonkey4eva commented
done via DenizenScript/Denizen-Core@1f3e75c