예제 #1
0
        private void TransportRecall()
        {
            GameComponent_Prometheus.Instance.Comp_Transporter.TransportBuffer.ForEach(_X =>
            {
                GenPlace.TryPlaceThing(_X, this.parent.Position, this.parent.Map, ThingPlaceMode.Near);
                Comp_Transporter.DisplayTransportEffect(_X);

                Pawn _pawn = _X as Pawn;
                if (_pawn != null)
                {
                    _pawn.SetFactionDirect(Faction.OfPlayer);
                }
            }
                                                                                       );

            GameComponent_Prometheus.Instance.Comp_Transporter.TransportBuffer.Clear();
        }
예제 #2
0
        private void TransportThings()
        {
            List <Thing> _FoundThings = GenRadial.RadialDistinctThingsAround(this.parent.Position, this.parent.Map, 5, true).Where(x => x.def.category == ThingCategory.Item).Where(x => x.Spawned).ToList();

            if (_FoundThings.Any())
            {
                _FoundThings.ForEach(_x =>
                {
                    GameComponent_Prometheus.Instance.Comp_Transporter.TransportBuffer.Add(_x);

                    //GameComponent_Prometheus.Instance.Comp_Quest.AddReserveMaterials(_x.stackCount);
                    Comp_Transporter.DisplayTransportEffect(_x);

                    _x.DeSpawn();

                    // Tell the MapDrawer that here is something thats changed
                    this.parent.Map.mapDrawer.MapMeshDirty(_x.Position, MapMeshFlag.Things, true, false);
                });
            }
        }
예제 #3
0
        private void TransportColonists()
        {
            // List<Thing> _FoundThings = GenRadial.RadialDistinctThingsAround(this.parent.Position, this.parent.Map, 5, true).Where(x => x.def.category == ThingCategory.Item).Where(x => x.Spawned).Where(x => x.def.defName == "Steel").ToList();


            List <Pawn> _Pawns = this.parent.Map.mapPawns.PawnsInFaction(Faction.OfPlayer).Where <Pawn>(t => t.Position.InHorDistOf(this.parent.Position, 5)).ToList();

            if (_Pawns.Any())
            {
                _Pawns.ForEach(_x =>
                {
                    GameComponent_Prometheus.Instance.Comp_Transporter.TransportBuffer.Add(_x);
                    //GameComponent_Prometheus.Instance.Comp_Quest.AddReserveMaterials(_x.stackCount);
                    Comp_Transporter.DisplayTransportEffect(_x);

                    _x.DeSpawn();

                    // Tell the MapDrawer that here is something thats changed
                    this.parent.Map.mapDrawer.MapMeshDirty(_x.Position, MapMeshFlag.Things, true, false);
                });
            }
        }