summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockFluid.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockFluid.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/Blocks/BlockFluid.h b/src/Blocks/BlockFluid.h
index 58b3ce042..56a2ad3c2 100644
--- a/src/Blocks/BlockFluid.h
+++ b/src/Blocks/BlockFluid.h
@@ -18,20 +18,17 @@ public:
{
}
-
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
// No pickups
}
-
virtual bool DoesIgnoreBuildCollision(void) override
{
return true;
}
-
virtual void Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) override
{
switch (m_BlockType)
@@ -49,6 +46,17 @@ public:
}
super::Check(a_ChunkInterface, a_PluginInterface, a_RelX, a_RelY, a_RelZ, a_Chunk);
}
+
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ {
+ UNUSED(a_Meta);
+ if (IsBlockWater(m_BlockType))
+ {
+ return 12;
+ }
+ ASSERT(!"Unhandled blocktype in fluid/water handler!");
+ return 0;
+ }
} ;
@@ -66,8 +74,7 @@ public:
{
}
-
- /// Called to tick the block
+ /** Called to tick the block */
virtual void OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override
{
if (a_Chunk.GetWorld()->ShouldLavaSpawnFire())
@@ -80,8 +87,7 @@ public:
}
}
-
- /// Tries to start a fire near the lava at given coords. Returns true if fire started.
+ /** Tries to start a fire near the lava at given coords. Returns true if fire started. */
static bool TryStartFireNear(int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk)
{
// Pick a block next to this lava block:
@@ -132,6 +138,12 @@ public:
} // for i - CrossCoords[]
return false;
}
+
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ {
+ UNUSED(a_Meta);
+ return 4;
+ }
} ;