mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 21:02:18 -05:00
use enum for shuffle merchants (#2090)
* use enum for shuffle merchants * remove comment that isn't needed anymore Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
parent
22c4b1afa3
commit
306183aa1b
@ -476,7 +476,7 @@ void Randomizer::LoadMerchantMessages(const char* spoilerFileName) {
|
||||
//Carpet Salesman
|
||||
//RANDOTODO: Implement obscure/ambiguous hints
|
||||
std::vector<std::string> cgBoxTwoText;
|
||||
if (Randomizer::GetRandoSettingValue(RSK_SHUFFLE_MERCHANTS) == 2) { //If merchant hints are clear...
|
||||
if (Randomizer::GetRandoSettingValue(RSK_SHUFFLE_MERCHANTS) == RO_SHUFFLE_MERCHANTS_ON_HINT) {
|
||||
cgBoxTwoText = {
|
||||
"!%w&It's real, I promise!&A lonely man such as myself&wouldn't %rlie%w to you, hmm?^",
|
||||
"!%w&Ich kann versichern es ist ein&aufrichtiges Angebot!^Ein einsamer Mann wie ich würde dich&doch nicht %ranlügen%w, oder?^",
|
||||
@ -2592,7 +2592,7 @@ void GenerateRandomizerImgui() {
|
||||
cvarSettings[RSK_SHUFFLE_COWS] = CVar_GetS32("gRandomizeShuffleCows", 0);
|
||||
cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVar_GetS32("gRandomizeShuffleAdultTrade", 0);
|
||||
cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVar_GetS32("gRandomizeShuffleBeans", 0);
|
||||
cvarSettings[RSK_SHUFFLE_MERCHANTS] = CVar_GetS32("gRandomizeShuffleMerchants", 0);
|
||||
cvarSettings[RSK_SHUFFLE_MERCHANTS] = CVar_GetS32("gRandomizeShuffleMerchants", RO_SHUFFLE_MERCHANTS_OFF);
|
||||
cvarSettings[RSK_ENABLE_BOMBCHU_DROPS] = CVar_GetS32("gRandomizeEnableBombchuDrops", 0);
|
||||
cvarSettings[RSK_BOMBCHUS_IN_LOGIC] = CVar_GetS32("gRandomizeBombchusInLogic", 0);
|
||||
cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVar_GetS32("gRandomizeSkipChildZelda", 0);
|
||||
|
@ -1984,11 +1984,11 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::NaviRandoMessageTableID, naviTextId);
|
||||
} else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESMAN) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, TEXT_BEAN_SALESMAN);
|
||||
} else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) && (textId == TEXT_MEDIGORON ||
|
||||
} else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF && (textId == TEXT_MEDIGORON ||
|
||||
(textId == TEXT_CARPET_SALESMAN_1 && !Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)) ||
|
||||
(textId == TEXT_CARPET_SALESMAN_2 && !Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)))) {
|
||||
RandomizerInf randoInf = (RandomizerInf)(textId == TEXT_MEDIGORON ? RAND_INF_MERCHANTS_MEDIGORON : RAND_INF_MERCHANTS_CARPET_SALESMAN);
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(randoInf, textId, Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != 2);
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(randoInf, textId, Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_ON_HINT);
|
||||
} else if (Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) &&
|
||||
(textId == TEXT_BUY_BOMBCHU_10_DESC || textId == TEXT_BUY_BOMBCHU_10_PROMPT)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId);
|
||||
|
@ -97,7 +97,8 @@ s32 func_80A3D7C8(void) {
|
||||
return 1;
|
||||
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) {
|
||||
return 2;
|
||||
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS)) && (gBitFlags[2] & gSaveContext.inventory.equipment)){
|
||||
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
|
||||
(gBitFlags[2] & gSaveContext.inventory.equipment)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 3;
|
||||
@ -211,7 +212,7 @@ void func_80A3DC44(EnGm* this, PlayState* play) {
|
||||
return;
|
||||
case 1:
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
//Resets "Talked to Medigoron" flag in infTable to restore initial conversation state
|
||||
gSaveContext.infTable[11] &= ~2;
|
||||
@ -250,7 +251,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
||||
Message_ContinueTextbox(play, 0xC8);
|
||||
this->actionFunc = func_80A3DD7C;
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
GiveItemEntryFromActor(&this->actor, play,
|
||||
Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE), 415.0f, 10.0f);
|
||||
@ -276,7 +277,7 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80A3DF60;
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
GiveItemEntryFromActor(&this->actor, play,
|
||||
Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE), 415.0f, 10.0f);
|
||||
|
@ -129,7 +129,7 @@ void func_80A89160(EnJs* this, PlayState* play) {
|
||||
this->actor.parent = NULL;
|
||||
En_Js_SetupAction(this, func_80A8910C);
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)) {
|
||||
GiveItemEntryFromActor(&this->actor, play,
|
||||
Randomizer_GetItemFromKnownCheck(RC_WASTELAND_BOMBCHU_SALESMAN, GI_BOMBCHUS_10), 90.0f, 10.0f);
|
||||
|
Loading…
Reference in New Issue
Block a user