summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/World.h')
-rw-r--r--src/World.h45
1 files changed, 40 insertions, 5 deletions
diff --git a/src/World.h b/src/World.h
index abdc3120c..6ac58b09e 100644
--- a/src/World.h
+++ b/src/World.h
@@ -632,6 +632,21 @@ public:
bool ShouldUseChatPrefixes(void) const { return m_bUseChatPrefixes; }
void SetShouldUseChatPrefixes(bool a_Flag) { m_bUseChatPrefixes = a_Flag; }
+
+ bool AreNetherPortalsEnabled(void) const { return m_bNetherPortalsEnabled; }
+ void SetNetherPortalsEnabled(bool a_Flag) { m_bNetherPortalsEnabled = a_Flag; }
+
+ bool AreEndPortalsEnabled(void) const { return m_bEndPortalsEnabled; }
+ void SetEndPortalsEnabled(bool a_Flag) { m_bEndPortalsEnabled = a_Flag; }
+
+ AString GetNetherWorldName(void) const { return m_NetherWorldName; }
+ void SetNetherWorldName(const AString & a_Name) { m_NetherWorldName = a_Name; }
+
+ AString GetEndWorldName(void) const { return m_EndWorldName; }
+ void SetEndWorldName(const AString & a_Name) { m_EndWorldName = a_Name; }
+
+ AString GetLinkedOverworldName(void) const { return m_OverworldName; }
+ void SetLinkedOverworldName(const AString & a_Name) { m_OverworldName = a_Name; }
// tolua_end
@@ -675,7 +690,7 @@ public:
void InitializeSpawn(void);
/** Starts threads that belong to this world */
- void Start(void);
+ void Start(bool a_WasDimensionSet = true);
/** Stops threads that belong to this world (part of deinit) */
void Stop(void);
@@ -711,9 +726,11 @@ public:
bool IsWeatherRain (void) const { return (m_Weather == wRain); }
bool IsWeatherStorm(void) const { return (m_Weather == wStorm); }
- /** Returns true if the current weather has any precipitation - rain or storm */
- bool IsWeatherWet (void) const { return (m_Weather != wSunny); }
-
+ /** Returns true if the current weather has any precipitation - rain or storm
+ Does not check if biome has no downfall, use cChunk::GetBiomeAt(RelX, RelZ) for that
+ */
+ virtual bool IsWeatherWet(void) const override { return (m_Weather != wSunny); }
+
// tolua_end
cChunkGenerator & GetGenerator(void) { return m_Generator; }
@@ -810,6 +827,12 @@ private:
AString m_WorldName;
+
+ /** The name of the world that a portal in this world should link to
+ Only has effect if this world is a nether or end world, as it is used by entities to see which world to teleport to when in a portal
+ */
+ AString m_OverworldName;
+
AString m_IniFileName;
/** Name of the storage schema used to load and save chunks */
@@ -894,6 +917,18 @@ private:
See the eShrapnelLevel enumeration for details
*/
eShrapnelLevel m_TNTShrapnelLevel;
+
+ /** Whether nether portals teleport entities */
+ bool m_bNetherPortalsEnabled;
+
+ /** Whether end portals teleport entities */
+ bool m_bEndPortalsEnabled;
+
+ /** Name of the nether world */
+ AString m_NetherWorldName;
+
+ /** Name of the end world */
+ AString m_EndWorldName;
cChunkGenerator m_Generator;
@@ -947,7 +982,7 @@ private:
cPlayerList m_PlayersToAdd;
- cWorld(const AString & a_WorldName);
+ cWorld(const AString & a_WorldName, eDimension a_Dimension = dimOverworld, const AString & a_OverworldName = "");
virtual ~cWorld();
void Tick(float a_Dt, int a_LastTickDurationMSec);