1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Refactor explicit constructor usage in WallSetColourAction

This commit is contained in:
ζeh Matt
2021-10-21 20:39:34 +03:00
parent 2c38d3b180
commit 8e80a74daa

View File

@@ -66,7 +66,7 @@ GameActions::Result::Ptr WallSetColourAction::Query() const
{
log_error(
"Could not find wall element at: x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, _loc.direction);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
}
if ((GetFlags() & GAME_COMMAND_FLAG_GHOST) && !(wallElement->IsGhost()))
@@ -78,19 +78,19 @@ GameActions::Result::Ptr WallSetColourAction::Query() const
if (wallEntry == nullptr)
{
log_error("Could not find wall object");
return MakeResult(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS);
return MakeResult(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE);
}
if (_primaryColour > 31)
{
log_error("Primary colour invalid: colour = %d", _primaryColour);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
}
if (_secondaryColour > 31)
{
log_error("Secondary colour invalid: colour = %d", _secondaryColour);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
}
if (wallEntry->flags & WALL_SCENERY_HAS_TERNARY_COLOUR)
@@ -98,7 +98,7 @@ GameActions::Result::Ptr WallSetColourAction::Query() const
if (_tertiaryColour > 31)
{
log_error("Tertiary colour invalid: colour = %d", _tertiaryColour);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
}
}
return res;
@@ -118,7 +118,7 @@ GameActions::Result::Ptr WallSetColourAction::Execute() const
{
log_error(
"Could not find wall element at: x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, _loc.direction);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS);
return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
}
if ((GetFlags() & GAME_COMMAND_FLAG_GHOST) && !(wallElement->IsGhost()))
@@ -130,7 +130,7 @@ GameActions::Result::Ptr WallSetColourAction::Execute() const
if (wallEntry == nullptr)
{
log_error("Could not find wall object");
return MakeResult(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS);
return MakeResult(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE);
}
wallElement->SetPrimaryColour(_primaryColour);