/// <summary>
        /// Determine if a living can move from srcLoc to dir, without considering the destination
        /// </summary>
        public static bool CanMoveFrom(IEnvironmentObject env, IntPoint3 srcLoc, Direction dir)
        {
            Debug.Assert(dir.IsValid());

            if (env.Contains(srcLoc) == false)
                return false;

            var td = env.GetTileData(srcLoc);

            if (td.IsUndefined)
                return false;

            var srcTerrain = Terrains.GetTerrain(td.TerrainID);
            var srcInter = Interiors.GetInterior(td.InteriorID);
            var itemBlocks = (td.Flags & TileFlags.ItemBlocks) != 0;

            if (srcInter.IsBlocker || srcTerrain.IsBlocker || itemBlocks)
                return false;

            if (dir.IsPlanar())
                return true;

            if (dir == Direction.Up)
                return srcInter.ID == InteriorID.Stairs;

            if (dir == Direction.Down)
                return srcTerrain.ID == TerrainID.StairsDown;

            if (dir.ContainsDown())
            {
                return true;
            }

            if (dir.ContainsUp())
            {
                if (!srcTerrain.ID.IsSlope())
                    return false;

                if (env.GetTerrainID(srcLoc + Direction.Up) != TerrainID.Empty)
                    return false;

                return true;
            }

            return false;
        }