示例#1
0
        public static void MakeTeleportAt(IntVec3 c, Map map, ActiveDropPodInfo info, FactionDefExtension extension = null)
        {
            /*
             * WeatherEvent @event = new WeatherEvent_DeepStrike_Teleport(map, c, boltstring: (extension !=null ? extension.TeleportBoltTexPath : ""));
             * map.weatherManager.eventHandler.AddEvent(@event);
             */
            ThingDef TunnelDef = DefDatabase <ThingDef> .GetNamed("OG_AMA_Teleporter");

            TeleportSpawner teleportSpawner = (TeleportSpawner)ThingMaker.MakeThing(TunnelDef, null);

            foreach (Thing item in info.innerContainer)
            {
                teleportSpawner.GetDirectlyHeldThings().TryAddOrTransfer(item, false);
            }
            teleportSpawner.extFaction = extension;
            GenSpawn.Spawn(teleportSpawner, c, map);
        }
示例#2
0
        // Token: 0x06002762 RID: 10082 RVA: 0x0012C458 File Offset: 0x0012A858
        public static void MakeTeleportAt(IntVec3 c, Map map, ActiveDropPodInfo info, FactionDefExtension extension)
        {
            WeatherEvent @event = new WeatherEvent_DeepStrike_Teleport(map, c, boltstring: (extension != null ? extension.TeleportBoltTexPath : ""));

            map.weatherManager.eventHandler.AddEvent(@event);
            ThingDef TunnelDef = DefDatabase <ThingDef> .GetNamed("OG_AMA_Teleporter");

            //        Log.Message(string.Format("making teleportSpawner: {0}, @: {1}, {2}, {3}", TunnelDef, c, map, info.innerContainer.ContentsString));
            TeleportSpawner teleportSpawner = (TeleportSpawner)ThingMaker.MakeThing(TunnelDef, null);

            foreach (Thing item in info.innerContainer)
            {
                teleportSpawner.GetDirectlyHeldThings().TryAddOrTransfer(item, false);
            }
            GenSpawn.Spawn(teleportSpawner, c, map);
            //--    SkyfallerMaker.SpawnSkyfaller(ThingDefOf.DropPodIncoming, tunnelSpawner, c, map);
        }