From 17fbf6cec486c0ffc159d612dc8f5c9cb886b27a Mon Sep 17 00:00:00 2001 From: thibautbus <310327033+thibautbus@users.noreply.github.com> Date: Wed, 19 Aug 2026 14:31:09 +0200 Subject: [PATCH] Route the slot machine's lined-up message through the real ROM text SlotMachine.lua built "%s lined up!\nScored %d coins!" as a plain Lua literal, substituting the symbol id (sym) as if it were part of the translatable sentence. The real extracted _LinedUpText label (" lined up!\nScored {RAM:wStringBuffer} coins!") shows the original never had a slot for the symbol at all -- it was drawn separately and only this fixed suffix was ROM text. Concatenate sym in front of romText's real, already-translated label instead of interpolating it into an engine literal. --- src/ui/SlotMachine.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/SlotMachine.lua b/src/ui/SlotMachine.lua index 353b414a..a0c04734 100644 --- a/src/ui/SlotMachine.lua +++ b/src/ui/SlotMachine.lua @@ -46,6 +46,7 @@ local Font = require("src.render.Font") local Sound = require("src.core.Sound") local Strings = require("src.core.Strings") +local romText = require("src.core.RomText") local SlotMachine = {} SlotMachine.__index = SlotMachine @@ -357,7 +358,8 @@ function SlotMachine:resolveWin(win) -- SlotReward300Func prints "Yeah!" (text_pause) before the flash; the port -- shows it in the box while the screen flashes. LinedUpText follows. self.yeah = (sym == "7") - self.message = Strings("%s lined up!\nScored %d coins!", sym, pay) + self.message = sym .. romText(self.game.data, "_LinedUpText", + " lined up!\nScored %d coins!", pay) -- .flashScreenLoop: flip rBGP, wait 5 frames, b times. The coins are not -- credited until the player dismisses the "lined up" text (see startPayout). self.stage = "flash"