diff --git a/include/billy_objects.hpp b/include/billy_objects.hpp index 2bf1584..db4289a 100644 --- a/include/billy_objects.hpp +++ b/include/billy_objects.hpp @@ -45,6 +45,8 @@ namespace character { static constexpr std::string_view json_key{ "billy_objects" }; + static constexpr std::uint32_t max_obj{ 3 }; + static std::string_view billy_object_to_string(const billyObjects &object) noexcept; static void to_json(json &j, const container &billy); diff --git a/src/billy_objects.cpp b/src/billy_objects.cpp index 9bee152..7592c17 100644 --- a/src/billy_objects.cpp +++ b/src/billy_objects.cpp @@ -17,7 +17,7 @@ namespace character { bool BillyObjects::insert_object(CharacterSheet &sheet, const billyEnums objType) noexcept { - if (sheet.objects.size() < 3) { + if (sheet.objects.size() < max_obj) { sheet.objects.emplace(objType, std::visit(overloaded{ [](const weapons &arg) {