Skip to content

Commit 25525f7

Browse files
committed
add MenderbugsHaunting
1 parent 62be14b commit 25525f7

3 files changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using BepInEx;
2+
using BepInEx.Configuration;
3+
using HarmonyLib;
4+
5+
[BepInPlugin("com.chrismzz.menderbugshaunting", "Menderbug's Haunting", "1.0.0")]
6+
7+
public class MenderbugsHaunting : BaseUnityPlugin
8+
{
9+
internal static ConfigEntry<int> damageOnBreak;
10+
11+
private void Awake()
12+
{
13+
14+
Logger.LogInfo("MenderbugsHaunting loaded and initialized.");
15+
damageOnBreak = Config.Bind(
16+
"General",
17+
"Damage On Break",
18+
100,
19+
"Amount of damage to deal to Hornet when she breaks something."
20+
);
21+
22+
Harmony.CreateAndPatchAll(typeof(MenderbugsHaunting), null);
23+
}
24+
25+
[HarmonyPatch(typeof(Breakable), nameof(Breakable.Break))]
26+
[HarmonyPostfix]
27+
private static void Die()
28+
{
29+
// I can add exceptions by using breakable.gameObject if ever this gets too game breaking
30+
HeroController.instance.TakeDamage(null, GlobalEnums.CollisionSide.bottom, damageOnBreak.Value, GlobalEnums.HazardType.EXPLOSION);
31+
}
32+
33+
34+
}

MenderbugsHaunting/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Menderbug's Haunting
2+
3+
> DISCLAIMER! This mod is an adaptation of flibber-hk's [Menderbug's Revenge](https://github.com/flibber-hk/HollowKnight.MenderbugsRevenge) for Hollow Knight. I did not come up with the idea but I wanted to see it in Silksong as well so I made this.
4+
5+
Menderbug is BACK in Silksong! Breaking anything will kill Hornet.
6+
There's a config menu where you can set the damage Hornet receives to whatever number you like (including 0), but would you not want to repent for your crimes against Menderbug? Damage is set to 100 by default.
7+
8+
There are probably places in which the game becomes impossible, in which case please report it to me, in the meantime you can temporarily set the damage to 0 for any of those sections.
9+
10+
## Install
11+
12+
1. Install [BepInEx5 with Configuration Manager](https://www.nexusmods.com/hollowknightsilksong/mods/26) and extract it to the folder with your game executable, then run the game and exit.
13+
2. Download [this mod](https://www.nexusmods.com/hollowknightsilksong/mods/881) and extract it in your `BepInEx/plugins` folder.
14+
15+
Then run the game and enjoy!

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ Here's my repository with the source code for mods I wrote for Hollow Knight: Si
55
## Currently includes
66

77
- [SwapCrestOnHit](https://www.nexusmods.com/hollowknightsilksong/mods/879): Swaps Hornet's crest every time she takes damage.
8+
- [MenderbugsHaunting](https://www.nexusmods.com/hollowknightsilksong/mods/881): Kills Hornet whenever she breaks a background object.
9+
810

0 commit comments

Comments
 (0)