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

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

        display.Display(Health);
    }