public static void Postfix(Deconstructable __instance) { var door = __instance.GetComponent <Door>(); if (door != null) { IconManager.RemoveIcon(door); } }
private void OnTriggerEnter(Collider collider) { //Now that's a lot of damage! Player.GetComponent <Damagable>().Damage(Damage); if (!collider.gameObject.CompareTag("Player")) { Destroy(collider.gameObject); } }
public static void Postfix(Deconstructable __instance) { if (CritterPathingPatches.config.TreatDefaultDoorsAsCritterProof) { return; } if (__instance.name.ToUpper().Contains("CRITTERPROOF") && __instance.transform != null) { RemoveDebugCells(__instance.GetComponent <Building>().PlacementCells[0]); } }
public static void Postfix(Deconstructable __instance) { if (config.DoesRegolithSpawn) { return; } Building temp = __instance.GetComponent <Building>(); if (temp.Def.Name.Contains(AdvancedSpaceScannerConfig.DisplayName) && __instance.transform != null) { RemoveDebugCells(temp.PlacementCells[0]); } }
public static void Postfix(Deconstructable __instance) { try { var buildingComplete = __instance.GetComponent <BuildingComplete>(); var buildingName = buildingComplete.name.Replace("Complete", string.Empty); if (State.TileNames.Contains(buildingName)) { State.TileColors[__instance.GetCell()] = null; } } catch (Exception e) { Common.Logger.LogOnce(e); } }
private static float[] InjectMass(float[] mass, Deconstructable deconstructable) { return(deconstructable.GetComponent <BuildedGeneShuffler>()?.constructionMass ?? mass); }
private void Start() { display = owner.GetComponent <DamageDisplay>(); display.Display(Health); }