Major refactoring for game objects

This commit is contained in:
Vladislav Khorev committed 2026-05-12 21:19:29 +03:00
1 parent efb85f7328
commit 2cae9998a0
18 files changed
+547 -716

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#pragma once
#include <string>
#include <unordered_map>
#include "Item.h"
namespace ZL {
class ItemRegistry {
public:
static ItemRegistry& instance();
void loadFromJson(const std::string& jsonPath, const std::string& zipPath = "");
// Returns nullptr if not found.
const Item* findById(const std::string& id) const;
private:
ItemRegistry() = default;
std::unordered_map<std::string, Item> items_;
};
} // namespace ZL