public static bool InDeterioratingPosition(Thing t)
 {
     if (t.Position.Roofed(t.Map))
     {
         return(false);
     }
     if (SteadyAtmosphereEffects.ProtectedByEdifice(t.Position, t.Map))
     {
         return(false);
     }
     return(true);
 }
        private void TryDoDeteriorate(Thing t, IntVec3 c, bool checkEdifice)
        {
            float num = SteadyAtmosphereEffects.FinalDeteriorationRate(t);

            if (num < 0.001f)
            {
                return;
            }
            float num2 = this.deteriorationRate * num / 36f;

            if (Rand.Value < num2 && (!checkEdifice || !SteadyAtmosphereEffects.ProtectedByEdifice(c, t.Map)))
            {
                t.TakeDamage(new DamageInfo(DamageDefOf.Deterioration, 1, -1f, null, null, null, DamageInfo.SourceCategory.ThingOrUnknown));
            }
        }
        private void TryDoDeteriorate(Thing t, IntVec3 c, bool checkEdifice)
        {
            float num = SteadyAtmosphereEffects.FinalDeteriorationRate(t);

            if (!(num < 0.0010000000474974513))
            {
                float num2 = (float)(this.deteriorationRate * num / 36.0);
                if (Rand.Value < num2)
                {
                    if (checkEdifice && SteadyAtmosphereEffects.ProtectedByEdifice(c, t.Map))
                    {
                        return;
                    }
                    t.TakeDamage(new DamageInfo(DamageDefOf.Deterioration, 1, -1f, null, null, null, DamageInfo.SourceCategory.ThingOrUnknown));
                }
            }
        }
 public static bool InDeterioratingPosition(Thing t)
 {
     return(!t.Position.Roofed(t.Map) && !SteadyAtmosphereEffects.ProtectedByEdifice(t.Position, t.Map));
 }