1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-12 10:32:26 +01:00

Merge remote-tracking branch 'upstream/develop' into new-save-format

This commit is contained in:
ζeh Matt
2021-10-27 04:30:41 +03:00
11 changed files with 83 additions and 82 deletions

View File

@@ -308,8 +308,10 @@ GameActions::Result::Ptr FootpathPlaceAction::ElementInsertQuery(GameActions::Re
} }
res->Cost += canBuild->Cost; res->Cost += canBuild->Cost;
gFootpathGroundFlags = canBuild->GroundFlags; const auto clearanceData = canBuild->GetData<ConstructClearResult>();
if (!gCheatsDisableClearanceChecks && (canBuild->GroundFlags & ELEMENT_IS_UNDERWATER))
gFootpathGroundFlags = clearanceData.GroundFlags;
if (!gCheatsDisableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER))
{ {
return MakeResult(GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_CANT_BUILD_THIS_UNDERWATER); return MakeResult(GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_CANT_BUILD_THIS_UNDERWATER);
} }
@@ -375,7 +377,8 @@ GameActions::Result::Ptr FootpathPlaceAction::ElementInsertExecute(GameActions::
} }
res->Cost += canBuild->Cost; res->Cost += canBuild->Cost;
gFootpathGroundFlags = canBuild->GroundFlags; const auto clearanceData = canBuild->GetData<ConstructClearResult>();
gFootpathGroundFlags = clearanceData.GroundFlags;
auto surfaceElement = map_get_surface_element_at(_loc); auto surfaceElement = map_get_surface_element_at(_loc);
if (surfaceElement == nullptr) if (surfaceElement == nullptr)

View File

@@ -145,9 +145,11 @@ GameActions::Result::Ptr FootpathPlaceFromTrackAction::ElementInsertQuery(GameAc
return canBuild; return canBuild;
} }
res->Cost += canBuild->Cost; res->Cost += canBuild->Cost;
gFootpathGroundFlags = canBuild->GroundFlags;
if (!gCheatsDisableClearanceChecks && (canBuild->GroundFlags & ELEMENT_IS_UNDERWATER)) const auto clearanceData = canBuild->GetData<ConstructClearResult>();
gFootpathGroundFlags = clearanceData.GroundFlags;
if (!gCheatsDisableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER))
{ {
return MakeResult( return MakeResult(
GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER); GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER);
@@ -213,7 +215,9 @@ GameActions::Result::Ptr FootpathPlaceFromTrackAction::ElementInsertExecute(Game
return canBuild; return canBuild;
} }
res->Cost += canBuild->Cost; res->Cost += canBuild->Cost;
gFootpathGroundFlags = canBuild->GroundFlags;
const auto clearanceData = canBuild->GetData<ConstructClearResult>();
gFootpathGroundFlags = clearanceData.GroundFlags;
auto surfaceElement = map_get_surface_element_at(_loc); auto surfaceElement = map_get_surface_element_at(_loc);
if (surfaceElement == nullptr) if (surfaceElement == nullptr)

View File

@@ -101,10 +101,4 @@ namespace GameActions
# pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif
class ConstructClearResult final : public Result
{
public:
uint8_t GroundFlags{ 0 };
};
} // namespace GameActions } // namespace GameActions

View File

