osb/source/game/StarArmorWearer.hpp

95 lines
2.8 KiB
C++
Raw Permalink Normal View History

#pragma once
2023-06-20 04:33:09 +00:00
#include "StarHumanoid.hpp"
#include "StarNetElementSystem.hpp"
#include "StarEffectEmitter.hpp"
#include "StarItemDescriptor.hpp"
#include "StarStatusTypes.hpp"
#include "StarLightSource.hpp"
#include "StarDamage.hpp"
namespace Star {
STAR_CLASS(ObjectItem);
STAR_CLASS(HeadArmor);
STAR_CLASS(ChestArmor);
STAR_CLASS(LegsArmor);
STAR_CLASS(BackArmor);
STAR_CLASS(ToolUserEntity);
STAR_CLASS(Item);
STAR_CLASS(World);
STAR_CLASS(ArmorWearer);
class ArmorWearer : public NetElementSyncGroup {
public:
ArmorWearer();
2023-06-24 13:38:27 +00:00
void setupHumanoidClothingDrawables(Humanoid& humanoid, bool forceNude);
2023-06-20 04:33:09 +00:00
void effects(EffectEmitter& effectEmitter);
List<PersistentStatusEffect> statusEffects() const;
2023-10-25 04:30:31 +00:00
void reset();
2023-06-20 04:33:09 +00:00
Json diskStore() const;
void diskLoad(Json const& diskStore);
void setHeadItem(HeadArmorPtr headItem);
void setHeadCosmeticItem(HeadArmorPtr headCosmeticItem);
void setChestItem(ChestArmorPtr chestItem);
2023-06-25 08:12:54 +00:00
void setChestCosmeticItem(ChestArmorPtr chestCosmeticItem);
2023-06-20 04:33:09 +00:00
void setLegsItem(LegsArmorPtr legsItem);
void setLegsCosmeticItem(LegsArmorPtr legsCosmeticItem);
void setBackItem(BackArmorPtr backItem);
void setBackCosmeticItem(BackArmorPtr backCosmeticItem);
HeadArmorPtr headItem() const;
HeadArmorPtr headCosmeticItem() const;
ChestArmorPtr chestItem() const;
ChestArmorPtr chestCosmeticItem() const;
LegsArmorPtr legsItem() const;
LegsArmorPtr legsCosmeticItem() const;
BackArmorPtr backItem() const;
BackArmorPtr backCosmeticItem() const;
ItemDescriptor headItemDescriptor() const;
ItemDescriptor headCosmeticItemDescriptor() const;
ItemDescriptor chestItemDescriptor() const;
ItemDescriptor chestCosmeticItemDescriptor() const;
ItemDescriptor legsItemDescriptor() const;
ItemDescriptor legsCosmeticItemDescriptor() const;
ItemDescriptor backItemDescriptor() const;
ItemDescriptor backCosmeticItemDescriptor() const;
private:
void netElementsNeedLoad(bool full) override;
void netElementsNeedStore() override;
HeadArmorPtr m_headItem;
ChestArmorPtr m_chestItem;
LegsArmorPtr m_legsItem;
BackArmorPtr m_backItem;
HeadArmorPtr m_headCosmeticItem;
ChestArmorPtr m_chestCosmeticItem;
LegsArmorPtr m_legsCosmeticItem;
BackArmorPtr m_backCosmeticItem;
NetElementData<ItemDescriptor> m_headItemDataNetState;
NetElementData<ItemDescriptor> m_chestItemDataNetState;
NetElementData<ItemDescriptor> m_legsItemDataNetState;
NetElementData<ItemDescriptor> m_backItemDataNetState;
NetElementData<ItemDescriptor> m_headCosmeticItemDataNetState;
NetElementData<ItemDescriptor> m_chestCosmeticItemDataNetState;
NetElementData<ItemDescriptor> m_legsCosmeticItemDataNetState;
NetElementData<ItemDescriptor> m_backCosmeticItemDataNetState;
2023-06-24 13:38:27 +00:00
bool m_lastNude;
2023-06-25 08:12:54 +00:00
bool m_headNeedsSync;
bool m_chestNeedsSync;
bool m_legsNeedsSync;
bool m_backNeedsSync;
2023-06-20 04:33:09 +00:00
};
}