summaryrefslogtreecommitdiffstats
path: root/src/Root.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-01-03 17:31:13 +0100
committerMattes D <github@xoft.cz>2020-01-07 06:53:17 +0100
commit4aef80b47eb6941d7fc41e57efe147af0ece1f9b (patch)
tree4aeb7c9e8e4aa3ae2ceed1cc60155d868852c5cd /src/Root.h
parentStringUtils: Added note to StringsConcat about StringJoin. (diff)
downloadcuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar
cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.gz
cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.bz2
cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.lz
cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.xz
cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.zst
cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.zip
Diffstat (limited to '')
-rw-r--r--src/Root.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Root.h b/src/Root.h
index 1d3a6a347..90676a7df 100644
--- a/src/Root.h
+++ b/src/Root.h
@@ -29,6 +29,7 @@ class cSettingsRepositoryInterface;
class cDeadlockDetect;
class cUUID;
class BlockTypePalette;
+class ProtocolPalettes;
using cPlayerListCallback = cFunctionRef<bool(cPlayer &)>;
using cWorldListCallback = cFunctionRef<bool(cWorld &)>;
@@ -96,6 +97,9 @@ public:
/** Returns the block type palette used for upgrading blocks from pre-1.13 data. */
const BlockTypePalette & GetUpgradeBlockTypePalette() const { return *m_UpgradeBlockTypePalette; }
+ /** Returns the per-protocol palettes manager. */
+ ProtocolPalettes & GetProtocolPalettes() const { return *m_ProtocolPalettes; }
+
/** Returns the number of ticks for how long the item would fuel a furnace. Returns zero if not a fuel */
static int GetFurnaceFuelBurnTime(const cItem & a_Fuel); // tolua_export
@@ -241,9 +245,16 @@ private:
/** The upgrade palette for pre-1.13 blocks. */
std::unique_ptr<BlockTypePalette> m_UpgradeBlockTypePalette;
+ /** The per-protocol palettes manager. */
+ std::unique_ptr<ProtocolPalettes> m_ProtocolPalettes;
+
void LoadGlobalSettings();
+ /** Loads the upgrade palette and the per-protocol palettes.
+ The aProtocolFolder is the path to the folder containing the per-protocol palettes. */
+ void LoadPalettes(const AString & aProtocolFolder);
+
/** Loads the worlds from settings.ini, creates the worldmap */
void LoadWorlds(cDeadlockDetect & a_dd, cSettingsRepositoryInterface & a_Settings, bool a_IsNewIniFile);