mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
KDL3: fix invalid inno_setup components and deathlink messages (#2922)
* remove component checking * fix missing deathlink messages * move reads under deathlink check
This commit is contained in:
@@ -309,10 +309,13 @@ class KDL3SNIClient(SNIClient):
|
||||
if current_bgm[0] in (0x00, 0x21, 0x22, 0x23, 0x25, 0x2A, 0x2B):
|
||||
return # null, title screen, opening, save select, true and false endings
|
||||
game_state = await snes_read(ctx, KDL3_GAME_STATE, 1)
|
||||
current_hp = await snes_read(ctx, KDL3_KIRBY_HP, 1)
|
||||
if "DeathLink" in ctx.tags and game_state[0] == 0x00 and ctx.last_death_link + 1 < time.time():
|
||||
current_hp = await snes_read(ctx, KDL3_KIRBY_HP, 1)
|
||||
current_world = struct.unpack("H", await snes_read(ctx, KDL3_CURRENT_WORLD, 2))[0]
|
||||
current_level = struct.unpack("H", await snes_read(ctx, KDL3_CURRENT_LEVEL, 2))[0]
|
||||
currently_dead = current_hp[0] == 0x00
|
||||
await ctx.handle_deathlink_state(currently_dead)
|
||||
message = deathlink_messages[self.levels[current_world][current_level - 1]]
|
||||
await ctx.handle_deathlink_state(currently_dead, f"{ctx.player_names[ctx.slot]}{message}")
|
||||
|
||||
recv_count = await snes_read(ctx, KDL3_RECV_COUNT, 2)
|
||||
recv_amount = unpack("H", recv_count)[0]
|
||||
|
||||
Reference in New Issue
Block a user