mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-01 08:05:07 -04:00
Various changes
Moved to enhancements menu, under gameplay and items. Added LINK_IS_ADULT. Added update to use in sohmenubar.
This commit is contained in:
parent
37fe1a5857
commit
1fb4db8707
@ -711,7 +711,19 @@ void RegisterPatchChildHylianShieldHandler() {
|
|||||||
UpdatePatchChildHylianShield();
|
UpdatePatchChildHylianShield();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
f32 triforcePieceScale;
|
|
||||||
|
void UpdateChildHylianShieldState() {
|
||||||
|
auto player = GET_PLAYER(gPlayState);
|
||||||
|
Player_SetModels(player, Player_ActionToModelGroup(player, player->heldItemAction));
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterChildHylianShielStatedHandler() {
|
||||||
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int32_t sceneNum) {
|
||||||
|
UpdateChildHylianShieldState();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
f32 triforcePieceScale;
|
||||||
|
|
||||||
void RegisterTriforceHunt() {
|
void RegisterTriforceHunt() {
|
||||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||||
|
@ -13,6 +13,7 @@ void PatchToTMedallions();
|
|||||||
void UpdatePermanentHeartLossState();
|
void UpdatePermanentHeartLossState();
|
||||||
void InitMods();
|
void InitMods();
|
||||||
void UpdatePatchChildHylianShield();
|
void UpdatePatchChildHylianShield();
|
||||||
|
void UpdateChildHylianShieldState();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,6 @@
|
|||||||
#include "Enhancements/randomizer/randomizer_item_tracker.h"
|
#include "Enhancements/randomizer/randomizer_item_tracker.h"
|
||||||
#include "Enhancements/randomizer/randomizer_settings_window.h"
|
#include "Enhancements/randomizer/randomizer_settings_window.h"
|
||||||
#include "Enhancements/resolution-editor/ResolutionEditor.h"
|
#include "Enhancements/resolution-editor/ResolutionEditor.h"
|
||||||
#include "functions.h"
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
extern bool ToggleAltAssetsAtEndOfFrame;
|
extern bool ToggleAltAssetsAtEndOfFrame;
|
||||||
extern bool isBetaQuestEnabled;
|
extern bool isBetaQuestEnabled;
|
||||||
@ -669,6 +667,20 @@ void DrawEnhancementsMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
UIWidgets::Tooltip("Allows strength to be toggled on and off by pressing A on the strength upgrade in the equipment subscreen of the pause menu (This allows performing some glitches that require the player to not have strength).");
|
UIWidgets::Tooltip("Allows strength to be toggled on and off by pressing A on the strength upgrade in the equipment subscreen of the pause menu (This allows performing some glitches that require the player to not have strength).");
|
||||||
|
if (UIWidgets::PaddedEnhancementCheckbox("Hold Hylian Shield as Child Link", "gChildHoldsHylianShield", true, false)) {
|
||||||
|
if (CVarGetInteger("gChildHoldsHylianShield", 0) == 0) {
|
||||||
|
CVarSetInteger("gRotateScaleChildHylianShield", 0);
|
||||||
|
}
|
||||||
|
UpdateChildHylianShieldState();
|
||||||
|
}
|
||||||
|
UIWidgets::Tooltip("Allows Child Link to hold the Hylian Shield the same way as the rest of the shields.");
|
||||||
|
if (CVarGetInteger("gChildHoldsHylianShield", 0) == 1) {
|
||||||
|
if (UIWidgets::PaddedEnhancementCheckbox("Rotate and Scale Child Hylian Shield", "gRotateScaleChildHylianShield", true, false)) {
|
||||||
|
UpdateChildHylianShieldState();
|
||||||
|
UpdatePatchChildHylianShield();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UIWidgets::Tooltip("Rotates and scales the hylian shield for Child Link, so that it is the same orientation as the other shields. May not work properly with some mods.");
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1339,22 +1351,6 @@ void DrawCheatsMenu() {
|
|||||||
UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire");
|
UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", "gShieldTwoHanded", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", "gShieldTwoHanded", true, false);
|
||||||
UIWidgets::Tooltip("This allows you to put up your shield with any two-handed weapon in hand except for Deku Sticks");
|
UIWidgets::Tooltip("This allows you to put up your shield with any two-handed weapon in hand except for Deku Sticks");
|
||||||
if (UIWidgets::PaddedEnhancementCheckbox("Hold Hylian Shield as Child Link", "gChildHoldsHylianShield", true, false)) {
|
|
||||||
if (CVarGetInteger("gChildHoldsHylianShield", 0) == 0) {
|
|
||||||
CVarSetInteger("gRotateScaleChildHylianShield", 0);
|
|
||||||
}
|
|
||||||
auto player = GET_PLAYER(gPlayState);
|
|
||||||
Player_SetModels(player, Player_ActionToModelGroup(player, player->heldItemAction));
|
|
||||||
}
|
|
||||||
UIWidgets::Tooltip("Allows Child Link to hold the Hylian Shield the same way as the rest of the shields.");
|
|
||||||
if (CVarGetInteger("gChildHoldsHylianShield", 0) == 1) {
|
|
||||||
if (UIWidgets::PaddedEnhancementCheckbox("Rotate and Scale Child Hylian Shield", "gRotateScaleChildHylianShield", true, false)) {
|
|
||||||
auto player = GET_PLAYER(gPlayState);
|
|
||||||
Player_SetModels(player, Player_ActionToModelGroup(player, player->heldItemAction));
|
|
||||||
UpdatePatchChildHylianShield();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UIWidgets::Tooltip("Rotates and scales the hylian shield for Child Link, so that it is the same orientation as the other shields. May not work properly with some mods.");
|
|
||||||
UIWidgets::Spacer(2.0f);
|
UIWidgets::Spacer(2.0f);
|
||||||
ImGui::Text("Deku Sticks:");
|
ImGui::Text("Deku Sticks:");
|
||||||
UIWidgets::EnhancementCombobox("gDekuStickCheat", DekuStickCheat, DEKU_STICK_NORMAL);
|
UIWidgets::EnhancementCombobox("gDekuStickCheat", DekuStickCheat, DEKU_STICK_NORMAL);
|
||||||
|
@ -581,7 +581,7 @@ s32 func_8008E9C4(Player* this) {
|
|||||||
|
|
||||||
s32 Player_IsChildWithHylianShield(Player* this) {
|
s32 Player_IsChildWithHylianShield(Player* this) {
|
||||||
if (CVarGetInteger("gChildHoldsHylianShield", 0)) {
|
if (CVarGetInteger("gChildHoldsHylianShield", 0)) {
|
||||||
return 0;
|
return false; // Skip vanilla check for making child Link have the Hylian Shield on his back, allowing for it to be used in hand
|
||||||
} else {
|
} else {
|
||||||
return gSaveContext.linkAge != 0 && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
return gSaveContext.linkAge != 0 && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
||||||
}
|
}
|
||||||
@ -605,7 +605,7 @@ void Player_SetModelsForHoldingShield(Player* this) {
|
|||||||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
||||||
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
|
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
|
||||||
if (LINK_IS_CHILD && (CVarGetInteger("gChildHoldsHylianShield", 0)) && (this->currentShield == PLAYER_SHIELD_HYLIAN)) {
|
if (LINK_IS_CHILD && (CVarGetInteger("gChildHoldsHylianShield", 0)) && (this->currentShield == PLAYER_SHIELD_HYLIAN)) {
|
||||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][0];
|
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][LINK_AGE_ADULT];
|
||||||
} else {
|
} else {
|
||||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
|
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
|
||||||
}
|
}
|
||||||
@ -632,7 +632,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
|||||||
|
|
||||||
if (LINK_IS_CHILD && CVarGetInteger("gChildHoldsHylianShield", 0) &&
|
if (LINK_IS_CHILD && CVarGetInteger("gChildHoldsHylianShield", 0) &&
|
||||||
this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_HYLIAN) {
|
this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_HYLIAN) {
|
||||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][0];
|
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][LINK_AGE_ADULT];
|
||||||
}
|
}
|
||||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && this->rightHandType == 11) { // If holding Bow/Slingshot
|
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && this->rightHandType == 11) { // If holding Bow/Slingshot
|
||||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][Player_HoldsSlingshot(this)];
|
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][Player_HoldsSlingshot(this)];
|
||||||
@ -645,7 +645,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
|||||||
if (CVarGetInteger("gRotateScaleChildHylianShield", 0)) {
|
if (CVarGetInteger("gRotateScaleChildHylianShield", 0)) {
|
||||||
if (LINK_IS_CHILD && this->sheathType == PLAYER_MODELTYPE_SHEATH_18 && this->currentShield == PLAYER_SHIELD_HYLIAN &&
|
if (LINK_IS_CHILD && this->sheathType == PLAYER_MODELTYPE_SHEATH_18 && this->currentShield == PLAYER_SHIELD_HYLIAN &&
|
||||||
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI || gSaveContext.equips.buttonItems[0] == ITEM_NONE || gSaveContext.equips.buttonItems[0] == ITEM_STICK))) {
|
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI || gSaveContext.equips.buttonItems[0] == ITEM_NONE || gSaveContext.equips.buttonItems[0] == ITEM_STICK))) {
|
||||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
this->sheathDLists = &sPlayerDListGroups[this->sheathType][LINK_AGE_ADULT];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user