mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
Add QoL sneak option (#2128)
* Added sneak option * fix french/german choices * market sneak uses cvar instead of n64dd; added toggle in gamebar * whoops * move enhancement from rando to regular * address feedback * accounted for entrance rando * damn it archez * added TODO about AI translated messages * fix variable names
This commit is contained in:
parent
dc1b8f017e
commit
cb232b87c7
@ -24,6 +24,7 @@ typedef enum {
|
||||
TEXT_MEDIGORON = 0x304C,
|
||||
TEXT_CARPET_SALESMAN_1 = 0x6077,
|
||||
TEXT_CARPET_SALESMAN_2 = 0x6078,
|
||||
TEXT_MARKET_GUARD_NIGHT = 0x7003,
|
||||
TEXT_SCRUB_RANDOM = 0x9000,
|
||||
TEXT_SCRUB_RANDOM_FREE = 0x9001,
|
||||
TEXT_SHOP_ITEM_RANDOM = 0x9100,
|
||||
|
@ -367,6 +367,9 @@ namespace GameMenuBar {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip Magic Arrow Equip Animation", "gSkipArrowAnimation", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip save confirmation", "gSkipSaveConfirmation", true, false);
|
||||
UIWidgets::Tooltip("Skip the \"Game saved.\" confirmation screen");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Exit Market at Night", "gMarketSneak", true, false);
|
||||
UIWidgets::Tooltip("Allows exiting Hyrule Castle Market Town to Hyrule Field at night by speaking "
|
||||
"to the guard next to the gate.");
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
@ -2045,6 +2045,9 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_HEART_PIECE);
|
||||
CustomMessageManager::ReplaceStringInMessage(messageEntry, "{{heartPieceCount}}", std::to_string(gSaveContext.sohStats.heartPieces + 1));
|
||||
}
|
||||
if (textId == TEXT_MARKET_GUARD_NIGHT && CVar_GetS32("gMarketSneak", 0) && play->sceneNum == SCENE_ENTRA_N) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_MARKET_GUARD_NIGHT);
|
||||
}
|
||||
if (messageEntry.textBoxType != -1) {
|
||||
font->charTexBuf[0] = (messageEntry.textBoxType << 4) | messageEntry.textBoxPos;
|
||||
switch (gSaveContext.language) {
|
||||
|
@ -144,4 +144,13 @@ extern "C" void OTRMessage_Init()
|
||||
"Vous obtenez un %rQuart de&Coeur%w! Vous en avez collecté&%r{{heartPieceCount}}%w en tout!"
|
||||
}
|
||||
);
|
||||
CustomMessageManager::Instance->CreateMessage(
|
||||
customMessageTableID, TEXT_MARKET_GUARD_NIGHT,
|
||||
{
|
||||
TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"You look bored. Wanna go out for a&walk?\x1B&%gYes&No%w",
|
||||
"Du siehst gelangweilt aus.&Willst du einen Spaziergang machen?\x1B&%gJa&Nein%w", //TODO: AI translated, replace with actual translation
|
||||
"Tu as l'air de t'ennuyer. Tu veux&aller faire une promenade?\x1B&%gOui&Non%w", //TODO: AI translated, replace with actual translation
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ void func_80A56900(EnHeishi4* this, PlayState* play);
|
||||
void func_80A56994(EnHeishi4* this, PlayState* play);
|
||||
void func_80A56A50(EnHeishi4* this, PlayState* play);
|
||||
void func_80A56ACC(EnHeishi4* this, PlayState* play);
|
||||
void EnHeishi4_MarketSneak(EnHeishi4* this, PlayState* play);
|
||||
|
||||
const ActorInit En_Heishi4_InitVars = {
|
||||
ACTOR_EN_HEISHI4,
|
||||
@ -331,13 +332,41 @@ void func_80A56B40(EnHeishi4* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
if (this->type == HEISHI4_AT_MARKET_NIGHT) {
|
||||
this->actionFunc = func_80A56614;
|
||||
return;
|
||||
if (CVar_GetS32("gMarketSneak", 0)) {
|
||||
this->actionFunc = EnHeishi4_MarketSneak;
|
||||
} else {
|
||||
this->actionFunc = func_80A56614;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
func_8002F2F4(&this->actor, play);
|
||||
}
|
||||
|
||||
/*Function that allows child Link to exit from Market entrance to Hyrule Field
|
||||
at night.
|
||||
*/
|
||||
void EnHeishi4_MarketSneak(EnHeishi4* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0: //yes
|
||||
if (gSaveContext.n64ddFlag){
|
||||
play->nextEntranceIndex = Entrance_OverrideNextIndex(0xCD);
|
||||
} else {
|
||||
play->nextEntranceIndex = 0xCD;
|
||||
}
|
||||
play->sceneLoadFlag = 0x14;
|
||||
play->fadeTransition = 0x2E;
|
||||
gSaveContext.nextTransitionType = 0x2E;
|
||||
this->actionFunc = func_80A56614;
|
||||
break;
|
||||
case 1: //no
|
||||
this->actionFunc = func_80A56614;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnHeishi4_Update(Actor* thisx, PlayState* play) {
|
||||
EnHeishi4* this = (EnHeishi4*)thisx;
|
||||
s32 pad;
|
||||
|
Loading…
Reference in New Issue
Block a user