bevy-console icon indicating copy to clipboard operation
bevy-console copied to clipboard

Create unified trait for ConsoleCommands

Open alice-i-cecile opened this issue 3 years ago • 1 comments
trafficstars

Writing code like TC: CommandName + CommandArgs + CommandHelp is tedious and unclear.

Consider adding a ConsoleCommand: CommandName + CommandArgs + CommandHelp trait, and then creating blanket impl for it.

alice-i-cecile avatar Mar 01 '22 22:03 alice-i-cecile

I would also toss in the Resource bound, so then the SystemParam impl works correctly.

My version:

trait Commandlike: Resource + CommandName + CommandArgs + CommandHelp {}

impl<T: Resource + CommandName + CommandArgs + CommandHelp> Commandlike for T {}

alice-i-cecile avatar Mar 01 '22 22:03 alice-i-cecile