Update to new Arbutils
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -45,12 +45,12 @@ namespace CreatureLib::Battling {
|
||||
ArbUt::BorrowedPtr<BattleSide> _side = nullptr;
|
||||
bool _onBattleField = false;
|
||||
|
||||
std::string _nickname = "";
|
||||
std::string_view _nickname = "";
|
||||
CreatureLib::Library::TalentIndex _talentIndex;
|
||||
std::unique_ptr<Script> _activeTalent = nullptr;
|
||||
|
||||
bool _hasOverridenTalent;
|
||||
ArbUt::CaseInsensitiveConstString _overridenTalentName = ""_cnc;
|
||||
ArbUt::StringView _overridenTalentName = ""_cnc;
|
||||
std::unordered_set<ArbUt::BorrowedPtr<Creature>> _seenOpponents;
|
||||
|
||||
ArbUt::UniquePtrList<LearnedAttack> _attacks;
|
||||
@@ -69,7 +69,7 @@ namespace CreatureLib::Battling {
|
||||
const ArbUt::BorrowedPtr<const Library::CreatureSpecies>& species,
|
||||
const ArbUt::BorrowedPtr<const Library::SpeciesVariant>& variant, uint8_t level, uint32_t experience,
|
||||
uint32_t uid, Library::Gender gender, uint8_t coloring,
|
||||
const ArbUt::BorrowedPtr<const Library::Item> heldItem, std::string nickname,
|
||||
const ArbUt::BorrowedPtr<const Library::Item> heldItem, const std::string_view& nickname,
|
||||
const Library::TalentIndex& talent, const std::vector<LearnedAttack*>& attacks,
|
||||
bool allowedExperienceGain = true);
|
||||
|
||||
@@ -89,14 +89,14 @@ namespace CreatureLib::Battling {
|
||||
inline uint32_t GetExperience() const noexcept { return _experience; }
|
||||
inline Library::Gender GetGender() const noexcept { return _gender; }
|
||||
inline uint8_t GetColoring() const noexcept { return _coloring; }
|
||||
inline bool HasHeldItem(const ArbUt::CaseInsensitiveConstString& name) const noexcept {
|
||||
inline bool HasHeldItem(const ArbUt::BasicStringView& name) const noexcept {
|
||||
return _heldItem != nullptr && _heldItem->GetName() == name;
|
||||
}
|
||||
inline bool HasHeldItem(uint32_t nameHash) const noexcept {
|
||||
return _heldItem != nullptr && _heldItem->GetName() == nameHash;
|
||||
}
|
||||
inline const ArbUt::BorrowedPtr<const Library::Item>& GetHeldItem() const noexcept { return _heldItem; }
|
||||
void SetHeldItem(const ArbUt::CaseInsensitiveConstString& itemName);
|
||||
void SetHeldItem(const ArbUt::BasicStringView& itemName);
|
||||
void SetHeldItem(uint32_t itemNameHash);
|
||||
inline void SetHeldItem(const ArbUt::BorrowedPtr<const Library::Item>& item) noexcept { _heldItem = item; };
|
||||
|
||||
@@ -108,8 +108,8 @@ namespace CreatureLib::Battling {
|
||||
inline void SetOnBattleField(bool value) { _onBattleField = value; }
|
||||
inline bool IsOnBattleField() const { return _onBattleField; }
|
||||
|
||||
inline const std::string& GetNickname() const noexcept { return _nickname; }
|
||||
const ArbUt::CaseInsensitiveConstString& GetActiveTalent() const;
|
||||
inline const std::string_view& GetNickname() const noexcept { return _nickname; }
|
||||
const ArbUt::StringView& GetActiveTalent() const;
|
||||
|
||||
[[nodiscard]] bool IsFainted() const noexcept;
|
||||
[[nodiscard]] const std::unordered_set<uint8_t>& GetTypes() const noexcept;
|
||||
@@ -119,7 +119,7 @@ namespace CreatureLib::Battling {
|
||||
void ChangeLevelBy(int8_t amount);
|
||||
void Damage(uint32_t damage, DamageSource source);
|
||||
void Heal(uint32_t amount, bool canRevive = false);
|
||||
void OverrideActiveTalent(const ArbUt::CaseInsensitiveConstString& talent);
|
||||
void OverrideActiveTalent(const ArbUt::StringView& talent);
|
||||
void AddExperience(uint32_t amount);
|
||||
|
||||
void MarkOpponentAsSeen(ArbUt::BorrowedPtr<Creature> creature) { _seenOpponents.insert(creature); }
|
||||
@@ -128,11 +128,11 @@ namespace CreatureLib::Battling {
|
||||
size_t ScriptCount() const override;
|
||||
void GetActiveScripts(ArbUt::List<ScriptWrapper>& scripts) override;
|
||||
void ClearVolatileScripts();
|
||||
void AddVolatileScript(const ArbUt::CaseInsensitiveConstString& name);
|
||||
void AddVolatileScript(const ArbUt::BasicStringView& name);
|
||||
void AddVolatileScript(Script* script);
|
||||
void RemoveVolatileScript(const ArbUt::CaseInsensitiveConstString& name);
|
||||
void RemoveVolatileScript(const ArbUt::BasicStringView& name);
|
||||
void RemoveVolatileScript(Script* script);
|
||||
bool HasVolatileScript(const ArbUt::CaseInsensitiveConstString& name) const;
|
||||
bool HasVolatileScript(const ArbUt::BasicStringView& name) const;
|
||||
|
||||
const ArbUt::UniquePtrList<LearnedAttack>& GetAttacks() noexcept { return _attacks; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user