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
A number of scripts are designed to be persistent, and it is frequently useful to be able to pass commands to an already-running script.
Currently, the only good option to do so involves an UpstreamHook that does the equivalent of capturing /^(?:<c>)?\s*#{Regexp.escape("#{$lich_char}#{script.name}")}(\s+.*)?$/ and parsing commands in such a hook.
This has a number of problems, notably:
Each script that does it requires an UpstreamHook, which adds a (tiny) amount of input lag to the game
Commands captured in this way either need to have the full name of the script (rather than a shortened form) or risk false positives. (Should ;tri be interpreted as a command to ;triage or a request to invoke ;trigger?)
My proposed solution would be to add, as an API, something like this:
on_reinvoke{|args|
# args would be the equivalent of `script_args` as it exists in @@elevated_script_start}# Non-forced invocations of this script instead call this block, akin to before_dyingon_reinvoke(nil)# Revert to default (old) behavior
The text was updated successfully, but these errors were encountered:
A number of scripts are designed to be persistent, and it is frequently useful to be able to pass commands to an already-running script.
Currently, the only good option to do so involves an UpstreamHook that does the equivalent of capturing
/^(?:<c>)?\s*#{Regexp.escape("#{$lich_char}#{script.name}")}(\s+.*)?$/
and parsing commands in such a hook.This has a number of problems, notably:
;tri
be interpreted as a command to;triage
or a request to invoke;trigger
?)My proposed solution would be to add, as an API, something like this:
The text was updated successfully, but these errors were encountered: