mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 20:24:47 -04:00
No Heart Drops
This commit is contained in:
@@ -40,6 +40,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> disableRupeeCutscenes;
|
||||
ConfigVar<bool> noSwordRecoil;
|
||||
ConfigVar<int> damageMultiplier;
|
||||
ConfigVar<bool> noHeartDrops;
|
||||
ConfigVar<bool> instantDeath;
|
||||
ConfigVar<bool> fastClimbing;
|
||||
ConfigVar<bool> noMissClimbing;
|
||||
|
||||
@@ -131,6 +131,12 @@ namespace dusk {
|
||||
if (ImGui::BeginMenu("Difficulty")) {
|
||||
config::ImGuiSliderInt("Damage Multiplier", getSettings().game.damageMultiplier, 1, 8, "x%d");
|
||||
|
||||
config::ImGuiCheckbox("No Heart Drops", getSettings().game.noHeartDrops);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Hearts will never drop from enemies,\n"
|
||||
"pots and various other places.");
|
||||
}
|
||||
|
||||
config::ImGuiCheckbox("Instant Death", getSettings().game.instantDeath);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Any hit will instantly kill you.");
|
||||
|
||||
@@ -28,6 +28,7 @@ UserSettings g_userSettings = {
|
||||
.disableRupeeCutscenes {"game.disableRupeeCutscenes", false},
|
||||
.noSwordRecoil {"game.noSwordRecoil", false},
|
||||
.damageMultiplier {"game.damageMultiplier", 1},
|
||||
.noHeartDrops{"game.noHeartDrops", false},
|
||||
.instantDeath {"game.instantDeath", false},
|
||||
.fastClimbing {"game.fastClimbing", false},
|
||||
.noMissClimbing {"game.noMissClimbing", false},
|
||||
@@ -96,6 +97,7 @@ void registerSettings() {
|
||||
Register(g_userSettings.game.disableRupeeCutscenes);
|
||||
Register(g_userSettings.game.noSwordRecoil);
|
||||
Register(g_userSettings.game.damageMultiplier);
|
||||
Register(g_userSettings.game.noHeartDrops);
|
||||
Register(g_userSettings.game.instantDeath);
|
||||
Register(g_userSettings.game.fastClimbing);
|
||||
Register(g_userSettings.game.fastTears);
|
||||
|
||||
@@ -1631,6 +1631,12 @@ fpc_ProcID fopAcM_createItem(const cXyz* i_pos, int i_itemNo, int i_itemBitNo, i
|
||||
JUT_ASSERT(4067, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
// clang-format on
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (i_itemNo == dItemNo_NONE_e) {
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
@@ -1695,6 +1701,12 @@ fopAc_ac_c* fopAcM_fastCreateItem2(const cXyz* i_pos, int i_itemNo, int i_itemBi
|
||||
JUT_ASSERT(4202, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
|
||||
// clang-format on
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
csXyz item_angle(csXyz::Zero);
|
||||
|
||||
if (i_itemNo == dItemNo_NONE_e) {
|
||||
@@ -1761,6 +1773,12 @@ fopAc_ac_c* fopAcM_fastCreateItem(const cXyz* i_pos, int i_itemNo, int i_roomNo,
|
||||
f32* i_speedY, int i_itemBitNo, int param_9,
|
||||
createFunc i_createFunc) {
|
||||
JUT_ASSERT(4324, 0 <= i_itemNo && i_itemNo < 256);
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
csXyz angle;
|
||||
if (i_itemNo == dItemNo_NONE_e) {
|
||||
|
||||
Reference in New Issue
Block a user