@@ -125,10 +125,11 @@ GameActions::Result::Ptr LargeSceneryPlaceAction::Query() const
supportsCost += canBuild->Cost; supportsCost += canBuild->Cost;
int32_t tempSceneryGroundFlags = canBuild->GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); const auto clearanceData = canBuild->GetData<ConstructClearResult>();
int32_t tempSceneryGroundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);
if (!gCheatsDisableClearanceChecks) if (!gCheatsDisableClearanceChecks)
{ {
if ((canBuild->GroundFlags & ELEMENT_IS_UNDERWATER) || (canBuild->GroundFlags & ELEMENT_IS_UNDERGROUND)) if ((clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER) || (clearanceData.GroundFlags & ELEMENT_IS_UNDERGROUND))
{ {
return MakeResult(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER); return MakeResult(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER);
} }
@@ -261,7 +262,9 @@ GameActions::Result::Ptr LargeSceneryPlaceAction::Execute() const
} }
supportsCost += canBuild->Cost; supportsCost += canBuild->Cost;
resultData.GroundFlags = canBuild->GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);
const auto clearanceData = canBuild->GetData<ConstructClearResult>();
resultData.GroundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);
if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST))
{ {

View File

@@ -94,14 +94,15 @@ GameActions::Result::Ptr MazePlaceTrackAction::Query() const
return canBuild; return canBuild;
} }
if (canBuild->GroundFlags & ELEMENT_IS_UNDERWATER) const auto clearanceData = canBuild->GetData<ConstructClearResult>();
if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)
{ {
res->Error = GameActions::Status::NoClearance; res->Error = GameActions::Status::NoClearance;
res->ErrorMessage = STR_RIDE_CANT_BUILD_THIS_UNDERWATER; res->ErrorMessage = STR_RIDE_CANT_BUILD_THIS_UNDERWATER;
return res; return res;
} }
if (canBuild->GroundFlags & ELEMENT_IS_UNDERGROUND) if (clearanceData.GroundFlags & ELEMENT_IS_UNDERGROUND)
{ {
res->Error = GameActions::Status::NoClearance; res->Error = GameActions::Status::NoClearance;
res->ErrorMessage = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND; res->ErrorMessage = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;

View File

@@ -114,14 +114,15 @@ GameActions::Result::Ptr MazeSetTrackAction::Query() const
return constructResult; return constructResult;
} }
if (constructResult->GroundFlags & ELEMENT_IS_UNDERWATER) const auto clearanceData = constructResult->GetData<ConstructClearResult>();
if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)
{ {
res->Error = GameActions::Status::NoClearance; res->Error = GameActions::Status::NoClearance;
res->ErrorMessage = STR_RIDE_CANT_BUILD_THIS_UNDERWATER; res->ErrorMessage = STR_RIDE_CANT_BUILD_THIS_UNDERWATER;
return res; return res;
} }
if (constructResult->GroundFlags & ELEMENT_IS_UNDERGROUND) if (clearanceData.GroundFlags & ELEMENT_IS_UNDERGROUND)
{ {
res->Error = GameActions::Status::NoClearance; res->Error = GameActions::Status::NoClearance;
res->ErrorMessage = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND; res->ErrorMessage = STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND;

View File

@@ -108,7 +108,8 @@ GameActions::Result::Ptr RideEntranceExitPlaceAction::Query() const
return canBuild; return canBuild;
} }
if (canBuild->GroundFlags & ELEMENT_IS_UNDERWATER) const auto clearanceData = canBuild->GetData<ConstructClearResult>();
if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)
{ {
return MakeResult(GameActions::Status::Disallowed, errorTitle, STR_RIDE_CANT_BUILD_THIS_UNDERWATER); return MakeResult(GameActions::Status::Disallowed, errorTitle, STR_RIDE_CANT_BUILD_THIS_UNDERWATER);
} }
@@ -237,7 +238,8 @@ GameActions::Result::Ptr RideEntranceExitPlaceAction::TrackPlaceQuery(const Coor
return canBuild; return canBuild;
} }
if (canBuild->GroundFlags & ELEMENT_IS_UNDERWATER) const auto clearanceData = canBuild->GetData<ConstructClearResult>();
if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)
{ {
return MakeResult(GameActions::Status::Disallowed, errorTitle, STR_RIDE_CANT_BUILD_THIS_UNDERWATER); return MakeResult(GameActions::Status::Disallowed, errorTitle, STR_RIDE_CANT_BUILD_THIS_UNDERWATER);
} }

View File

