Core: SNI Client Refactor (#1083)

* 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>
This commit is contained in:
PoryGone
2022-10-25 13:54:43 -04:00
committed by GitHub
parent 6535836e5c
commit d5efc71344
18 changed files with 1304 additions and 1135 deletions

View File

@@ -11,16 +11,6 @@ if __name__ == "__main__":
from worlds.Files import AutoPatchRegister, APDeltaPatch
GAME_ALTTP = "A Link to the Past"
GAME_SM = "Super Metroid"
GAME_SOE = "Secret of Evermore"
GAME_SMZ3 = "SMZ3"
GAME_DKC3 = "Donkey Kong Country 3"
GAME_SMW = "Super Mario World"
class RomMeta(TypedDict):
server: str
player: Optional[int]