Closed VisualBean closed 2 years ago
Thank you for contributing! Let me know if you have more questions. As for your current one, lets try it out. Maybe the CLI approach would make it easier to make a simple UI on top later on
This could actually also be a pretty cool gameplay mechanics. That you're actually interacting through programs, using CLI's, with parameters.
I keep thinking about what Notch tried to do, after minecraft. His space game where he wanted you to program ship computers, within the game. This could maybe give a light-weight feeling of that.
Ill implement it as a "real" CLI then.
CommandLineParser did not work entirely as expected, So I ended up making a slightly naive implementation for supporting commands.
Updated description to reflect this new change
Note: Commandlineparser did not meet up to expectation.
A Command in this installment is considered as a
{CommandGroup} --{CommandName} {Args}
A Command without a CommandGroup will simply be known by its CommandName{CommandName} {Args}
Commands now support arguments in the form of
string[]
, anything that comes AFTER the CommandName is considered arguments split by space.Any inheritance from
IConsoleCommand
will get auto-registered as a singleton, through DI.The original implementation was doing similar, but through reflection and attributes. This version is built in a heavier OOP fashion.