Ejemplo 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(AdeptusThingDefOf.OG_Warpfire, null);

            fire.fireSize = fireSize;
            GenSpawn.Spawn(fire, c, map, Rot4.North, WipeMode.Vanish, false);
            return(true);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
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(AdeptusThingDefOf.OG_Warpfire))
            {
                return;
            }
            Warpfire fire = (Warpfire)ThingMaker.MakeThing(AdeptusThingDefOf.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);
            }
        }