summaryrefslogtreecommitdiffstats
path: root/game/shared/world/item_registry.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-11 15:48:53 +0500
committeruntodesu <kirill@untode.su>2025-09-11 15:48:53 +0500
commitd0fbd68055e3f4a796330cc8acc6c0954b5327ff (patch)
treee581014ea02711efa5e71f00f9862e5bca58f2ed /game/shared/world/item_registry.hh
parentcbd823aa2154a956e7da4319eecbf7afc10441ae (diff)
downloadvoxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.tar.bz2
voxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.zip
Run clang-format across the project
Diffstat (limited to 'game/shared/world/item_registry.hh')
-rw-r--r--game/shared/world/item_registry.hh128
1 files changed, 64 insertions, 64 deletions
diff --git a/game/shared/world/item_registry.hh b/game/shared/world/item_registry.hh
index 74bd60a..c3e6cf9 100644
--- a/game/shared/world/item_registry.hh
+++ b/game/shared/world/item_registry.hh
@@ -1,64 +1,64 @@
-#pragma once
-
-#include "core/resource/resource.hh"
-
-#include "shared/types.hh"
-
-// This resource is only defined client-side and
-// resource_ptr<TextureGUI> should remain set to null
-// anywhere else in the shared and server code
-struct TextureGUI;
-
-namespace world
-{
-struct ItemInfo final {
- std::string name;
- std::string texture;
- voxel_id place_voxel;
-
- resource_ptr<TextureGUI> cached_texture; // Client-side only
-};
-} // namespace world
-
-namespace world
-{
-class ItemInfoBuilder final {
-public:
- explicit ItemInfoBuilder(std::string_view name);
- virtual ~ItemInfoBuilder(void) = default;
-
-public:
- ItemInfoBuilder& set_texture(std::string_view texture);
- ItemInfoBuilder& set_place_voxel(voxel_id place_voxel);
-
-public:
- item_id build(void) const;
-
-private:
- ItemInfo prototype;
-};
-} // namespace world
-
-namespace world::item_registry
-{
-extern std::unordered_map<std::string, ItemInfoBuilder> builders;
-extern std::unordered_map<std::string, item_id> names;
-extern std::vector<std::shared_ptr<ItemInfo>> items;
-} // namespace world::item_registry
-
-namespace world::item_registry
-{
-ItemInfoBuilder& construct(std::string_view name);
-ItemInfo* find(std::string_view name);
-ItemInfo* find(const item_id item);
-} // namespace world::item_registry
-
-namespace world::item_registry
-{
-void purge(void);
-} // namespace world::item_registry
-
-namespace world::item_registry
-{
-std::uint64_t calculate_checksum(void);
-} // namespace world::item_registry
+#pragma once
+
+#include "core/resource/resource.hh"
+
+#include "shared/types.hh"
+
+// This resource is only defined client-side and
+// resource_ptr<TextureGUI> should remain set to null
+// anywhere else in the shared and server code
+struct TextureGUI;
+
+namespace world
+{
+struct ItemInfo final {
+ std::string name;
+ std::string texture;
+ voxel_id place_voxel;
+
+ resource_ptr<TextureGUI> cached_texture; // Client-side only
+};
+} // namespace world
+
+namespace world
+{
+class ItemInfoBuilder final {
+public:
+ explicit ItemInfoBuilder(std::string_view name);
+ virtual ~ItemInfoBuilder(void) = default;
+
+public:
+ ItemInfoBuilder& set_texture(std::string_view texture);
+ ItemInfoBuilder& set_place_voxel(voxel_id place_voxel);
+
+public:
+ item_id build(void) const;
+
+private:
+ ItemInfo prototype;
+};
+} // namespace world
+
+namespace world::item_registry
+{
+extern std::unordered_map<std::string, ItemInfoBuilder> builders;
+extern std::unordered_map<std::string, item_id> names;
+extern std::vector<std::shared_ptr<ItemInfo>> items;
+} // namespace world::item_registry
+
+namespace world::item_registry
+{
+ItemInfoBuilder& construct(std::string_view name);
+ItemInfo* find(std::string_view name);
+ItemInfo* find(const item_id item);
+} // namespace world::item_registry
+
+namespace world::item_registry
+{
+void purge(void);
+} // namespace world::item_registry
+
+namespace world::item_registry
+{
+std::uint64_t calculate_checksum(void);
+} // namespace world::item_registry