* notify clients of their amount of hint points on initial connection and when hinting
* send in connect packet instead of sending a RoomUpdate on connect
* send hint_points update in `on_new_hint`
* add to connected packet docs
* hint_points isn't a new variable on RoomUpdate now
* note roomupdate can contain connected members
* add the hint point stuff to commonclient
* only show hint points when relevant and default to 0
* Revert "note roomupdate can contain connected members"
* remove hint_points from roomupdate args list and condense explanation of possible packet args
* updates from phar's review
* Small tweak to wording in RoomUpdate
---------
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
Co-authored-by: Phar <zach@alliware.com>
* Protocol: Improve machine-readability of prints
* Factorio: Make use of new PrintJSON fields for echo detection.
* Protocol: Add message field to chat prints.
* Webhost: rename all references to forfeit and deprecate it
* needed some renames in multiserver for all the commands to function
* remove forfeit commands
* support forfeit_mode for clients
* rename `forfeit_player` to `release_player`
* fix case sensitivity in server commands
* improve ambiguous match breakout
* worried about accidentally swapping team and slot
* Remove now unused import
* First Pass removal of game-specific code
* SMW, DKC3, and SM hooked into AutoClient
* All SNES autoclients functional
* Fix ALttP Deathlink
* Don't default to being ALttP, and properly error check ctx.game
* Adjust variable naming
* In response to:
> we should probably document usage somewhere. I'm open to suggestions of where this should be documented.
I think the most valuable documentation for APIs is docstrings and full typing.
about websockets change in imports - from websockets documentation:
> For convenience, many public APIs can be imported from the websockets package. However, this feature is incompatible with static code analysis. It breaks autocompletion in an IDE or type checking with mypy. If you’re using such tools, use the real import paths.
* todo note for python 3.11
typing.NotRequired
* missed staging in previous commit
* added missing death Game States for DeathLink
Co-authored-by: beauxq <beauxq@users.noreply.github.com>
Co-authored-by: lordlou <87331798+lordlou@users.noreply.github.com>
* [Core] Added Countdown type to print json to distinct the count down message from other types
* Added backward compatibility check
* Fixed review comments
* Updated header category
* Apply suggestions from code review
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
* Completely phased out Print in favor of PrintJson
* Updated docs to warn about phasing out of Print
* Removed faulty import
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
* multiserver: allow `!release` as an alias for `!forfeit`
* create `/release` command. Add some periods to messages that print in console and point users to release
* Add a missing space on line 1135
Co-authored-by: Chris Wilson <chris@legendserver.info>
This updates notify_hints() as follows:
- Sort hints by their 'found' attribute in reverse during the first
iteration, so items not found will show at the bottom.
- Store a tuple of (hint, hint.as_network_message()) in concerns rather
than just the hint so the raw hint data remains available for later
sorting.
- Do the logging.info call as part of this iteration instead of doing
a second iteration pass that does nothing but logging.
- Iterate over concerns (and look up connected clients) rather than
iterating over all clients (and checking for concerns)