summaryrefslogtreecommitdiffstats
path: root/source/World.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/World.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/World.h b/source/World.h
index f174a1c2c..5976321e1 100644
--- a/source/World.h
+++ b/source/World.h
@@ -592,6 +592,9 @@ public:
/// Appends all usernames starting with a_Text (case-insensitive) into Results
void TabCompleteUserName(const AString & a_Text, AStringVector & a_Results);
+ /// Get the current darkness level based on the time
+ Int64 GetSkyDarkness() { return m_SkyDarkness; }
+
private:
friend class cRoot;
@@ -636,6 +639,8 @@ private:
Int64 m_LastSave; // The last WorldAge (in ticks) in which save-all was triggerred
std::map<cMonster::eFamily,Int64> m_LastSpawnMonster; // The last WorldAge (in ticks) in which a monster was spawned (for each megatype of monster) // MG TODO : find a way to optimize without creating unmaintenability (if mob IDs are becoming unrowed)
+ Int64 m_SkyDarkness;
+
eGameMode m_GameMode;
bool m_bEnabledPVP;
bool m_IsDeepSnowEnabled;
@@ -727,6 +732,8 @@ private:
/// Ticks all clients that are in this world
void TickClients(float a_Dt);
+
+ void UpdateSkyDarkness();
/// Creates a new fluid simulator, loads its settings from the inifile (a_FluidName section)
cFluidSimulator * InitializeFluidSimulator(cIniFile & a_IniFile, const char * a_FluidName, BLOCKTYPE a_SimulateBlock, BLOCKTYPE a_StationaryBlock);