mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 19:09:23 +00:00
New mod: PlayerPickUp
This commit is contained in:
parent
e9ed898b9a
commit
fd9809bd62
19 changed files with 793 additions and 23 deletions
24
ml_ppu/ModSupport.cs
Normal file
24
ml_ppu/ModSupport.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace ml_ppu
|
||||
{
|
||||
static class ModSupport
|
||||
{
|
||||
static bool ms_ragdollPresent = false;
|
||||
|
||||
internal static void Init()
|
||||
{
|
||||
ms_ragdollPresent = (MelonLoader.MelonBase.RegisteredMelons.FirstOrDefault(m => m.Info.Name == "PlayerRagdollMod") != null);
|
||||
}
|
||||
|
||||
public static bool IsRagdolled() => (ms_ragdollPresent && IsRagdollInternal());
|
||||
static bool IsRagdollInternal() => ml_prm.RagdollController.Instance.IsRagdolled();
|
||||
|
||||
public static void TryToUnragdoll()
|
||||
{
|
||||
if(ms_ragdollPresent)
|
||||
TryToUngradollInternal();
|
||||
}
|
||||
static void TryToUngradollInternal() => ml_prm.RagdollController.Instance.Unragdoll();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue