Closed noodlebox closed 7 years ago
Deciding against arbitrary wildcard matching (:na*me:
) as it just complicates the "score" calculation while not really having any use cases that make much sense.
It turns out that building a roll table is slow enough to matter when a single message can contain many instances of :*:
. Factoring this out into an easy-to-memoize function drastically improves performance.
Add support for wildcard (
*
) emotes in addition to rolls. Basically, bring back the original roll behavior changed by 4024f75, using*
instead of#
. Also, implement suffix and substring matching (at least) as well.:name*:
:*name:
:*name*:
Also, now that "roll tables" would potentially become more complicated, determine whether building them ahead of time is worth doing. Roll resolution could be deferred to limit the impact of searching for an arbitrary wildcard match, showing the fallback emote until then (
rollDefault
), and giving the opportunity to animate the result as originally planned.