From 8656e149c8820272a882406912790f0075ed5f28 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 30 Jun 2015 15:50:15 +0100 Subject: Improved maps --- src/Blocks/BlockFluid.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'src/Blocks/BlockFluid.h') 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; + } } ; -- cgit v1.2.3