Move remote_items and _start_inventory from world to client (#227)

This commit is contained in:
black-sliver
2022-01-23 06:38:46 +01:00
committed by GitHub
parent 219bcb3521
commit f0cfe30a36
6 changed files with 67 additions and 21 deletions

View File

@@ -102,6 +102,7 @@ class LttPCommandProcessor(ClientCommandProcessor):
class Context(CommonContext):
command_processor = LttPCommandProcessor
game = "A Link to the Past"
items_handling = None # set in game_watcher
def __init__(self, snes_address, server_address, password):
super(Context, self).__init__(server_address, password)
@@ -901,8 +902,10 @@ async def game_watcher(ctx: Context):
continue
elif game_name == b"SM":
ctx.game = GAME_SM
ctx.items_handling = 0b001 # full local
else:
ctx.game = GAME_ALTTP
ctx.items_handling = 0b001 # full local
rom = await snes_read(ctx, SM_ROMNAME_START if ctx.game == GAME_SM else ROMNAME_START, ROMNAME_SIZE)
if rom is None or rom == bytes([0] * ROMNAME_SIZE):