Lobby screen stays drawn behind the run after the game starts

未关闭
#44 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Jr-JoshS 已经在做这个了。

开始于 2026年10月31日。

  • #45 来自 @Jr-JoshS —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
20/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
lua
领域
game-dev

调研方向

Start at G.FUNCS.start_run and Game:delete_run, then at MPAPI.refresh_current_view() and its G.STAGE check, to see how a lobby update can rebuild G.MAIN_MENU_UI during the gap before the run starts. The work is already under way: open PR #45 is linked. Check that PR's approach first, and a fix is done when the lobby UI is gone after a delayed delete_run in a three-client Royale lobby.

由索引模型根据 Issue 内容生成。

描述

Reported in #bugs-and-issues with a screenshot: in a Battle Royale, one player had the pre-match lobby screen (Ready, the deck/stake chip, View Code, Leave Lobby) drawn behind the game for the whole run.

Why: G.FUNCS.start_run runs delete_run (which removes the menu) and then, a tick later, start_run. In that gap G.STAGE is still MAIN_MENU, so a lobby update arriving then (e.g. the host writing lobby metadata at the start) calls MPAPI.refresh_current_view(), which passes its G.STAGE check and rebuilds the lobby page as a new G.MAIN_MENU_UI. Nothing removes it when the run starts. It's more likely on a slower PC (a longer gap) and in Royale (more lobby updates around the start).

To reproduce: 3 players in a private Royale lobby, opened from the PvP menu. Make one guest slow to start (e.g. delay its Game:delete_run by 0.5s) and have the host change lobby metadata repeatedly while starting. That guest has G.MAIN_MENU_UI ~= nil during the run, and the lobby cards and buttons show behind the blind select.

Reproduced with three clients on a local server.

主要语言
Lua
星标
9
派生
4
平均合并
14 小时 46 分钟
30 天内合并 PR
10

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Balatro-Multiplayer/BalatroMultiplayerAPI 的其他 Issue

查看 Balatro-Multiplayer/BalatroMultiplayerAPI 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。