quentincaffeino / godot-console

In-game console for Godot 3.
MIT License
668 stars 49 forks source link

Add prefix requirement option to send commands #103

Open scriptsengineer opened 1 year ago

scriptsengineer commented 1 year ago

How it works? Add option to put a prefix for the command to be done, for example if configured '/' as a prefix for the command, it is necessary to send /commands and not commands.

Why? Some games, for example minecraft, use the console to send chat messages and call commands image Also a future suggestion of a default command, which is sent without typing the command name or prefix, example would be the /chat command in minecraft.

Note:

This would be an option that can be placed in the console inspector, and by default it would continue with no prefix required.

quentincaffeino commented 1 year ago

This was already discussed previously and I agreed that this is indeed what will be added but not in the core part of the console. I'm slowly but surely working to split current monolithic core into separate modules which can be modified and replaced to make console your own.

In the mean time I will advice to you to do the same thing and just change the source code to your needs. The easiest way I see is just to prepend / character to all commands in register function.

Best :)

scriptsengineer commented 1 year ago

I'm working on a fork (https://github.com/expressobits/godot-console) with several enhancements (or not) that includes exactly this feature, it's still in WIP My plan is for this to be optional, as are other similar features (How to print a typed command to the console, which is currently commented out)