X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FWorld.hpp;h=7d2c2926a1732ee4ea5f663cd112f3de6dd4335a;hb=da5073a7fdb1ca066e778a02db33d5d15073aea0;hp=3981b28e336f9dcf8e28ee84411486d1e23121d2;hpb=09b734344f31e18d0fa31c39acba6d012aa2cc56;p=blank.git diff --git a/src/world/World.hpp b/src/world/World.hpp index 3981b28..7d2c292 100644 --- a/src/world/World.hpp +++ b/src/world/World.hpp @@ -6,6 +6,7 @@ #include "Generator.hpp" #include +#include #include #include @@ -21,6 +22,7 @@ class World { public: struct Config { + std::string name = "default"; // initial player position glm::vec3 spawn = { 0.0f, 0.0f, 0.0f }; // direction facing towards(!) the light @@ -37,6 +39,8 @@ public: World(const BlockTypeRegistry &, const Config &, const WorldSave &); + const std::string &Name() const noexcept { return config.name; } + /// check if this ray hits a block /// depth in the collision is the distance between the ray's /// origin and the intersection point