It turns out that changing the turn handler script to react to turn-ending commands instead of check for the end of the turn every single second was actually super easy. The script's interval has been increased from 1 second to 10 seconds, so it should fire off ten times less often now, AND instantly cycle the turn once a player has used all their actions.
Restores some minor fixes I committed and accidentally reverted when I failed to update my local copy of the module. Note to self: start actually using GitHub correctly.
Implemented most of Griatch's requested changes, including documentation of every class and function, adherence to Google and Evennia's style guides, re-ordering of methods to show them defined before they are used, and a less intrusive install process. Tested before committing and found to function the same way as before. More changes to come, particularly to rework the turn handler script to be more efficient.
This adds a new contrib file, a module that provides a simple framework for a tabletop style turn based battle system. From the module itself:
This is a framework for a simple turn-based combat system, similar
to those used in D&D-style tabletop role playing games. It allows
any character to start a fight in a room, at which point initiative
is rolled and a turn order is established. Each participant in combat
has a limited time to decide their action for that turn (30 seconds by
default), and combat progresses through the turn order, looping through
the participants until the fight ends.
Only simple rolls for attacking are implemented here, but this system
is easily extensible and can be used as the foundation for implementing
the rules from your turn-based tabletop game of choice or making your
own battle system.
Griatch - "That way it can still be parsed by the protocol if so needed, but it is also be passed on so the client can do custom stuff with it if it can."
Including a type kwarg for the say, whisper and pose commands allows the receivers of those messages to treat them differently depending on type. IMO This is a wide enough concern that it goes beyond a game specific requirement.