mirror of https://github.com/OpenRCT2/OpenRCT2.git
Update error messages.
This commit is contained in:
parent
f8e98b4e3e
commit
84d28f2967
|
@ -106,7 +106,9 @@ private:
|
|||
if (_staffType >= STAFF_TYPE_COUNT)
|
||||
{
|
||||
// Invalid staff type.
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
log_error("Tried to use invalid staff type: %u", (uint32_t)_staffType);
|
||||
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_NONE);
|
||||
}
|
||||
|
||||
if (gSpriteListCount[SPRITE_LIST_NULL] < 400)
|
||||
|
@ -119,14 +121,18 @@ private:
|
|||
if (_entertainerType >= ENTERTAINER_COSTUME_COUNT)
|
||||
{
|
||||
// Invalid entertainer costume
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
log_error("Tried to use invalid entertainer type: %u", (uint32_t)_entertainerType);
|
||||
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_NONE);
|
||||
}
|
||||
|
||||
uint32_t availableCostumes = staff_get_available_entertainer_costumes();
|
||||
if (!(availableCostumes & (1 << _entertainerType)))
|
||||
{
|
||||
// Entertainer costume unavailable
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_SELECTION_OF_OBJECTS);
|
||||
log_error("Tried to use unavailable entertainer type: %u", (uint32_t)_entertainerType);
|
||||
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +153,7 @@ private:
|
|||
Peep* newPeep = &(create_sprite(GetFlags())->peep);
|
||||
if (newPeep == nullptr)
|
||||
{
|
||||
// Too many staff members exist already.
|
||||
// Too many peeps exist already.
|
||||
return MakeResult(GA_ERROR::NO_FREE_ELEMENTS, STR_TOO_MANY_PEOPLE_IN_GAME);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue