feedback4: the settlement line (结算) is spoken again — a battle result's unitsEnd names chess ids (chess_char_*), so the game screen maps them to the operator through the chess record's charId (resultSpeaker charOf); as merged in #73 the speaker took char_* ids only and no battle ever said its line (found while porting #73 to 0.2.0); test runs a real battle result through it; golden unchanged (client only)

This commit is contained in:
sganggs committed 2026-10-06 04:37:26 +08:00
1 parent beb0296a52
commit 9d56342494
4 files changed
+27 -6

No files matched your search

+3 -2
View File
@@ -503,8 +503,9 @@ function MatchScreen() {
const mine = (pid && msg.result.perPlayer && msg.result.perPlayer[pid]) || null;
const diff = st.match?.public?.difficulty;
// the speaker comes from THIS battle's own field (`mine.unitsEnd`), not from the field on screen: watching a
// teammate used to make THEIR operator say the viewer's line (review on #73)
const charId = resultSpeaker(mine);
// teammate used to make THEIR operator say the viewer's line (review on #73). unitsEnd names chess ids: the
// chess record gives the operator whose voice bank speaks
const charId = resultSpeaker(mine, Math.random, (id) => data.lookup('chess', id)?.charId ?? null);
if (!charId) return;
audio.voice(charId, resultVoiceSlot({
perfect: !!(mine?.perfect),