Feature: adding matériel to Billy.

No conformity is done when adding things (dagger or bow for example)
This commit is contained in:
Pcornat 2024-09-02 12:46:04 +02:00
commit 75f8db9f5a
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD
6 changed files with 124 additions and 37 deletions

View file

@ -49,6 +49,21 @@ namespace character {
using billyObject = std::variant<weapons, equipments, tools>;
using container = ankerl::svector<billyObject, max_num_obj>;
static constexpr std::array<BillyObjects::billyObject, 12> all_objects{
weapons::Sword,
weapons::Lance,
weapons::Morgenstern,
weapons::Bow,
equipments::Chainmail,
equipments::CookingPot,
equipments::PamphletTourist,
equipments::MedicKit,
tools::Fourche,
tools::Dagger,
tools::RockClimbingKit,
tools::SackOfGrain,
};
static constexpr std::string_view json_key{ "billy_objects" };
static constexpr std::string_view sword{ "Sword" };
@ -76,7 +91,7 @@ namespace character {
~BillyObjects() noexcept = default;
void push_object(const billyObject &object, CharacterSheet &sheet) noexcept;
[[nodiscard]] bool push_object(const billyObject &object, CharacterSheet &sheet) noexcept;
void pop_object(CharacterSheet &sheet) noexcept;