Removed debugging info

This commit is contained in:
pepperpow
2021-01-29 19:16:25 -06:00
parent 5c074c2c4f
commit aa9fe0d9cd
2 changed files with 15 additions and 32 deletions

View File

@@ -993,18 +993,13 @@ async def process_server_cmd(ctx: Context, cmd, args):
ctx.hint_points = args[0]
elif cmd == 'TreasureCount':
try:
print(ctx.requires_treasure_count, 'OKAY')
if ctx.requires_treasure_count is None:
ctx.requires_treasure_count = (await snes_read(ctx, 0x180165, size=1))[0] >= 0x80
print(ctx.requires_treasure_count, ctx.treasure_count, args[0])
if ctx.requires_treasure_count and ctx.treasure_count < args[0]:
ctx.treasure_count = args[0]
print(int16_as_bytes(ctx.treasure_count))
snes_buffered_write(ctx, WRAM_START + 0xF418, bytes(int16_as_bytes(ctx.treasure_count)))
await snes_flush_writes(ctx)
except Exception as e:
print(e)
if ctx.requires_treasure_count is None:
ctx.requires_treasure_count = (await snes_read(ctx, 0x180165, size=1))[0] >= 0x80
if ctx.requires_treasure_count and ctx.treasure_count < args[0]:
logging.info('Team Triforce count is now '.format(args[0]))
ctx.treasure_count = args[0]
snes_buffered_write(ctx, WRAM_START + 0xF418, bytes(int16_as_bytes(ctx.treasure_count)))
await snes_flush_writes(ctx)
else:
logger.debug(f"unknown command {args}")