feat: Loot rework (#1909)

* feat: Loot rework

* Allow dupe powerup pickups

* change default team loot to shared
This commit is contained in:
David Markowitz
2025-10-14 22:53:39 -07:00
committed by GitHub
parent fd6029ae10
commit 74630b56c8
22 changed files with 685 additions and 324 deletions

View File

@@ -176,6 +176,10 @@ public:
void AddComponent(eReplicaComponentType componentId, Component* component);
bool MsgRequestServerObjectInfo(GameMessages::GameMsg& msg);
bool MsgDropClientLoot(GameMessages::GameMsg& msg);
bool MsgGetFlag(GameMessages::GameMsg& msg);
bool MsgGetFactionTokenType(GameMessages::GameMsg& msg);
bool MsgPickupItem(GameMessages::GameMsg& msg);
// This is expceted to never return nullptr, an assert checks this.
CppScripts::Script* const GetScript() const;
@@ -342,6 +346,12 @@ public:
RegisterMsg(msgId, std::bind(handler, self, std::placeholders::_1));
}
template<typename T>
inline void RegisterMsg(auto* self, const auto handler) {
T msg;
RegisterMsg(msg.msgId, self, handler);
}
/**
* @brief The observable for player entity position updates.
*/
@@ -600,5 +610,5 @@ auto Entity::GetComponents() const {
template<typename... T>
auto Entity::GetComponentsMut() const {
return std::tuple{GetComponent<T>()...};
return std::tuple{ GetComponent<T>()... };
}