Ejemplo n.º 1
0
        private void TransporterBeamIn()
        {
            List <Thing> _NewThings = GameComponent_Transporter.GetTransportControler().RetreiveThings();

            _NewThings.ForEach(x =>
            {
                Log.Message("Placing:" + x.def.defName);
                GenPlace.TryPlaceThing(x, this.Position, this.Map, ThingPlaceMode.Near);
            });
        }
Ejemplo n.º 2
0
        private void TransporterBeamCrewOut()
        {
            List <Pawn> _ClosePawns = this.Map.mapPawns.PawnsInFaction(Faction.OfPlayer).Where(P => P.Position.InHorDistOf(this.Position, 5)).ToList();

            _ClosePawns.ToList().ForEach(_CurrentPawn =>
            {
                if (_CurrentPawn.Spawned)
                {
                    GameComponent_Transporter.GetTransportControler().StoreThing(_CurrentPawn);

                    _CurrentPawn.DeSpawn();

                    // Tell the MapDrawer that here is something thats changed
                    this.Map.mapDrawer.MapMeshDirty(_CurrentPawn.Position, MapMeshFlag.Things, true, false);
                }
            });
        }
Ejemplo n.º 3
0
        private void TransporterBeamResourcesOut()
        {
            List <Thing> foundThings = GenRadial.RadialDistinctThingsAround(this.Position, this.Map, 5, true).Where(x => x.def.category == ThingCategory.Item).Where(x => x.Spawned).ToList();

            if (foundThings.Any())
            {
                Log.Message("Found:" + foundThings.Count().ToString());

                GameComponent_Transporter.GetTransportControler().StoreThing(foundThings);
                foundThings.ForEach(x =>
                {
                    Log.Message("Removing: " + x.def.defName);
                    x.DeSpawn();

                    // Tell the MapDrawer that here is something thats changed
                    this.Map.mapDrawer.MapMeshDirty(x.Position, MapMeshFlag.Things, true, false);
                });
            }
        }
Ejemplo n.º 4
0
 public GameComponent_Transporter(Verse.Game game)
 {
     this.game = game;
     GameComponent_Transporter.TransporterControler = this;
 }