Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions system (advanced macros) #629

Open
LeafHacker opened this issue Jun 24, 2018 · 0 comments
Open

Functions system (advanced macros) #629

LeafHacker opened this issue Jun 24, 2018 · 0 comments
Labels
Suggestion The issue is a suggestion of a feature being added to the official Impact build
Milestone

Comments

@LeafHacker
Copy link
Contributor

The idea of macros supporting advanced logic has been discussed before. I'm in favour of an approach that doesn't tie this too closely to the keybind/macro system and is instead more general.

My proposal is a Functions system.

  • Functions are written to the Impact/functions/ directory
  • The filename acts as a name/id for reference within the client.
  • The file may contain a list of lines to be sent to chat
  • There may be a parser to handle logical syntax, or if possible logical commands may be added to the command system instead.
    • Adding commands instead of function syntax has the advantage of being usable even when typing directly into chat. Think .# to comment, .if to branch .test for boolean statements, etc... Inspired by shells such as sh, bash, zsh, powerline, etc.
  • "anonymous" functions may be possible too by having a command that parses and then runs a function.
  • Functions could read arguments either as an argc/argv list or as $1,$2,etc globals.

This idea would replace advanced macros, since a macro could simply run a function.

@LeafHacker LeafHacker added the Suggestion The issue is a suggestion of a feature being added to the official Impact build label Jun 24, 2018
@LeafHacker LeafHacker added this to the LONG_TERM milestone Jun 24, 2018
@LeafHacker LeafHacker mentioned this issue Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion The issue is a suggestion of a feature being added to the official Impact build
Projects
None yet
Development

No branches or pull requests

1 participant