mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix errors and apply requests
This commit is contained in:
committed by
Gymnasiast
parent
02c135e4fa
commit
ba49850195
@@ -121,7 +121,7 @@ public:
|
||||
log_error("No free map elements.");
|
||||
return MakeResult(GA_ERROR::NO_FREE_ELEMENTS, STR_CANT_POSITION_THIS_HERE);
|
||||
}
|
||||
|
||||
|
||||
if (_bannerIndex == BANNER_INDEX_NULL || _bannerIndex >= MAX_BANNERS)
|
||||
{
|
||||
log_error("Invalid banner index, bannerIndex = %u", _bannerIndex);
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
res->Position = { _loc.ToTileCentre(), z };
|
||||
res->Expenditure = ExpenditureType::RideConstruction;
|
||||
|
||||
TileElement* tileElement = tile_element_insert((CoordsXYZ{ _loc, z }), 0b1111);
|
||||
TileElement* tileElement = tile_element_insert(CoordsXYZ{ _loc, z }, 0b1111);
|
||||
assert(tileElement != nullptr);
|
||||
tileElement->SetType(TILE_ELEMENT_TYPE_ENTRANCE);
|
||||
tileElement->SetDirection(_direction);
|
||||
|
||||
@@ -428,8 +428,7 @@ public:
|
||||
res->Expenditure = ExpenditureType::Landscaping;
|
||||
res->Cost = (sceneryEntry->small_scenery.price * 10) + clearCost;
|
||||
|
||||
TileElement* newElement = tile_element_insert(
|
||||
CoordsXYZ{ _loc, zLow }, quarterTile.GetBaseQuarterOccupied());
|
||||
TileElement* newElement = tile_element_insert(CoordsXYZ{ _loc, zLow }, quarterTile.GetBaseQuarterOccupied());
|
||||
assert(newElement != nullptr);
|
||||
res->tileElement = newElement;
|
||||
newElement->SetType(TILE_ELEMENT_TYPE_SMALL_SCENERY);
|
||||
|
||||
@@ -348,7 +348,7 @@ public:
|
||||
}
|
||||
if ((entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN) && trackBlock->index == 0)
|
||||
{
|
||||
if (!track_add_station_element({ mapLoc, baseZ / COORDS_Z_STEP, _origin.direction }, _rideIndex, 0))
|
||||
if (!track_add_station_element({ mapLoc, baseZ, _origin.direction }, _rideIndex, 0))
|
||||
{
|
||||
return std::make_unique<TrackPlaceActionResult>(GA_ERROR::UNKNOWN, gGameCommandErrorText);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,6 @@ public:
|
||||
{
|
||||
return MakeResult(GA_ERROR::NO_FREE_ELEMENTS, STR_TILE_ELEMENT_LIMIT_REACHED);
|
||||
}
|
||||
|
||||
TileElement* tileElement = tile_element_insert(targetLoc, 0b0000);
|
||||
assert(tileElement != nullptr);
|
||||
|
||||
|
||||
@@ -619,7 +619,7 @@ static TileElement* find_station_element(const CoordsXYZD& loc, ride_id_t rideIn
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void ride_remove_station(Ride* ride, CoordsXYZ location)
|
||||
static void ride_remove_station(Ride* ride, const CoordsXYZ& location)
|
||||
{
|
||||
for (int32_t i = 0; i < MAX_STATIONS; i++)
|
||||
{
|
||||
|
||||
@@ -237,7 +237,7 @@ static void mapgen_place_tree(int32_t type, int32_t x, int32_t y)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
auto loc = CoordsXY(x, y);
|
||||
|
||||
int32_t surfaceZ = tile_element_height(loc.ToTileCentre());
|
||||
|
||||
@@ -299,7 +299,7 @@ GameActionResult::Ptr tile_inspector_paste_element_at(const CoordsXY& loc, TileE
|
||||
{
|
||||
return std::make_unique<GameActionResult>(GA_ERROR::NO_FREE_ELEMENTS, STR_NONE);
|
||||
}
|
||||
|
||||
|
||||
auto tileLoc = TileCoordsXY(loc);
|
||||
|
||||
if (isExecuting)
|
||||
|
||||
Reference in New Issue
Block a user