summaryrefslogtreecommitdiffstats
path: root/src/game/shared/world/item.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
committeruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
commit6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch)
treef085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/shared/world/item.hh
parentf40d09cb8f712e87691af4912f3630d92d692779 (diff)
downloadvoxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2
voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/shared/world/item.hh')
-rw-r--r--src/game/shared/world/item.hh19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/game/shared/world/item.hh b/src/game/shared/world/item.hh
index ffa7f5c..bcec37a 100644
--- a/src/game/shared/world/item.hh
+++ b/src/game/shared/world/item.hh
@@ -9,13 +9,8 @@
// anywhere else in the shared and server code
struct TextureGUI;
-namespace world
-{
class Voxel;
-} // namespace world
-namespace world
-{
class Item {
public:
Item(void) = default;
@@ -41,10 +36,7 @@ protected:
mutable resource_ptr<TextureGUI> m_cached_texture; // Client-side only
};
-} // namespace world
-namespace world
-{
class ItemBuilder final : public Item {
public:
explicit ItemBuilder(std::string_view name);
@@ -56,29 +48,28 @@ public:
std::unique_ptr<Item> build(item_id id) const;
};
-} // namespace world
-constexpr std::string_view world::Item::get_name(void) const noexcept
+constexpr std::string_view Item::get_name(void) const noexcept
{
return m_name;
}
-constexpr item_id world::Item::get_id(void) const noexcept
+constexpr item_id Item::get_id(void) const noexcept
{
return m_id;
}
-constexpr std::string_view world::Item::get_texture(void) const noexcept
+constexpr std::string_view Item::get_texture(void) const noexcept
{
return m_texture;
}
-constexpr const world::Voxel* world::Item::get_place_voxel(void) const noexcept
+constexpr const Voxel* Item::get_place_voxel(void) const noexcept
{
return m_place_voxel;
}
-constexpr resource_ptr<TextureGUI>& world::Item::get_cached_texture(void) const noexcept
+constexpr resource_ptr<TextureGUI>& Item::get_cached_texture(void) const noexcept
{
return m_cached_texture;
}