mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 06:35:33 -07:00
Merge pull request #5 from MelonSpeedruns/testing-out-item-replacement-melon
Item cutscenes always play now
This commit is contained in:
commit
84911ee07d
5 changed files with 15 additions and 3 deletions
|
@ -842,6 +842,8 @@ RandomizerCheck Randomizer::GetCheckFromSceneAndParams(s16 sceneNum, s16 actorPa
|
||||||
}
|
}
|
||||||
case 96:
|
case 96:
|
||||||
switch(actorParams) {
|
switch(actorParams) {
|
||||||
|
case 6:
|
||||||
|
return DMT_FREESTANDING_POH;
|
||||||
case 23201:
|
case 23201:
|
||||||
return DMT_CHEST;
|
return DMT_CHEST;
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,6 +332,11 @@ void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) {
|
||||||
this->actionFunc = actionFunc;
|
this->actionFunc = actionFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s32 Item00_GetRandomizedItemId(EnItem00* this, s16 sceneNum, s16 actorParams) {
|
||||||
|
s32 itemId = GetItemFromSceneAndParams(sceneNum, this->actor.params, this->getItemId);
|
||||||
|
return itemId;
|
||||||
|
}
|
||||||
|
|
||||||
void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
EnItem00* this = (EnItem00*)thisx;
|
EnItem00* this = (EnItem00*)thisx;
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
@ -690,6 +695,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) {
|
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) {
|
||||||
|
getItemId = Item00_GetRandomizedItemId(this, globalCtx->sceneNum, this->actor.params);
|
||||||
func_8002F554(&this->actor, globalCtx, getItemId);
|
func_8002F554(&this->actor, globalCtx, getItemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1049,6 +1055,9 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
params = &this->actor.params;
|
params = &this->actor.params;
|
||||||
|
|
||||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) {
|
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) {
|
||||||
|
if (gSaveContext.n64ddFlag) {
|
||||||
|
getItemId = Item00_GetRandomizedItemId(this, globalCtx->sceneNum, this->actor.params);
|
||||||
|
}
|
||||||
func_8002F554(&this->actor, globalCtx, getItemId);
|
func_8002F554(&this->actor, globalCtx, getItemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -393,7 +393,8 @@ void func_80ABA9B8(EnNiwLady* this, GlobalContext* globalCtx) {
|
||||||
case 0:
|
case 0:
|
||||||
Message_CloseTextbox(globalCtx);
|
Message_CloseTextbox(globalCtx);
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
func_8002F434(&this->actor, globalCtx, GI_POCKET_EGG, 200.0f, 100.0f);
|
func_8002F434(&this->actor, globalCtx, NiwLady_GetRandomizedItemId(this, GI_POCKET_EGG), 200.0f,
|
||||||
|
100.0f);
|
||||||
this->actionFunc = func_80ABAC00;
|
this->actionFunc = func_80ABAC00;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
|
@ -6155,7 +6155,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
|
||||||
|
|
||||||
iREG(67) = false;
|
iREG(67) = false;
|
||||||
|
|
||||||
if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (globalCtx->sceneNum == SCENE_BOWLING)) {
|
if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (globalCtx->sceneNum == SCENE_BOWLING) || gSaveContext.n64ddFlag) {
|
||||||
func_808323B4(globalCtx, this);
|
func_808323B4(globalCtx, this);
|
||||||
func_8083AE40(this, giEntry->objectId);
|
func_8083AE40(this, giEntry->objectId);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue