Adds setter for nickname.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
65cf7c52d9
commit
69476b6f9d
|
@ -56,6 +56,7 @@ OPTIONAL_GET_FUNC(Creature, GetBattle, Battle*);
|
||||||
OPTIONAL_GET_FUNC(Creature, GetBattleSide, BattleSide*);
|
OPTIONAL_GET_FUNC(Creature, GetBattleSide, BattleSide*);
|
||||||
SIMPLE_GET_FUNC(Creature, IsOnBattleField, bool);
|
SIMPLE_GET_FUNC(Creature, IsOnBattleField, bool);
|
||||||
export const char* CreatureLib_Creature_GetNickname(Creature* p) { return p->GetNickname().data(); }
|
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 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 size_t CreatureLib_Creature_GetTypeCount(Creature* p) { return p->GetTypes().size(); }
|
||||||
export const uint8_t* CreatureLib_Creature_GetTypes(Creature* p) { return p->GetTypes().data(); }
|
export const uint8_t* CreatureLib_Creature_GetTypes(Creature* p) { return p->GetTypes().data(); }
|
||||||
|
|
|
@ -111,6 +111,7 @@ namespace CreatureLib::Battling {
|
||||||
inline bool IsOnBattleField() const { return _onBattleField; }
|
inline bool IsOnBattleField() const { return _onBattleField; }
|
||||||
|
|
||||||
inline std::string_view GetNickname() const noexcept { return _nickname; }
|
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 CreatureLib::Library::TalentIndex& GetRealTalent() const noexcept { return _talentIndex; }
|
||||||
const ArbUt::StringView& GetActiveTalent() const;
|
const ArbUt::StringView& GetActiveTalent() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue