|
Lodestone.Level
|
#include <World.h>


Classes | |
| class | Dimension |
Public Member Functions | |
| World (const std::string &name="New World") | |
| World (std::unique_ptr< Level > overworldLevel, const std::string &name="New World") | |
| World (const std::string &name, map_t< common::registry::Identifier, std::unique_ptr< Level > > &&levels) | |
| const map_t< common::registry::Identifier, std::unique_ptr< Level > > & | getLevels () const |
| Level * | addLevel (const common::registry::Identifier &id, std::unique_ptr< Level > level) |
| Level * | getLevel (const common::registry::Identifier &id) const |
| void | removeLevel (const common::registry::Identifier &id) |
| bool | hasLevel (const common::registry::Identifier &id) const |
| std::string | toString () const override |
| std::string | getName () const |
| void | setName (const std::string &n) |
| virtual Level * | getDefaultLevel () const |
| const map_t< std::string, std::unique_ptr< entity::Player > > & | getPlayers () const |
| size_t | getPlayerCount () const |
| entity::Player * | addPlayer (std::unique_ptr< entity::Player > player, bool resetCoords=true) |
| entity::Player * | getPlayer (const std::string &id) const |
| std::unique_ptr< entity::Player > | removePlayer (const std::string &id) |
| bool | hasPlayer (const std::string &id) const |
| void | movePlayerToLevel (const std::string &id, const common::registry::Identifier &level, const bool resetCoords=true) |
| void | movePlayerToWorld (const std::string &id, World *target) |
| uint64_t | getCreationTime () |
| Gets the creation time of the world, which would be the earliest level's creation time. | |
| std::unique_ptr< properties::AbstractProperty > | getProperty (const std::string &name) override |
| Public Member Functions inherited from lodestone::common::string::StringSerializable | |
| constexpr | StringSerializable ()=default |
| virtual constexpr | ~StringSerializable ()=default |
| Public Member Functions inherited from lodestone::level::properties::ReflectiveProperties | |
| virtual | ~ReflectiveProperties ()=default |
| template<typename T> | |
| std::unique_ptr< TemplatedProperty< T > > | getProperty (const std::string &name) |
| template<typename T> | |
| std::unique_ptr< TemplatedProperty< T > > | getPropertyOr (const std::string &name, T value) |
Protected Attributes | |
| std::string | m_name |
| World name. | |
| map_t< common::registry::Identifier, std::unique_ptr< Level > > | m_levels |
| Levels. | |
| map_t< std::string, std::unique_ptr< entity::Player > > | m_players |
|
inlineexplicit |
|
inline |
|
inline |
| Level * lodestone::level::world::World::addLevel | ( | const common::registry::Identifier & | id, |
| std::unique_ptr< Level > | level ) |
| entity::Player * lodestone::level::world::World::addPlayer | ( | std::unique_ptr< entity::Player > | player, |
| bool | resetCoords = true ) |
| uint64_t lodestone::level::world::World::getCreationTime | ( | ) |
Gets the creation time of the world, which would be the earliest level's creation time.
|
virtual |
| Level * lodestone::level::world::World::getLevel | ( | const common::registry::Identifier & | id | ) | const |
| const map_t< lodestone::common::registry::Identifier, std::unique_ptr< Level > > & lodestone::level::world::World::getLevels | ( | ) | const |
| std::string lodestone::level::world::World::getName | ( | ) | const |
| entity::Player * lodestone::level::world::World::getPlayer | ( | const std::string & | id | ) | const |
| size_t lodestone::level::world::World::getPlayerCount | ( | ) | const |
| const map_t< std::string, std::unique_ptr< entity::Player > > & lodestone::level::world::World::getPlayers | ( | ) | const |
|
overridevirtual |
Reimplemented from lodestone::level::properties::ReflectiveProperties.
| bool lodestone::level::world::World::hasLevel | ( | const common::registry::Identifier & | id | ) | const |
| bool lodestone::level::world::World::hasPlayer | ( | const std::string & | id | ) | const |
|
inline |
|
inline |
| void lodestone::level::world::World::removeLevel | ( | const common::registry::Identifier & | id | ) |
| std::unique_ptr< entity::Player > lodestone::level::world::World::removePlayer | ( | const std::string & | id | ) |
| void lodestone::level::world::World::setName | ( | const std::string & | n | ) |
|
inlineoverridevirtual |
Implements lodestone::common::string::StringSerializable.
|
protected |
Levels.
| ID | The level ID |
| Level | The level |
|
protected |
World name.
|
protected |