// Token: 0x06000034 RID: 52 RVA: 0x00003648 File Offset: 0x00001848
        private void GenerateCenterHex()
        {
            IntVec3 centerCell = this.rp.rect.CenterCell;

            this.GenerateBaseHex(centerCell);
            int num = centerCell.x - 8;
            int z   = centerCell.z;

            GenSpawn.Spawn(this.GenerateThing(ThingDefOf.OrbitalTradeBeacon, null, this.rp.faction), centerCell, this.map, 0);
            bool flag = false;

            for (int i = 1; i <= 2; i++)
            {
                bool flag2 = false;
                for (int j = 1; j <= 2; j++)
                {
                    IntVec3 intVec;
                    intVec..ctor(num + (flag ? -1 : 1), centerCell.y, z + (flag2 ? -1 : 1) * 2);
                    GridsUtility.GetFirstThing(intVec, this.map, ThingDefOf.Wall).Destroy(0);
                    GenSpawn.Spawn(this.GenerateThing(ThingDefOf.Door, ThingDefOf.BlocksGranite, this.rp.faction), intVec, this.map, 0);
                    GenSpawn.Spawn(this.GenerateThing(NekoDefOf.SculptureLarge, null, this.rp.faction), new IntVec3(num + (flag ? -1 : 1) * 2, centerCell.y, z + (flag2 ? -1 : 1)), this.map, 0);
                    GenSpawn.Spawn(this.GenerateThing(NekoDefOf.SculptureLarge, null, this.rp.faction), new IntVec3(num + (flag ? -1 : 1) * 3, centerCell.y, z + (flag2 ? -1 : 1) * 3), this.map, 0);
                    GenSpawn.Spawn(this.GenerateWorkbench(this.rp.faction), new IntVec3(num + (flag ? -1 : 1) * 6, centerCell.y, z + (flag2 ? -1 : 1) * 6), this.map, flag2 ? Rot4.South : Rot4.North, 0, false);
                    z     = centerCell.z;
                    flag2 = true;
                }
                GenSpawn.Spawn(this.GenerateThing(ThingDefOf.StandingLamp, ThingDefOf.BlocksGranite, this.rp.faction), new IntVec3(num + (flag ? -1 : 1) * -1, centerCell.y, centerCell.z), this.map, 0);
                num  = centerCell.x + 8;
                flag = true;
            }
        }
示例#2
0
        public void SwitchOnLight()
        {
            IntVec3 val = IntVec3Utility.ToIntVec3(this.get_Wearer().get_DrawPos());

            if (!ThingUtility.DestroyedOrNull(light) && val != light.get_Position())
            {
                SwitchOffLight();
            }
            if (ThingUtility.DestroyedOrNull(light) && GridsUtility.GetFirstThing(val, this.get_Wearer().get_Map(), Util_VehicleLights.MiningLightDef) == null)
            {
                light = GenSpawn.Spawn(Util_VehicleLights.VehicleLightDef, val, this.get_Wearer().get_Map(), 0);
            }
            lightIsOn = true;
        }