mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-18 03:35:56 +02:00
CLOSES #1090, CLOSES #1093, CLOSES #1094, CLOSES #1095, CLOSES #1098, CLOSES #1102, CLOSES #1105, CLOSES #1106, CLOSES #1108, CLOSES #1109, CLOSES #1110, CLOSES #1111, CLOSES #1113, CLOSES #1114, CLOSES #1117, CLOSES #1118, CLOSES #1121, CLOSES #1122, CLOSES #1123, CLOSES #1124, CLOSES #1126, CLOSES #1127, CLOSES #1128, CLOSES #1131, CLOSES #1132, CLOSES #1134, CLOSES #1137, CLOSES #1141
This commit is contained in:
+10
-1
@@ -236,6 +236,12 @@ local function runCmd(self, cmd, op)
|
||||
if self.hidePicFn then self.hidePicFn() end
|
||||
elseif op == "writetext" or op == "farwritetext" then
|
||||
self:showText(cmd.text)
|
||||
if self.nextOp == "playsound" then
|
||||
-- pokegold home/joypad.asm PromptButton: the real press this box's
|
||||
-- own close absorbed plays SFX_READ_TEXT_2; drain it before the
|
||||
-- script's own playsound or Sound.lua's priority gate drops it.
|
||||
coroutine.yield({ kind = "waitsfx" })
|
||||
end
|
||||
elseif op == "rawtext" then
|
||||
-- NOT a cart opcode. `writetext`'s operand is a KEY into text.lua, and
|
||||
-- text.lua only holds strings the extractor reached through a script
|
||||
@@ -384,9 +390,12 @@ local function runCmd(self, cmd, op)
|
||||
local scene = self.getMapSceneFn and self.getMapSceneFn(group, mapNum)
|
||||
self.scriptVar = scene or 0xff
|
||||
elseif op == "turnobject" then
|
||||
-- engine/events/std_scripts.asm: turnobject LAST_TALKED resolves to the NPC last talked to
|
||||
local facing = Movement.dir(cmd.facing or 0)
|
||||
local object = cmd.object or 0
|
||||
if object == LAST_TALKED then object = self.lastTalked end
|
||||
if self.turnObjectFn then
|
||||
self.turnObjectFn(cmd.object or 0, facing)
|
||||
self.turnObjectFn(object, facing)
|
||||
end
|
||||
elseif op == "applymovement" or op == "applymovementlasttalked" then
|
||||
local object = cmd.object or 0
|
||||
|
||||
Reference in New Issue
Block a user