mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-27 00:00:32 +00:00
[Enhancement] Add option to always get the Cremia Hug Cutscene after completing the milk run (#688)
Some checks are pending
Some checks are pending
* Cremia always gives hugs after getting Romani Mask. Adds enhancement option but the option doesn't change anything yet * moved cremia enhancement out of cutscene files * hook works now * change enhancement to picklist * cleaned conditional * move to minigame section and add modern menu item * clang format
This commit is contained in:
parent
fa702ed90c
commit
b7d7a2d9bf
@ -52,6 +52,12 @@ static const std::unordered_map<int32_t, const char*> alwaysWinDoggyraceOptions
|
||||
{ ALWAYS_WIN_DOGGY_RACE_ALWAYS, "Always" },
|
||||
};
|
||||
|
||||
static const std::unordered_map<int32_t, const char*> cremiaRewardOptions = {
|
||||
{ CREMIA_REWARD_RANDOM, "Vanilla" },
|
||||
{ CREMIA_REWARD_ALWAYS_HUG, "Hug" },
|
||||
{ CREMIA_REWARD_ALWAYS_RUPEE, "Rupee" },
|
||||
};
|
||||
|
||||
static const std::unordered_map<int32_t, const char*> timeStopOptions = {
|
||||
{ TIME_STOP_OFF, "Off" },
|
||||
{ TIME_STOP_TEMPLES, "Temples" },
|
||||
@ -665,6 +671,13 @@ void DrawEnhancementsMenu() {
|
||||
if (UIWidgets::BeginMenu("Minigames")) {
|
||||
UIWidgets::CVarCombobox("Always Win Doggy Race", "gEnhancements.Minigames.AlwaysWinDoggyRace",
|
||||
alwaysWinDoggyraceOptions);
|
||||
UIWidgets::CVarCombobox(
|
||||
"Milk Run Reward Options", "gEnhancements.Minigames.CremiaHugs", cremiaRewardOptions,
|
||||
{ .tooltip = "Choose what reward you get for winning the Milk Run minigame after the first time. \n"
|
||||
"-Vanilla: Reward is Random\n"
|
||||
"-Hug: Get the hugging cutscene\n"
|
||||
"-Rupee: Get the rupee reward",
|
||||
.defaultIndex = CREMIA_REWARD_RANDOM });
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
@ -363,6 +363,12 @@ static const std::unordered_map<int32_t, const char*> alwaysWinDoggyraceOptions
|
||||
{ ALWAYS_WIN_DOGGY_RACE_ALWAYS, "Always" },
|
||||
};
|
||||
|
||||
static const std::unordered_map<int32_t, const char*> cremiaRewardOptions = {
|
||||
{ CREMIA_REWARD_RANDOM, "Vanilla" },
|
||||
{ CREMIA_REWARD_ALWAYS_HUG, "Hug" },
|
||||
{ CREMIA_REWARD_ALWAYS_RUPEE, "Rupee" },
|
||||
};
|
||||
|
||||
static const std::unordered_map<int32_t, const char*> clockTypeOptions = {
|
||||
{ CLOCK_TYPE_ORIGINAL, "Original" },
|
||||
{ CLOCK_TYPE_3DS, "MM3D style" },
|
||||
@ -1001,6 +1007,14 @@ void AddEnhancements() {
|
||||
"Makes the Doggy Race easier to win.",
|
||||
WIDGET_CVAR_COMBOBOX,
|
||||
{ .comboBoxOptions = alwaysWinDoggyraceOptions } },
|
||||
{ "Milk Run Reward Options",
|
||||
"gEnhancements.Minigames.CremiaHugs",
|
||||
"Choose what reward you get for winning the Milk Run minigame after the first time. \n"
|
||||
"-Vanilla: Reward is Random\n"
|
||||
"-Hug: Get the hugging cutscene\n"
|
||||
"-Rupee: Get the rupee reward",
|
||||
WIDGET_CVAR_COMBOBOX,
|
||||
{ .comboBoxOptions = cremiaRewardOptions } },
|
||||
{ "Fast Magic Arrow Equip Animation", "gEnhancements.Equipment.MagicArrowEquipSpeed",
|
||||
"Removes the animation for equipping Magic Arrows.", WIDGET_CVAR_CHECKBOX },
|
||||
{ "Instant Fin Boomerangs Recall", "gEnhancements.PlayerActions.InstantRecall",
|
||||
|
@ -47,6 +47,7 @@ void InitEnhancements() {
|
||||
|
||||
// Minigames
|
||||
RegisterAlwaysWinDoggyRace();
|
||||
RegisterCremiaHugs();
|
||||
|
||||
// Player
|
||||
RegisterClimbSpeed();
|
||||
|
@ -36,6 +36,12 @@ enum ClockTypeOptions {
|
||||
CLOCK_TYPE_TEXT_BASED,
|
||||
};
|
||||
|
||||
enum CremiaRewardsOptions {
|
||||
CREMIA_REWARD_RANDOM,
|
||||
CREMIA_REWARD_ALWAYS_HUG,
|
||||
CREMIA_REWARD_ALWAYS_RUPEE,
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
18
mm/2s2h/Enhancements/Minigames/CremiaHugs.cpp
Normal file
18
mm/2s2h/Enhancements/Minigames/CremiaHugs.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include "GameInteractor/GameInteractor.h"
|
||||
#include "Enhancements/Enhancements.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64save.h>
|
||||
}
|
||||
|
||||
void RegisterCremiaHugs() {
|
||||
REGISTER_VB_SHOULD(VB_PLAY_CREMIA_HUG_CUTSCENE, {
|
||||
uint8_t selectedOption = CVarGetInteger("gEnhancements.Minigames.CremiaHugs", 0);
|
||||
if (selectedOption == CREMIA_REWARD_ALWAYS_HUG) {
|
||||
*should = true;
|
||||
} else if (selectedOption == CREMIA_REWARD_ALWAYS_RUPEE) {
|
||||
*should = false;
|
||||
}
|
||||
});
|
||||
}
|
@ -3,4 +3,6 @@
|
||||
|
||||
void RegisterAlwaysWinDoggyRace();
|
||||
|
||||
void RegisterCremiaHugs();
|
||||
|
||||
#endif // MINIGAMES_H
|
||||
|
@ -64,6 +64,7 @@ typedef enum {
|
||||
VB_DRAW_SLIME_BODY_ITEM,
|
||||
VB_ZTARGET_SPEED_CHECK,
|
||||
VB_THIEF_BIRD_STEAL,
|
||||
VB_PLAY_CREMIA_HUG_CUTSCENE,
|
||||
} GIVanillaBehavior;
|
||||
|
||||
typedef enum {
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include "z_en_ma_yto.h"
|
||||
#include "overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h"
|
||||
|
||||
#include "2s2h/GameInteractor/GameInteractor.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_100000 | ACTOR_FLAG_2000000)
|
||||
|
||||
#define THIS ((EnMaYto*)thisx)
|
||||
@ -308,7 +310,8 @@ void EnMaYto_ChooseAction(EnMaYto* this, PlayState* play) {
|
||||
case MA_YTO_TYPE_AFTERMILKRUN:
|
||||
this->unk310 = 0;
|
||||
if ((INV_CONTENT(ITEM_MASK_ROMANI) == ITEM_MASK_ROMANI) &&
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_ESCORTED_CREMIA) && (Rand_Next() & 0x80)) {
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_ESCORTED_CREMIA) &&
|
||||
(GameInteractor_Should(VB_PLAY_CREMIA_HUG_CUTSCENE, Rand_Next() & 0x80))) {
|
||||
EnMaYto_SetupBeginWarmFuzzyFeelingCs(this);
|
||||
} else {
|
||||
EnMaYto_SetupAfterMilkRunInit(this);
|
||||
|
Loading…
Reference in New Issue
Block a user