public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(base.GetInspectString());

            string newDesc = "";

            newDesc = "charging... : " + ((int)(((SRFPSRT_settings.Gettraparmingtime() * 60) - FPSRT_arming))).ToStringSecondsFromTicks();

            stringBuilder.Append(newDesc);

            return(stringBuilder.ToString());
        }
Exemple #2
0
        public override void Tick()
        {
            base.Tick();
            if (this.Spawned)
            {
                FPSRT_arming++;

                if (FPSRT_arming > (SRFPSRT_settings.Gettraparmingtime() * 60))
                {
                    Map     map = base.Map;
                    IntVec3 loc = this.Position;
                    this.Destroy(DestroyMode.Vanish);

                    int temp = UnityEngine.Random.Range(0, 5);

                    String itsname = "";

                    switch (temp)
                    {
                    case 0:
                        itsname = "Building_SRFPSRT_Normal";
                        break;

                    case 1:
                        itsname = "Building_SRFPSRT_flame";
                        break;

                    case 2:
                        itsname = "Building_SRFPSRT_flash";
                        break;

                    case 3:
                        itsname = "Building_SRFPSRT_poison";
                        break;

                    default:
                        itsname = "Building_SRFPSRT_summon";
                        break;
                    }
                    Thing thing = GenSpawn.Spawn(ThingMaker.MakeThing(ThingDef.Named(itsname), this.Stuff), loc, map, WipeMode.Vanish);
                    thing.SetFaction(Faction.OfPlayer, null);
                }
            }
        }