-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cs
More file actions
38 lines (34 loc) · 1.68 KB
/
Main.cs
File metadata and controls
38 lines (34 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using MelonLoader;
namespace NEP.NoDeathAnimations
{
public static class BuildInfo
{
public const string Name = "No Death Animations"; // Name of the Mod. (MUST BE SET)
public const string Description = "Removes death animations from NPCs."; // Description for the Mod. (Set as null if none)
public const string Author = "Not Enough Photons"; // Author of the Mod. (MUST BE SET)
public const string Company = "Not Enough Photons"; // Company that made the Mod. (Set as null if none)
public const string Version = "1.0.0"; // Version of the Mod. (MUST BE SET)
public const string DownloadLink = null; // Download Link for the Mod. (Set as null if none)
}
public class NDAMod : MelonMod
{
}
[HarmonyLib.HarmonyPatch(typeof(PuppetMasta.PuppetMaster))]
[HarmonyLib.HarmonyPatch(nameof(PuppetMasta.PuppetMaster.Awake))]
public static class PuppetMasterPatch
{
public static void Postfix(PuppetMasta.PuppetMaster __instance)
{
PuppetMasta.PuppetMaster.StateSettings settings = new PuppetMasta.PuppetMaster.StateSettings()
{
deadMuscleDamper = __instance.stateSettings.deadMuscleDamper,
deadMuscleWeight = __instance.stateSettings.deadMuscleWeight,
enableAngularLimitsOnKill = __instance.stateSettings.enableAngularLimitsOnKill,
enableInternalCollisionsOnKill = __instance.stateSettings.enableInternalCollisionsOnKill,
killDuration = 0f,
maxFreezeSqrVelocity = __instance.stateSettings.maxFreezeSqrVelocity
};
__instance.stateSettings = settings;
}
}
}