@@ -258,7 +258,8 @@ GameActions::Result::Ptr SmallSceneryPlaceAction::Query() const
return canBuild; return canBuild;
} }
const uint8_t groundFlags = canBuild->GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); const auto clearanceData = canBuild->GetData<ConstructClearResult>();
const uint8_t groundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);
res->SetData(SmallSceneryPlaceActionResult{ groundFlags, 0, 0 }); res->SetData(SmallSceneryPlaceActionResult{ groundFlags, 0, 0 });
res->Expenditure = ExpenditureType::Landscaping; res->Expenditure = ExpenditureType::Landscaping;
@@ -418,7 +419,8 @@ GameActions::Result::Ptr SmallSceneryPlaceAction::Execute() const
sceneryElement->SetNeedsSupports(); sceneryElement->SetNeedsSupports();
} }
const uint8_t groundFlags = canBuild->GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); const auto clearanceData = canBuild->GetData<ConstructClearResult>();
const uint8_t groundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);
res->SetData( res->SetData(
SmallSceneryPlaceActionResult{ groundFlags, sceneryElement->GetBaseZ(), sceneryElement->GetSceneryQuadrant() }); SmallSceneryPlaceActionResult{ groundFlags, sceneryElement->GetBaseZ(), sceneryElement->GetSceneryQuadrant() });

View File

