Example #1
0
            public static void Postfix(Deconstructable __instance)
            {
                var door = __instance.GetComponent <Door>();

                if (door != null)
                {
                    IconManager.RemoveIcon(door);
                }
            }
Example #2
0
    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);
        }
    }
Example #3
0
            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]);
                }
            }
Example #4
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]);
                }
            }
Example #5
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);
                }
            }
Example #6
0
 private static float[] InjectMass(float[] mass, Deconstructable deconstructable)
 {
     return(deconstructable.GetComponent <BuildedGeneShuffler>()?.constructionMass ?? mass);
 }
Example #7
0
    private void Start()
    {
        display = owner.GetComponent <DamageDisplay>();

        display.Display(Health);
    }