mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
[Cheat] Allow Elegy of Emptiness anywhere (#712)
* Add cheat to allow Elegy of Emptiness anywhere * Use modern menu for Elegy Anywhere, rename VB Removed redundant null from Elegy scene check Moved ElegyAnywhere enhancement's menu order * Remove extraneous widgets from ElegyAnywhere menu
This commit is contained in:
@@ -792,6 +792,8 @@ void DrawCheatsMenu() {
|
||||
{ .tooltip = "Holding L makes you float into the air" })) {
|
||||
RegisterMoonJumpOnL();
|
||||
}
|
||||
UIWidgets::CVarCheckbox("Elegy of Emptiness Anywhere", "gCheats.ElegyAnywhere",
|
||||
{ .tooltip = "Allows Elegy of Emptiness outside of Ikana" });
|
||||
UIWidgets::CVarCombobox(
|
||||
"Stop Time in Dungeons", "gCheats.TempleTimeStop", timeStopOptions,
|
||||
{ .tooltip = "Stops time from advancing in selected areas. Requires a room change to update.\n\n"
|
||||
|
||||
@@ -973,6 +973,8 @@ void AddEnhancements() {
|
||||
WIDGET_CVAR_CHECKBOX,
|
||||
{},
|
||||
[](widgetInfo& info) { RegisterMoonJumpOnL(); } },
|
||||
{ "Elegy of Emptiness Anywhere", "gCheats.ElegyAnywhere", "Allows Elegy of Emptiness outside of Ikana",
|
||||
WIDGET_CVAR_CHECKBOX },
|
||||
{ "Stop Time in Dungeons",
|
||||
"gCheats.TempleTimeStop",
|
||||
"Stops time from advancing in selected areas. Requires a room change to update.\n\n"
|
||||
|
||||
@@ -7,5 +7,6 @@ void RegisterMoonJumpOnL();
|
||||
void RegisterTimeStopInTemples();
|
||||
void RegisterUnbreakableRazorSword();
|
||||
void RegisterUnrestrictedItems();
|
||||
void RegisterElegyAnywhere();
|
||||
|
||||
#endif // CHEATS_H
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include "2s2h/GameInteractor/GameInteractor.h"
|
||||
|
||||
void RegisterElegyAnywhere() {
|
||||
REGISTER_VB_SHOULD(VB_ELEGY_CHECK_SCENE, {
|
||||
if (CVarGetInteger("gCheats.ElegyAnywhere", 0)) {
|
||||
*should = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -13,6 +13,7 @@ void InitEnhancements() {
|
||||
RegisterUnbreakableRazorSword();
|
||||
RegisterUnrestrictedItems();
|
||||
RegisterTimeStopInTemples();
|
||||
RegisterElegyAnywhere();
|
||||
|
||||
// Clock
|
||||
RegisterTextBasedClock();
|
||||
|
||||
@@ -65,6 +65,7 @@ typedef enum {
|
||||
VB_ZTARGET_SPEED_CHECK,
|
||||
VB_THIEF_BIRD_STEAL,
|
||||
VB_PLAY_CREMIA_HUG_CUTSCENE,
|
||||
VB_ELEGY_CHECK_SCENE,
|
||||
} GIVanillaBehavior;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -4821,12 +4821,14 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
|
||||
|
||||
if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY_DONE) {
|
||||
if (sLastPlayedSong == OCARINA_SONG_ELEGY) {
|
||||
if ((play->sceneId == SCENE_F40) || (play->sceneId == SCENE_F41) ||
|
||||
(play->sceneId == SCENE_IKANAMAE) || (play->sceneId == SCENE_CASTLE) ||
|
||||
(play->sceneId == SCENE_IKNINSIDE) || (play->sceneId == SCENE_IKANA) ||
|
||||
(play->sceneId == SCENE_INISIE_N) || (play->sceneId == SCENE_INISIE_R) ||
|
||||
(play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_RANDOM) ||
|
||||
(play->sceneId == SCENE_REDEAD) || (play->sceneId == SCENE_TOUGITES)) {
|
||||
if (GameInteractor_Should(
|
||||
VB_ELEGY_CHECK_SCENE,
|
||||
(play->sceneId == SCENE_F40) || (play->sceneId == SCENE_F41) ||
|
||||
(play->sceneId == SCENE_IKANAMAE) || (play->sceneId == SCENE_CASTLE) ||
|
||||
(play->sceneId == SCENE_IKNINSIDE) || (play->sceneId == SCENE_IKANA) ||
|
||||
(play->sceneId == SCENE_INISIE_N) || (play->sceneId == SCENE_INISIE_R) ||
|
||||
(play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_RANDOM) ||
|
||||
(play->sceneId == SCENE_REDEAD) || (play->sceneId == SCENE_TOUGITES))) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_EVENT;
|
||||
} else {
|
||||
sLastPlayedSong = 0xFF;
|
||||
|
||||
Reference in New Issue
Block a user