Feature: adding matériel to Billy.
No conformity is done when adding things (dagger or bow for example)
This commit is contained in:
parent
6ad47b12bf
commit
75f8db9f5a
6 changed files with 124 additions and 37 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue