mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-21 13:09:54 +02:00
Merge pull request #653 from jherediagu/fix/oak-intro-name-confirmation
This commit is contained in:
@@ -56,6 +56,8 @@ local FALLBACKS = {
|
||||
_OakSpeechText3 = Strings.source("{PLAYER}!\fYour very own\nPOKéMON legend is\vabout to unfold!\fA world of dreams\nand adventures\vwith POKéMON\vawaits! Let's go!"),
|
||||
_IntroducePlayerText = Strings.source("First, what is\nyour name?"),
|
||||
_IntroduceRivalText = Strings.source("This is my grand-\nson. He's been\vyour rival since\vyou were a baby.\f...Erm, what is\nhis name again?"),
|
||||
_YourNameIsText = Strings.source("Right! So your\nname is {PLAYER}!"),
|
||||
_HisNameIsText = Strings.source("That's right! I\nremember now! His\vname is {RIVAL}!"),
|
||||
}
|
||||
|
||||
local function textOr(game, key)
|
||||
@@ -162,6 +164,14 @@ function OakSpeech.defaultSteps(speech)
|
||||
presetsWho = "player",
|
||||
presetsFallback = { "RED", "ASH", "JACK" },
|
||||
},
|
||||
{
|
||||
-- oak_speech.asm prints YourNameIsText right after the naming screen
|
||||
-- returns ("Right! So your name is RED!"); the port went straight on
|
||||
-- to the rival and dropped it, in every language.
|
||||
id = "confirm_player_name",
|
||||
kind = "say",
|
||||
textKey = "_YourNameIsText",
|
||||
},
|
||||
{
|
||||
id = "ask_rival_name",
|
||||
kind = "say",
|
||||
@@ -176,6 +186,12 @@ function OakSpeech.defaultSteps(speech)
|
||||
presetsWho = "rival",
|
||||
presetsFallback = { "BLUE", "GARY", "JOHN" },
|
||||
},
|
||||
{
|
||||
-- HisNameIsText, the rival's counterpart to the confirmation above
|
||||
id = "confirm_rival_name",
|
||||
kind = "say",
|
||||
textKey = "_HisNameIsText",
|
||||
},
|
||||
{
|
||||
id = "legend",
|
||||
kind = "say",
|
||||
|
||||
@@ -779,8 +779,9 @@ check(oak.demoSpecies == "NIDORINO" and oak.nameLen == 7,
|
||||
|
||||
-- ------- intro.oak_speech.build
|
||||
local vanillaSteps = OakSpeech.defaultSteps(oak)
|
||||
check(#vanillaSteps == 9, "vanilla speech has nine steps")
|
||||
check(vanillaSteps[1].id == "oak_welcome" and vanillaSteps[9].id == "shrink",
|
||||
check(#vanillaSteps == 11, "vanilla speech has eleven steps")
|
||||
check(vanillaSteps[1].id == "oak_welcome"
|
||||
and vanillaSteps[#vanillaSteps].id == "shrink",
|
||||
"vanilla speech anchors start and end")
|
||||
|
||||
hooks:wrap("intro.oak_speech.build", function(nextFn, steps, speech)
|
||||
@@ -799,7 +800,7 @@ hooks:removeOwner("fixture")
|
||||
|
||||
hooks:wrap("intro.oak_speech.build", function() return 42 end, 0, "bad")
|
||||
built = oak:buildSteps()
|
||||
check(#built == 9 and built[1].id == "oak_welcome",
|
||||
check(#built == #vanillaSteps and built[1].id == "oak_welcome",
|
||||
"a non-table intro.oak_speech.build result degrades to vanilla")
|
||||
check(logged("intro.oak_speech.build returned"),
|
||||
"the intro build degrade is logged")
|
||||
|
||||
Reference in New Issue
Block a user