Exemplo n.º 1
0
        // Token: 0x06002656 RID: 9814 RVA: 0x00123A60 File Offset: 0x00121E60
        public static bool TryStartWarpfireIn(IntVec3 c, Map map, float fireSize)
        {
            float num = WarpfireUtility.ChanceToStartWarpfireIn(c, map);

            if (num <= 0f)
            {
                return(false);
            }
            Warpfire fire = (Warpfire)ThingMaker.MakeThing(OGThingDefOf.OG_Warpfire, null);

            fire.fireSize = fireSize;
            GenSpawn.Spawn(fire, c, map, Rot4.North, WipeMode.Vanish, false);
            return(true);
        }
Exemplo n.º 2
0
        // Token: 0x0600265A RID: 9818 RVA: 0x00123C14 File Offset: 0x00122014
        public static bool ContainsStaticWarpfire(this IntVec3 c, Map map)
        {
            List <Thing> list = map.thingGrid.ThingsListAt(c);

            for (int i = 0; i < list.Count; i++)
            {
                Warpfire fire = list[i] as Warpfire;
                if (fire != null && fire.parent == null)
                {
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 3
0
        // Token: 0x0600026B RID: 619 RVA: 0x000170D8 File Offset: 0x000154D8
        private bool StartBeatingWarpfireIfAnyAt(IntVec3 cell, Toil nextToil)
        {
            List <Thing> thingList = cell.GetThingList(base.Map);

            for (int i = 0; i < thingList.Count; i++)
            {
                Warpfire warpfire = thingList[i] as Warpfire;
                if (warpfire != null && warpfire.parent == null)
                {
                    this.job.targetA = warpfire;
                    this.pawn.pather.StopDead();
                    base.JumpToToil(nextToil);
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 4
0
        // Token: 0x06002657 RID: 9815 RVA: 0x00123AAC File Offset: 0x00121EAC
        public static void TryAttachWarpfire(this Thing t, float fireSize)
        {
            if (!t.CanEverAttachWarpfire())
            {
                return;
            }
            if (t.HasAttachment(OGThingDefOf.OG_Warpfire))
            {
                return;
            }
            Warpfire fire = (Warpfire)ThingMaker.MakeThing(OGThingDefOf.OG_Warpfire, null);

            fire.fireSize = fireSize;
            fire.AttachTo(t);
            GenSpawn.Spawn(fire, t.Position, t.Map, Rot4.North, WipeMode.Vanish, false);
            Pawn pawn = t as Pawn;

            if (pawn != null)
            {
                pawn.jobs.StopAll(false);
                pawn.records.Increment(RecordDefOf.TimesOnFire);
            }
        }