Don't clear locally visited locations if rom is same as previous on /snes after /snes_close (#98)

This commit is contained in:
CaitSith2 2020-06-02 07:38:23 -07:00 committed by GitHub
parent 117624d611
commit e4c68fde60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -58,6 +58,7 @@ class Context:
self.locations_info = {}
self.awaiting_rom = False
self.rom = None
self.prev_rom = None
self.auth = None
self.found_items = found_items
self.finished_game = False
@ -1005,8 +1006,11 @@ async def game_watcher(ctx : Context):
continue
ctx.rom = list(rom)
ctx.locations_checked = set()
ctx.locations_scouted = set()
if not ctx.prev_rom or ctx.prev_rom != ctx.rom:
ctx.locations_checked = set()
ctx.locations_scouted = set()
ctx.prev_rom = ctx.rom.copy()
if ctx.awaiting_rom:
await server_auth(ctx, False)