Adds setter for nickname.
continuous-integration/drone/push Build is passing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2020-12-22 16:11:23 +01:00
parent 65cf7c52d9
commit 69476b6f9d
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,7 @@ OPTIONAL_GET_FUNC(Creature, GetBattle, Battle*);
OPTIONAL_GET_FUNC(Creature, GetBattleSide, BattleSide*);
SIMPLE_GET_FUNC(Creature, IsOnBattleField, bool);
export const char* CreatureLib_Creature_GetNickname(Creature* p) { return p->GetNickname().data(); }
export void CreatureLib_Creature_SetNickname(Creature* p, const char* nickname) { p->SetNickname(nickname); }
export bool CreatureLib_Creature_HasType(Creature* p, uint8_t type) { return p->HasType(type); }
export size_t CreatureLib_Creature_GetTypeCount(Creature* p) { return p->GetTypes().size(); }
export const uint8_t* CreatureLib_Creature_GetTypes(Creature* p) { return p->GetTypes().data(); }

View File

@ -111,6 +111,7 @@ namespace CreatureLib::Battling {
inline bool IsOnBattleField() const { return _onBattleField; }
inline std::string_view GetNickname() const noexcept { return _nickname; }
inline void SetNickname(std::string nickname) noexcept { _nickname = nickname; }
const CreatureLib::Library::TalentIndex& GetRealTalent() const noexcept { return _talentIndex; }
const ArbUt::StringView& GetActiveTalent() const;