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

Code editor: Add custom command support #296

Open
icewolfz opened this issue Sep 15, 2024 · 2 comments
Open

Code editor: Add custom command support #296

icewolfz opened this issue Sep 15, 2024 · 2 comments
Labels
Code editor Code editor related issues enhancement A new feature or way to improve a current feature to make it better or offer more uses wishlist Wanted but not required

Comments

@icewolfz
Copy link
Owner

Add custom action support for rooms/monsters/objects to add code to init()

need name:code similar to custom code blocks

@icewolfz icewolfz added enhancement A new feature or way to improve a current feature to make it better or offer more uses wishlist Wanted but not required Code editor Code editor related issues labels Sep 15, 2024
@icewolfz icewolfz changed the title Code editor: Add custom action support Code editor: Add custom command support Sep 16, 2024
@icewolfz
Copy link
Owner Author

Commands are added in the init() block in form of add_action(function, command, flag)
Function is a string or closure, maybe test for (::) and create stubs a needed if not found in the function list
each room/monster/object needs a command[NAME] = {function:value, flag:value}, i may not support the flag argument as that is advanced and 99% of people will never use that argument
maybe if command is a comma delimted list itis converted into array format to allow 1 function multiple commands

@icewolfz
Copy link
Owner Author

icewolfz commented Sep 16, 2024

d3de6a6 adds back end and code generation support for basic command = function name, went simple as 99% of people will just use the simple format, will tie into the function system so you can create functions there and select them for use for commands, if command function is empty or not in the function list it will create a function stub in format of

int cmd_NAME(string args)
{
   return 1;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code editor Code editor related issues enhancement A new feature or way to improve a current feature to make it better or offer more uses wishlist Wanted but not required
Projects
None yet
Development

No branches or pull requests

1 participant