Skip to content

Commit

Permalink
feat: transition death
Browse files Browse the repository at this point in the history
  • Loading branch information
Clazex committed Apr 30, 2022
1 parent 5a92373 commit feef6e1
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GodSeekerPlus/GodSeekerPlus.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyTitle>GodSeekerPlus</AssemblyTitle>
<Version>0.19.6</Version>
<Version>0.19.7</Version>
<Description>A Hollow Knight mod to enhance your Godhome experience</Description>
<Authors>Clazex</Authors>

Expand Down
36 changes: 36 additions & 0 deletions GodSeekerPlus/Modules/Bugfix/TransitionDeath.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
namespace GodSeekerPlus.Modules.Bugfix;

[DefaultEnabled]
internal sealed class TransitionDeath : Module {
private bool deadInSequence = false;

private protected override void Load() {
On.HeroController.Die += RecordDeath;
On.GameManager.EnterHero += CheckDeath;
}

private protected override void Unload() {
deadInSequence = false;
On.HeroController.Die -= RecordDeath;
On.GameManager.EnterHero -= CheckDeath;
}

private IEnumerator RecordDeath(On.HeroController.orig_Die orig, HeroController self) {
if (BossSequenceController.IsInSequence) {
deadInSequence = true;
}

yield return orig(self);
}

private void CheckDeath(On.GameManager.orig_EnterHero orig, GameManager self, bool additiveGateSearch) {
orig(self, additiveGateSearch);

if (deadInSequence && BossSequenceController.IsInSequence) {
Logger.LogWarn("Dead in sequence while not finishing it, trying again");
Ref.HC.StartCoroutine("Die");
} else {
deadInSequence = false;
}
}
}
1 change: 1 addition & 0 deletions GodSeekerPlus/Resources/Lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"Modules/NoSpellDamage": "No Spell Damage",
"Modules/P5Health": "P5 Health",
"Modules/P5Teleport": "P5 Teleport",
"Modules/TransitionDeath": "Transition Death",
"Modules/SegmentedP5": "Segmented P5",
"Modules/ShortDeathAnimation": "Short Death Animation",
"Modules/UnlockAllModes": "Unlock All Modes",
Expand Down
1 change: 1 addition & 0 deletions GodSeekerPlus/Resources/Lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"Modules/NoSpellDamage": "取消法术伤害",
"Modules/P5Health": "五门血量",
"Modules/P5Teleport": "五门传送",
"Modules/TransitionDeath": "场景转换死亡",
"Modules/SegmentedP5": "分段五门",
"Modules/ShortDeathAnimation": "短死亡动画",
"Modules/UnlockAllModes": "解锁所有模式",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Compatible with `Hollow Knight` 1.5.
- **Bugfix**:
+ **Camera Keep Rumbling**: Prevent camera from keeping rumbling after scene transitions in Godhome.
+ **Crossing Ooma**: Prevent Ooma from spawning explosive jellies across scenes.
+ **Transition Death**: Prevent from continuing pantheon challenges after death upon scene transitions.

- **Cosmetic**:
+ **More Pantheon Caps**: Enable the unused no hit cap for Pantheons 1 to 4, and add a new special effect for all pantheons indicating completed once no hit with all bindings.
Expand Down
1 change: 1 addition & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- **Bug 修复**:
+ **屏幕保持震动**:阻止屏幕在进行神居中的场景转换后保持震动。
+ **穿越欧玛**: 阻止欧玛跨场景生成爆炸水母。
+ **场景转换死亡**:阻止在场景转换时死亡后继续万神殿挑战。

- **装饰性**:
+ **更多万神殿灯**:为第一到四万神殿启用未使用的无伤灯,并为所有万神殿添加一个新的代表曾完成过无伤四锁的效果。
Expand Down

0 comments on commit feef6e1

Please sign in to comment.