mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
[Enhancement] Disable Takkuri Steal (#776)
* simple and works * implement proxy's feedback Co-authored-by: Garrett Joe Cox <garrettjcox@gmail.com> * forgot to remove unneeded check from testing * remove null arg * simple and works * implement proxy's feedback Co-authored-by: Garrett Joe Cox <garrettjcox@gmail.com> * forgot to remove unneeded check from testing * remove null arg * changes * bump lus * add checkbox to modern menu * clang * archez feedback * proxy feedback
This commit is contained in:
@@ -743,6 +743,15 @@ void DrawEnhancementsMenu() {
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (UIWidgets::BeginMenu("Difficulty Options")) {
|
||||
if (UIWidgets::CVarCheckbox("Disable Takkuri Steal", "gEnhancements.Cheats.DisableTakkuriSteal",
|
||||
{ .tooltip = "Prevents the Takkuri from stealing key items like bottles and "
|
||||
"swords. It may still steal other items." })) {
|
||||
RegisterDisableTakkuriSteal();
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (mHudEditorWindow) {
|
||||
UIWidgets::WindowButton("Hud Editor", "gWindows.HudEditor", mHudEditorWindow,
|
||||
{ .tooltip = "Enables the Hud Editor window, allowing you to edit your hud" });
|
||||
|
||||
@@ -1306,6 +1306,15 @@ void AddEnhancements() {
|
||||
WIDGET_CVAR_CHECKBOX,
|
||||
{},
|
||||
[](widgetInfo& info) { RegisterWoodfallMountainAppearance(); } } } } });
|
||||
enhancementsSidebar.push_back(
|
||||
{ "Difficulty Options",
|
||||
3,
|
||||
{ { { "Disable Takkuri Steal",
|
||||
"gEnhancements.Cheats.DisableTakkuriSteal",
|
||||
"Prevents the Takkuri from stealing key items like bottles and swords. It may still steal other items.",
|
||||
WIDGET_CVAR_CHECKBOX,
|
||||
{},
|
||||
[](widgetInfo& info) { RegisterDisableTakkuriSteal(); } } } } });
|
||||
enhancementsSidebar.push_back({ "HUD Editor",
|
||||
1,
|
||||
{ // HUD Editor
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef DIFFICULTY_OPTIONS_H
|
||||
#define DIFFICULTY_OPTIONS_H
|
||||
|
||||
void RegisterDisableTakkuriSteal();
|
||||
|
||||
#endif // DIFFICULTY_OPTIONS_H
|
||||
@@ -0,0 +1,14 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include "2s2h/GameInteractor/GameInteractor.h"
|
||||
|
||||
void RegisterDisableTakkuriSteal() {
|
||||
static HOOK_ID thiefBirdStealHookID = 0;
|
||||
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::ShouldVanillaBehavior>(thiefBirdStealHookID);
|
||||
thiefBirdStealHookID = 0;
|
||||
|
||||
if (!CVarGetInteger("gEnhancements.Cheats.DisableTakkuriSteal", 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
thiefBirdStealHookID = REGISTER_VB_SHOULD(VB_THIEF_BIRD_STEAL, { *should = false; });
|
||||
}
|
||||
@@ -72,4 +72,7 @@ void InitEnhancements() {
|
||||
// Modes
|
||||
RegisterPlayAsKafei();
|
||||
RegisterTimeMovesWhenYouMove();
|
||||
|
||||
// Difficulty Options
|
||||
RegisterDisableTakkuriSteal();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "Restorations/Restorations.h"
|
||||
#include "Saving/SavingEnhancements.h"
|
||||
#include "Songs/Songs.h"
|
||||
#include "DifficultyOptions/DifficultyOptions.h"
|
||||
|
||||
enum AlwaysWinDoggyRaceOptions {
|
||||
ALWAYS_WIN_DOGGY_RACE_OFF,
|
||||
|
||||
@@ -63,6 +63,7 @@ typedef enum {
|
||||
VB_CLOCK_TOWER_OPENING_CONSIDER_THIS_FIRST_CYCLE,
|
||||
VB_DRAW_SLIME_BODY_ITEM,
|
||||
VB_ZTARGET_SPEED_CHECK,
|
||||
VB_THIEF_BIRD_STEAL,
|
||||
} GIVanillaBehavior;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
#include "2s2h/Enhancements/FrameInterpolation/FrameInterpolation.h"
|
||||
|
||||
#include "2s2h/GameInteractor/GameInteractor.h"
|
||||
|
||||
#define FLAGS \
|
||||
(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY | ACTOR_FLAG_200 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_80000000)
|
||||
|
||||
@@ -585,7 +587,7 @@ void func_80C1193C(EnThiefbird* this, PlayState* play) {
|
||||
if (!(this->collider.base.atFlags & AT_BOUNCED)) {
|
||||
if ((D_80C1392C != 0) && CUR_UPG_VALUE(UPG_QUIVER) &&
|
||||
((STOLEN_ITEM_1 == STOLEN_ITEM_NONE) || (STOLEN_ITEM_2 == STOLEN_ITEM_NONE)) &&
|
||||
(Rand_ZeroOne() < 0.5f) && func_80C10B0C(this, play)) {
|
||||
GameInteractor_Should(VB_THIEF_BIRD_STEAL, Rand_ZeroOne() < 0.5f) && func_80C10B0C(this, play)) {
|
||||
func_80C1242C(this);
|
||||
} else if (func_80C10E98(play)) {
|
||||
func_80C11338(this, play);
|
||||
|
||||
Reference in New Issue
Block a user