diff options
author | Hop311 <hop3114@gmail.com> | 2023-07-22 01:18:00 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-07-22 01:18:00 +0200 |
commit | 83e61b518788d21283cda481decafee4ee2e252c (patch) | |
tree | 4adc383884ad57f404913d5eb4d83da56d354b05 /src/openvic/economy | |
parent | 420c2dce47e74c01ff46be991058d543e0c70a6b (diff) |
WIP structs for Pop, PopType, and Religion
Diffstat (limited to 'src/openvic/economy')
-rw-r--r-- | src/openvic/economy/Good.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/openvic/economy/Good.cpp b/src/openvic/economy/Good.cpp index 6d515d5..4524e5f 100644 --- a/src/openvic/economy/Good.cpp +++ b/src/openvic/economy/Good.cpp @@ -50,8 +50,12 @@ return_t GoodManager::add_good(std::string const& identifier, std::string const& Logger::error("Invalid good identifier - empty!"); return FAILURE; } + if (colour > MAX_COLOUR_RGB) { + Logger::error("Invalid good colour for ", identifier, ": ", Good::colour_to_hex_string(colour)); + return FAILURE; + } if (category.empty()) { - Logger::error("Invalid good category - empty!"); + Logger::error("Invalid good category for ", identifier, ": empty!"); return FAILURE; } if (base_price <= NULL_PRICE) { |