839 |
839 |
840 static bool IsBadFarmFieldTile(TileIndex tile) |
840 static bool IsBadFarmFieldTile(TileIndex tile) |
841 { |
841 { |
842 switch (GetTileType(tile)) { |
842 switch (GetTileType(tile)) { |
843 case MP_CLEAR: return IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT); |
843 case MP_CLEAR: return IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT); |
844 case MP_TREES: return false; |
844 case MP_TREES: return (GetTreeGround(tile) == TREE_GROUND_SHORE); |
845 default: return true; |
845 default: return true; |
846 } |
846 } |
847 } |
847 } |
848 |
848 |
849 static bool IsBadFarmFieldTile2(TileIndex tile) |
849 static bool IsBadFarmFieldTile2(TileIndex tile) |
850 { |
850 { |
851 switch (GetTileType(tile)) { |
851 switch (GetTileType(tile)) { |
852 case MP_CLEAR: return IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT); |
852 case MP_CLEAR: return IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT); |
853 case MP_TREES: return false; |
853 case MP_TREES: return (GetTreeGround(tile) == TREE_GROUND_SHORE); |
854 default: return true; |
854 default: return true; |
855 } |
855 } |
856 } |
856 } |
857 |
857 |
858 static void SetupFarmFieldFence(TileIndex tile, int size, byte type, Axis direction) |
858 static void SetupFarmFieldFence(TileIndex tile, int size, byte type, Axis direction) |