summaryrefslogtreecommitdiffstats
path: root/source/World.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-10-30 23:25:51 +0100
committerMattes D <github@xoft.cz>2013-10-30 23:25:51 +0100
commit8b9d3c77228b139d5b5a146e0f1aa242e3066903 (patch)
tree6733363192eb368c335e9aa18fd0df2ab4a266b7 /source/World.h
parentAdded 1.7 to protocol recognizer. (diff)
parentLast of the nitpicker note fixes. Added some inline commenting. (diff)
downloadcuberite-8b9d3c77228b139d5b5a146e0f1aa242e3066903.tar
cuberite-8b9d3c77228b139d5b5a146e0f1aa242e3066903.tar.gz
cuberite-8b9d3c77228b139d5b5a146e0f1aa242e3066903.tar.bz2
cuberite-8b9d3c77228b139d5b5a146e0f1aa242e3066903.tar.lz
cuberite-8b9d3c77228b139d5b5a146e0f1aa242e3066903.tar.xz
cuberite-8b9d3c77228b139d5b5a146e0f1aa242e3066903.tar.zst
cuberite-8b9d3c77228b139d5b5a146e0f1aa242e3066903.zip
Diffstat (limited to 'source/World.h')
-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..c4fd06d0b 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
+ NIBBLETYPE 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)
+ NIBBLETYPE 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);