From 84d28f2967a65e3093b9e87ef7b06ef7b217b303 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 11 Mar 2019 17:02:29 +0100 Subject: [PATCH] Update error messages. --- src/openrct2/actions/StaffHireNewAction.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index 370a253d1a..e74d7d2b2a 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -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); }