@@ -251,7 +251,8 @@ GameActions::Result::Ptr TrackPlaceAction::Query() const
} }
} }
uint8_t mapGroundFlags = canBuild->GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); const auto clearanceData = canBuild->GetData<ConstructClearResult>();
uint8_t mapGroundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);
if (resultData.GroundFlags != 0 && (resultData.GroundFlags & mapGroundFlags) == 0) if (resultData.GroundFlags != 0 && (resultData.GroundFlags & mapGroundFlags) == 0)
{ {
return MakeResult( return MakeResult(
@@ -272,7 +273,7 @@ GameActions::Result::Ptr TrackPlaceAction::Query() const
if (ted.Flags & TRACK_ELEM_FLAG_ONLY_UNDERWATER) if (ted.Flags & TRACK_ELEM_FLAG_ONLY_UNDERWATER)
{ // No element has this flag { // No element has this flag
if (canBuild->GroundFlags & ELEMENT_IS_UNDERWATER) if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)
{ {
return MakeResult( return MakeResult(
GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE,
@@ -280,7 +281,7 @@ GameActions::Result::Ptr TrackPlaceAction::Query() const
} }
} }
if (canBuild->GroundFlags & ELEMENT_IS_UNDERWATER && !gCheatsDisableClearanceChecks) if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER && !gCheatsDisableClearanceChecks)
{ {
return MakeResult( return MakeResult(
GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE,
@@ -476,7 +477,8 @@ GameActions::Result::Ptr TrackPlaceAction::Execute() const
} }
} }
uint8_t mapGroundFlags = canBuild->GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); const auto clearanceData = canBuild->GetData<ConstructClearResult>();
uint8_t mapGroundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);
if (resultData.GroundFlags != 0 && (resultData.GroundFlags & mapGroundFlags) == 0) if (resultData.GroundFlags != 0 && (resultData.GroundFlags & mapGroundFlags) == 0)
{ {
return MakeResult( return MakeResult(

View File

@@ -113,15 +113,12 @@ static bool MapLoc68BABCShouldContinue(
* ebp = clearFunc * ebp = clearFunc
* bl = bl * bl = bl
*/ */
std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt( GameActions::Result::Ptr MapCanConstructWithClearAt(
const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, QuarterTile quarterTile, uint8_t flags, uint8_t crossingMode, bool isTree) const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, QuarterTile quarterTile, uint8_t flags, uint8_t crossingMode, bool isTree)
{ {
int32_t northZ, eastZ, baseHeight, southZ, westZ, water_height; auto res = std::make_unique<GameActions::Result>();
northZ = eastZ = baseHeight = southZ = westZ = water_height = 0;
auto res = std::make_unique<GameActions::ConstructClearResult>();
uint8_t slope = 0;
res->GroundFlags = ELEMENT_IS_ABOVE_GROUND; uint8_t groundFlags = ELEMENT_IS_ABOVE_GROUND;
bool canBuildCrossing = false; bool canBuildCrossing = false;
if (map_is_edge(pos)) if (map_is_edge(pos))
{ {
@@ -132,6 +129,7 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
if (gCheatsDisableClearanceChecks) if (gCheatsDisableClearanceChecks)
{ {
res->SetData(ConstructClearResult{ groundFlags });
return res; return res;
} }
@@ -142,6 +140,7 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
res->ErrorMessage = STR_NONE; res->ErrorMessage = STR_NONE;
return res; return res;
} }
do do
{ {
if (tileElement->GetType() != TILE_ELEMENT_TYPE_SURFACE) if (tileElement->GetType() != TILE_ELEMENT_TYPE_SURFACE)
@@ -157,37 +156,24 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
continue; continue;
} }
if (tileElement != nullptr) map_obstruction_set_error_text(tileElement, *res);
{ res->Error = GameActions::Status::NoClearance;
map_obstruction_set_error_text(tileElement, *res);
res->Error = GameActions::Status::NoClearance;
}
return res; return res;
} }
} }
continue; continue;
} }
water_height = tileElement->AsSurface()->GetWaterHeight();
if (water_height && water_height > pos.baseZ && tileElement->GetBaseZ() < pos.clearanceZ) const auto waterHeight = tileElement->AsSurface()->GetWaterHeight();
if (waterHeight && waterHeight > pos.baseZ && tileElement->GetBaseZ() < pos.clearanceZ)
{ {
res->GroundFlags |= ELEMENT_IS_UNDERWATER; groundFlags |= ELEMENT_IS_UNDERWATER;
if (water_height < pos.clearanceZ) if (waterHeight < pos.clearanceZ)
{ {
bool returnError = true; if (clearFunc != nullptr && clearFunc(&tileElement, pos, flags, &res->Cost))
if (clearFunc != nullptr)
{ {
if (!clearFunc(&tileElement, pos, flags, &res->Cost)) res->Error = GameActions::Status::NoClearance;
{ res->ErrorMessage = STR_CANNOT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_WATER;
returnError = false;
}
}
if (returnError)
{
if (tileElement != nullptr)
{
res->Error = GameActions::Status::NoClearance;
res->ErrorMessage = STR_CANNOT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_WATER;
}
return res; return res;
} }
} }
@@ -195,7 +181,7 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
if (gParkFlags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION && !isTree) if (gParkFlags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION && !isTree)
{ {
auto heightFromGround = pos.clearanceZ - tileElement->GetBaseZ(); const auto heightFromGround = pos.clearanceZ - tileElement->GetBaseZ();
if (heightFromGround > (18 * COORDS_Z_STEP)) if (heightFromGround > (18 * COORDS_Z_STEP))
{ {
@@ -217,16 +203,16 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
if (tileElement->GetBaseZ() >= pos.clearanceZ) if (tileElement->GetBaseZ() >= pos.clearanceZ)
{ {
// loc_68BA81 // loc_68BA81
res->GroundFlags |= ELEMENT_IS_UNDERGROUND; groundFlags |= ELEMENT_IS_UNDERGROUND;
res->GroundFlags &= ~ELEMENT_IS_ABOVE_GROUND; groundFlags &= ~ELEMENT_IS_ABOVE_GROUND;
} }
else else
{ {
northZ = tileElement->GetBaseZ(); auto northZ = tileElement->GetBaseZ();
eastZ = northZ; auto eastZ = northZ;
southZ = northZ; auto southZ = northZ;
westZ = northZ; auto westZ = northZ;
slope = tileElement->AsSurface()->GetSlope(); const auto slope = tileElement->AsSurface()->GetSlope();
if (slope & TILE_ELEMENT_SLOPE_N_CORNER_UP) if (slope & TILE_ELEMENT_SLOPE_N_CORNER_UP)
{ {
northZ += LAND_HEIGHT_STEP; northZ += LAND_HEIGHT_STEP;
@@ -251,17 +237,15 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
if (slope == (TILE_ELEMENT_SLOPE_E_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT)) if (slope == (TILE_ELEMENT_SLOPE_E_CORNER_DN | TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT))
westZ += LAND_HEIGHT_STEP; westZ += LAND_HEIGHT_STEP;
} }
baseHeight = pos.baseZ + (4 * COORDS_Z_STEP); const auto baseHeight = pos.baseZ + (4 * COORDS_Z_STEP);
const auto baseQuarter = quarterTile.GetBaseQuarterOccupied();
const auto zQuarter = quarterTile.GetZQuarterOccupied();
if ((!(baseQuarter & 0b0001) || ((zQuarter & 0b0001 || pos.baseZ >= northZ) && baseHeight >= northZ))
&& (!(baseQuarter & 0b0010) || ((zQuarter & 0b0010 || pos.baseZ >= eastZ) && baseHeight >= eastZ))
&& (!(baseQuarter & 0b0100) || ((zQuarter & 0b0100 || pos.baseZ >= southZ) && baseHeight >= southZ))
&& (!(baseQuarter & 0b1000) || ((zQuarter & 0b1000 || pos.baseZ >= westZ) && baseHeight >= westZ)))
{ {
auto baseQuarter = quarterTile.GetBaseQuarterOccupied(); continue;
auto zQuarter = quarterTile.GetZQuarterOccupied();
if ((!(baseQuarter & 0b0001) || ((zQuarter & 0b0001 || pos.baseZ >= northZ) && baseHeight >= northZ))
&& (!(baseQuarter & 0b0010) || ((zQuarter & 0b0010 || pos.baseZ >= eastZ) && baseHeight >= eastZ))
&& (!(baseQuarter & 0b0100) || ((zQuarter & 0b0100 || pos.baseZ >= southZ) && baseHeight >= southZ))
&& (!(baseQuarter & 0b1000) || ((zQuarter & 0b1000 || pos.baseZ >= westZ) && baseHeight >= westZ)))
{
continue;
}
} }
if (MapLoc68BABCShouldContinue(tileElement, pos, clearFunc, flags, res->Cost, crossingMode, canBuildCrossing)) if (MapLoc68BABCShouldContinue(tileElement, pos, clearFunc, flags, res->Cost, crossingMode, canBuildCrossing))
@@ -269,19 +253,19 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
continue; continue;
} }
if (tileElement != nullptr) map_obstruction_set_error_text(tileElement, *res);
{ res->Error = GameActions::Status::NoClearance;
map_obstruction_set_error_text(tileElement, *res);
res->Error = GameActions::Status::NoClearance;
}
return res; return res;
} }
} }
} while (!(tileElement++)->IsLastForTile()); } while (!(tileElement++)->IsLastForTile());
res->SetData(ConstructClearResult{ groundFlags });
return res; return res;
} }
std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructAt(const CoordsXYRangedZ& pos, QuarterTile bl) GameActions::Result::Ptr MapCanConstructAt(const CoordsXYRangedZ& pos, QuarterTile bl)
{ {
return MapCanConstructWithClearAt(pos, nullptr, bl, 0); return MapCanConstructWithClearAt(pos, nullptr, bl, 0);
} }

View File

@@ -25,10 +25,15 @@ using CLEAR_FUNC = int32_t (*)(TileElement** tile_element, const CoordsXY& coord
int32_t map_place_non_scenery_clear_func(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price); int32_t map_place_non_scenery_clear_func(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price);
int32_t map_place_scenery_clear_func(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price); int32_t map_place_scenery_clear_func(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price);
[[nodiscard]] std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt( struct ConstructClearResult
{
uint8_t GroundFlags{ 0 };
};
[[nodiscard]] GameActions::Result::Ptr MapCanConstructWithClearAt(
const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, QuarterTile quarterTile, uint8_t flags, const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, QuarterTile quarterTile, uint8_t flags,
uint8_t crossingMode = CREATE_CROSSING_MODE_NONE, bool isTree = false); uint8_t crossingMode = CREATE_CROSSING_MODE_NONE, bool isTree = false);
[[nodiscard]] std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructAt(const CoordsXYRangedZ& pos, QuarterTile bl); [[nodiscard]] GameActions::Result::Ptr MapCanConstructAt(const CoordsXYRangedZ& pos, QuarterTile bl);
void map_obstruction_set_error_text(TileElement* tileElement, GameActions::Result& res); void map_obstruction_set_error_text(TileElement* tileElement, GameActions::Result& res);