Custom message for free items

This commit is contained in:
Garrett Cox 2022-08-24 10:19:41 -05:00
parent 31e8896856
commit c6c08522e6
2 changed files with 9 additions and 2 deletions

View File

@ -1678,7 +1678,6 @@ ScrubIdentity Randomizer::IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respa
}
break;
case SCENE_KAKUSIANA: // Grotto
// Ugly, but the best way we can identify which grotto we are in, same method 3DRando uses, but we'll need to account for entrance rando
switch (respawnData) {
case 0xE6: // Hyrule Field Scrub Grotto
switch (actorParams) {
@ -3993,7 +3992,14 @@ void CreateGetItemMessages(std::vector<GetItemMessage> messageEntries) {
void CreateScrubMessages() {
CustomMessageManager* customMessageManager = CustomMessageManager::Instance;
customMessageManager->AddCustomMessageTable(Randomizer::scrubMessageTableID);
for (u32 price = 0; price <= 95; price += 5) {
customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, 0,
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
"\x12\x38\x82\All right! You win! In return for&sparing me, I will give you a&%gmysterious item%w!&Please, take it!\x07\x10\xA3",
"\x12\x38\x82\In Ordnung! Du gewinnst! Im Austausch&dafür, dass du mich verschont hast,&werde ich dir einen %gmysteriösen&Gegenstand%w geben! Bitte nimm ihn!\x07\x10\xA3",
"\x12\x38\x82\D'accord! Vous avez gagné! En échange&de m'épargner, je vous donnerai un &%gobjet mystérieux%w! S'il vous plaît,&prenez-le!\x07\x10\xA3",
});
for (u32 price = 5; price <= 95; price += 5) {
customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, price,
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
"\x12\x38\x82\All right! You win! In return for&sparing me, I will sell you a&%gmysterious item%w!&%r" +

View File

@ -168,6 +168,7 @@ void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.textId = D_809F040C[this->actor.params];
this->dnsItemEntry = sItemEntries[this->actor.params];
if (gSaveContext.n64ddFlag) {
// Ugly, but the best way we can identify which grotto we are in, same method 3DRando uses, but we'll need to account for entrance rando
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
this->scrubIdentity = Randomizer_IdentifyScrub(globalCtx->sceneNum, this->actor.params, respawnData);