mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
@@ -158,12 +158,12 @@ private:
|
||||
auto res = executing ? GameActions::ExecuteNested(&footpathRemoveAction)
|
||||
: GameActions::QueryNested(&footpathRemoveAction);
|
||||
|
||||
if (res->Error != GA_ERROR::OK)
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (res->Error == GA_ERROR::OK)
|
||||
{
|
||||
totalCost += res->Cost;
|
||||
tileEdited = executing;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TILE_ELEMENT_TYPE_SMALL_SCENERY:
|
||||
if (_itemsToClear & CLEARABLE_ITEMS::SCENERY_SMALL)
|
||||
@@ -176,12 +176,12 @@ private:
|
||||
auto res = executing ? GameActions::ExecuteNested(&removeSceneryAction)
|
||||
: GameActions::QueryNested(&removeSceneryAction);
|
||||
|
||||
if (res->Error != GA_ERROR::OK)
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (res->Error == GA_ERROR::OK)
|
||||
{
|
||||
totalCost += res->Cost;
|
||||
tileEdited = executing;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TILE_ELEMENT_TYPE_WALL:
|
||||
if (_itemsToClear & CLEARABLE_ITEMS::SCENERY_SMALL)
|
||||
@@ -193,12 +193,12 @@ private:
|
||||
auto res = executing ? GameActions::ExecuteNested(&wallRemoveAction)
|
||||
: GameActions::QueryNested(&wallRemoveAction);
|
||||
|
||||
if (res->Error != GA_ERROR::OK)
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (res->Error == GA_ERROR::OK)
|
||||
{
|
||||
totalCost += res->Cost;
|
||||
tileEdited = executing;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TILE_ELEMENT_TYPE_LARGE_SCENERY:
|
||||
if (_itemsToClear & CLEARABLE_ITEMS::SCENERY_LARGE)
|
||||
@@ -211,12 +211,12 @@ private:
|
||||
auto res = executing ? GameActions::ExecuteNested(&removeSceneryAction)
|
||||
: GameActions::QueryNested(&removeSceneryAction);
|
||||
|
||||
if (res->Error != GA_ERROR::OK)
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (res->Error == GA_ERROR::OK)
|
||||
{
|
||||
totalCost += res->Cost;
|
||||
tileEdited = executing;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while (!tileEdited && !(tileElement++)->IsLastForTile());
|
||||
|
||||
@@ -62,6 +62,11 @@ public:
|
||||
}
|
||||
|
||||
TileElement* footpathElement = GetFootpathElement();
|
||||
if (footpathElement == nullptr)
|
||||
{
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_REMOVE_FOOTPATH_FROM_HERE);
|
||||
}
|
||||
|
||||
res->Cost = GetRefundPrice(footpathElement);
|
||||
|
||||
return res;
|
||||
@@ -90,6 +95,10 @@ public:
|
||||
tile_element_remove(footpathElement);
|
||||
footpath_update_queue_chains();
|
||||
}
|
||||
else
|
||||
{
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_REMOVE_FOOTPATH_FROM_HERE);
|
||||
}
|
||||
|
||||
res->Cost = GetRefundPrice(footpathElement);
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace GameActions
|
||||
}
|
||||
}
|
||||
|
||||
GameActionResult::Ptr result = Query(action);
|
||||
GameActionResult::Ptr result = QueryInternal(action, topLevel);
|
||||
if (result->Error == GA_ERROR::OK)
|
||||
{
|
||||
if (topLevel)
|
||||
|
||||
@@ -104,8 +104,7 @@ public:
|
||||
TileElement* tileElement = FindSceneryElement();
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
res->Cost = 0;
|
||||
return res;
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
}
|
||||
|
||||
return res;
|
||||
@@ -130,8 +129,7 @@ public:
|
||||
TileElement* tileElement = FindSceneryElement();
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
res->Cost = 0;
|
||||
return res;
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
}
|
||||
|
||||
res->Position.z = tile_element_height(res->Position.x, res->Position.y);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// This string specifies which version of network stream current build uses.
|
||||
// It is used for making sure only compatible builds get connected, even within
|
||||
// single OpenRCT2 version.
|
||||
#define NETWORK_STREAM_VERSION "37"
|
||||
#define NETWORK_STREAM_VERSION "38"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
static rct_peep* _pickup_peep = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user