Пример #1
0
        bool CanUnload()
        {
            if (checkTerrainType)
            {
                var terrainType = self.World.Map.GetTerrainInfo(self.Location).Type;

                if (!Info.UnloadTerrainTypes.Contains(terrainType))
                {
                    return(false);
                }
            }

            return(!IsEmpty(self) && CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait <IPositionable>().CanEnterCell(c))));
        }
Пример #2
0
        public bool CanUnload(bool check = false)
        {
            if (checkTerrainType)
            {
                var terrainType = self.World.Map.GetTerrainInfo(self.Location).Type;

                if (!Info.UnloadTerrainTypes.Contains(terrainType))
                {
                    return(false);
                }
            }

            return(!IsEmpty(self) && (aircraft == null || aircraft.CanLand(self.Location, blockedByMobile: false)) &&
                   CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Garrisoners.Any(p => !p.IsDead && p.Trait <IPositionable>().CanEnterCell(c, null, check))));
        }
Пример #3
0
        public bool CanUnload(bool immediate = false)
        {
            if (checkTerrainType)
            {
                var terrainType = self.World.Map.GetTerrainInfo(self.Location).Type;

                if (!Info.UnloadTerrainTypes.Contains(terrainType))
                {
                    return(false);
                }
            }

            return(!IsEmpty(self) && (aircraft == null || aircraft.CanLand(self.Location)) &&
                   CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait <IPositionable>().CanEnterCell(c, null, immediate))));
        }
Пример #4
0
        bool CanUnload()
        {
            if (checkTerrainType)
            {
                var terrainType = self.World.Map.GetTerrainInfo(self.Location).Type;

                if (!Info.UnloadTerrainTypes.Contains(terrainType))
                {
                    return(false);
                }
            }

            return(!Manager.IsEmpty() && (aircraft == null || aircraft.CanLand(self.Location)) && !IsTraitPaused &&
                   CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Manager.Passengers.Any(p => p.Trait <IPositionable>().CanEnterCell(c))));
        }
Пример #5
0
 bool CanUnload()
 {
     return(!IsEmpty(self) && (helicopter == null || helicopter.CanLand(self.Location)) &&
            CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait <IPositionable>().CanEnterCell(c))));
 }
Пример #6
0
 bool CanUnload()
 {
     return(!IsEmpty(self) && self.CenterPosition.Z == 0 &&
            CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait <IPositionable>().CanEnterCell(c))));
 }