adangert / JoustMania

Raspberry Pi Jousting at its finest
http://joustmania.com
Other
124 stars 33 forks source link

Auto - exclude charging controllers #311

Closed ekobres closed 11 months ago

ekobres commented 12 months ago

Controllers placed on a charger still behave as available controllers. It would be nice if those controllers were automatically excluded from needing to press a trigger to start a game.

The game already understands the concept of a charging controller (e.g. charging controllers turn white when triangle is pressed and show “charging” on the battery web page) so hopefully this shouldn’t require a bunch of additional code to detect.

This sort of works if someone uses admin mode to force start a game, but it frequently happens in cases where nobody who knows how to do that is playing the game.

For a party or con, it’s nice to be able to just pop controllers onto a charger when someone is not using them.

This feature would make that ability to charge controllers when not being played work perfectly!

adangert commented 12 months ago

This is a great idea!

adangert commented 11 months ago

Updated in the latest commit, tested a few times with FFA, when the controller is on and then plugged in it goes dark, and the game can start with a fewer amount of controllers, when it's unplugged it is automatically re-added to the game.