0 of 0

File information

Last updated

Original upload

Created by

Asaidas

Uploaded by

asaidas

Virus scan

Safe to use

Tags for this mod

About this mod

Disables dismemberments and head explosions.

Permissions and credits
A requested feature to disable dismemberments in the game.


Because this one is so simple, I will post the code below so people can see how it's done if they want to try something similar.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace NoDismembering
{
public class NoDismemberModule : GameModule
{  private void Inject()
  {
  }

  public override void OnGameStarted(GameInfo gi)
  {
base.OnGameStarted(gi);
gi.OnWeaponEquiped += Gi_OnWeaponEquiped;
  }

  private void Gi_OnWeaponEquiped(HandFollowScript Hand, WepDesc Weapon, Transform FromToMount)
  {
Debug.Log("Weapon equipped");
foreach (Transform collider in Weapon.WepDmgColliders)
{
collider.gameObject.GetComponent<DamageColliderScript>().CanDismember = false;
collider.gameObject.GetComponent<DamageColliderScript>().CanHeadSplat = false;
Debug.Log("can this one dismember?" + collider.gameObject.GetComponent<DamageColliderScript>().CanDismember);
}
  }
}
}