summaryrefslogtreecommitdiffstats
path: root/source/Simulator/RedstoneSimulator.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-20 23:54:28 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-20 23:54:28 +0100
commitd48ce1d10fac9b38f17737ac81bfb686e410e081 (patch)
treea7bfaecefa1a5f4a1256bd132e584887f9559be8 /source/Simulator/RedstoneSimulator.h
parentFixed piston sound effect (when unable to extend) (diff)
downloadcuberite-d48ce1d10fac9b38f17737ac81bfb686e410e081.tar
cuberite-d48ce1d10fac9b38f17737ac81bfb686e410e081.tar.gz
cuberite-d48ce1d10fac9b38f17737ac81bfb686e410e081.tar.bz2
cuberite-d48ce1d10fac9b38f17737ac81bfb686e410e081.tar.lz
cuberite-d48ce1d10fac9b38f17737ac81bfb686e410e081.tar.xz
cuberite-d48ce1d10fac9b38f17737ac81bfb686e410e081.tar.zst
cuberite-d48ce1d10fac9b38f17737ac81bfb686e410e081.zip
Diffstat (limited to 'source/Simulator/RedstoneSimulator.h')
-rw-r--r--source/Simulator/RedstoneSimulator.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/Simulator/RedstoneSimulator.h b/source/Simulator/RedstoneSimulator.h
index d68c6daeb..ab88f51e2 100644
--- a/source/Simulator/RedstoneSimulator.h
+++ b/source/Simulator/RedstoneSimulator.h
@@ -97,14 +97,23 @@ private:
/* ===================== */
/* ====== Helper functions ====== */
+ ///<summary>Marks a block as powered</summary>
void SetBlockPowered(int a_BlockX, int a_BlockY, int a_BlockZ, int a_SourceX, int a_SourceY, int a_SourceZ, BLOCKTYPE a_SourceBlock);
+ ///<summary>Marks a block as being powered through another block</summary>
void SetBlockLinkedPowered(int a_BlockX, int a_BlockY, int a_BlockZ, int a_MiddleX, int a_MiddleY, int a_MiddleZ, int a_SourceX, int a_SourceY, int a_SourceZ, BLOCKTYPE a_SourceBlock, BLOCKTYPE a_MiddeBlock);
- void SetDirectionLinkedPowered(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Direction, BLOCKTYPE a_SourceType);
+ ///<summary>Marks the second block in a direction as linked powered</summary>
+ void SetDirectionLinkedPowered(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Direction, BLOCKTYPE a_SourceBlock);
+ ///<summary>Marks all blocks immediately surrounding a coordinate as powered</summary>
+ void SetAllDirsAsPowered(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_SourceBlock);
+ ///<summary>Returns if a coordiante is powered or linked powered</summary>
bool AreCoordsPowered(int a_BlockX, int a_BlockY, int a_BlockZ);
+ ///<summary>Returns if a repeater is powered</summary>
bool IsRepeaterPowered(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_Meta);
+ ///<summary>Returns if lever metadata marks it as emitting power</summary>
bool IsLeverOn(NIBBLETYPE a_BlockMeta);
+ ///<summary>Returns if button metadata marks it as emitting power</summary>
bool IsButtonOn(NIBBLETYPE a_BlockMeta);
/* ============================== */
@@ -112,11 +121,16 @@ private:
{
switch (Block)
{
+ case E_BLOCK_ACTIVATOR_RAIL:
case E_BLOCK_PISTON:
case E_BLOCK_STICKY_PISTON:
case E_BLOCK_DISPENSER:
case E_BLOCK_DROPPER:
+ case E_BLOCK_FENCE_GATE:
+ case E_BLOCK_HOPPER:
+ case E_BLOCK_NOTE_BLOCK:
case E_BLOCK_TNT:
+ case E_BLOCK_TRAPDOOR:
case E_BLOCK_REDSTONE_LAMP_OFF:
case E_BLOCK_REDSTONE_LAMP_ON:
case E_BLOCK_WOODEN_DOOR: