コード例 #1
0
        // Token: 0x0600001B RID: 27 RVA: 0x00002854 File Offset: 0x00000A54
        public void TickTack()
        {
            bool destroyed = base.Destroyed;

            if (!destroyed)
            {
                MoteMaker.ThrowDustPuff(this.Position, base.Map, 0.2f);
                List <Thing> thingList = GridsUtility.GetThingList(base.Position, base.Map);
                for (int i = 0; i < thingList.Count; i++)
                {
                    bool flag = thingList[i] != null;
                    if (flag)
                    {
                        Thing thing  = thingList[i];
                        Pawn  pawn   = thingList[i] as Pawn;
                        bool  flaga  = thing.def.useHitPoints && !this.touchingThings.Contains(thing) && thing.def != XenomorphDefOf.RRY_FilthBloodXenomorph && thing.GetType() != typeof(Pawn);
                        bool  flag2  = thing != null && !this.touchingThings.Contains(thing) && thing.def != XenomorphDefOf.RRY_FilthBloodXenomorph && thing.GetType() != typeof(Mote) && thing.GetType() != typeof(MoteThrown) && thing.GetType() != typeof(Bullet) && thing.GetType() != typeof(Pawn);
                        bool  flag2a = !(thing is Corpse corpse && XenomorphUtil.IsXenoCorpse(corpse));
                        bool  flag2b = !(thing is Pawn && XenomorphUtil.IsXenomorph((Pawn)thing));
                        if (flaga && flag2a && flag2b)
                        {
                            this.touchingThings.Add(thing);
                            this.damageEntities(thing, Mathf.RoundToInt((float)this.AcidDamage * Rand.Range(0.5f, 1.25f)));
                            MoteMaker.ThrowDustPuff(thing.Position, base.Map, 0.2f);
                        }
                        bool flag3 = pawn != null;
                        if (flag3 && flag2b)
                        {
                            this.touchingPawns.Add(pawn);
                            bool flag4 = !XenomorphUtil.IsXenomorph(pawn);
                            if (flag4)
                            {
                                this.addAcidDamage(pawn);
                                MoteMaker.ThrowDustPuff(pawn.Position, base.Map, 0.2f);
                            }
                        }
                    }
                }

                /*
                 * for (int j = 0; j < this.touchingPawns.Count; j++)
                 * {
                 *  Pawn pawn2 = this.touchingPawns[j];
                 *  bool flag5 = !pawn2.Spawned || pawn2.Position != base.Position || XenomorphUtil.IsXenomorph(pawn2);
                 *  if (flag5)
                 *  {
                 *      this.touchingPawns.Remove(pawn2);
                 *  }
                 *  else
                 *  {
                 *      bool flag6 = !pawn2.RaceProps.Animal;
                 *      if (flag6)
                 *      {
                 *          this.addAcidDamage(pawn2);
                 *      }
                 *  }
                 * }
                 * for (int k = 0; k < this.touchingThings.Count; k++)
                 * {
                 *  Thing thing2 = this.touchingThings[k];
                 *  bool flag7 = !thing2.Spawned || thing2.Position != base.Position;
                 *  if (flag7)
                 *  {
                 *      this.touchingThings.Remove(thing2);
                 *  }
                 *  else
                 *  {
                 *      this.damageEntities(thing2, Mathf.RoundToInt((float)this.AcidDamage * Rand.Range(0.5f, 1.25f)));
                 *  }
                 * }
                 */
                this.damageBuildings(Mathf.RoundToInt((float)this.AcidDamage * Rand.Range(0.5f, 1.25f)));
                this.cachedLabelMouseover = null;
            }
        }