Adds getter for Battle on BattleSide.
continuous-integration/drone/push Build is passing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2021-10-28 15:01:31 +02:00
parent 19375c2f87
commit b4ef1ea98e
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ export BattleSide* CreatureLib_BattleSide_Construct(uint8_t index, Battle* battl
export void CreatureLib_BattleSide_Destruct(BattleSide* p) { delete p; } export void CreatureLib_BattleSide_Destruct(BattleSide* p) { delete p; }
export Battle* CreatureLib_BattleSide_GetBattle(BattleSide* p) { return p->GetBattle(); }
export bool CreatureLib_BattleSide_AllChoicesSet(BattleSide* p) { return p->AllChoicesSet(); } export bool CreatureLib_BattleSide_AllChoicesSet(BattleSide* p) { return p->AllChoicesSet(); }
export uint8_t CreatureLib_BattleSide_AllPossibleSlotsFilled(bool& out, BattleSide* p) { export uint8_t CreatureLib_BattleSide_AllPossibleSlotsFilled(bool& out, BattleSide* p) {

View File

@ -30,6 +30,8 @@ namespace CreatureLib::Battling {
virtual ~BattleSide() = default; virtual ~BattleSide() = default;
[[nodiscard]] inline ArbUt::BorrowedPtr<Battle> GetBattle() const noexcept { return _battle; }
[[nodiscard]] bool AllChoicesSet() const noexcept; [[nodiscard]] bool AllChoicesSet() const noexcept;
[[nodiscard]] const ArbUt::List<std::shared_ptr<BaseTurnChoice>>& GetChoices() const noexcept { [[nodiscard]] const ArbUt::List<std::shared_ptr<BaseTurnChoice>>& GetChoices() const noexcept {
return _choices; return _choices;