summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Bindings/Bindings.cpp113
-rw-r--r--src/Bindings/Bindings.h2
-rw-r--r--src/Bindings/LuaWindow.h8
-rw-r--r--src/BlockEntities/ChestEntity.h8
-rw-r--r--src/BlockEntities/DropSpenserEntity.h8
-rw-r--r--src/BlockEntities/EnderChestEntity.h8
-rw-r--r--src/BlockEntities/FurnaceEntity.h8
-rw-r--r--src/BlockEntities/HopperEntity.h8
-rw-r--r--src/ClientHandle.h1
-rw-r--r--src/World.cpp24
-rw-r--r--src/World.h5
11 files changed, 127 insertions, 66 deletions
diff --git a/src/Bindings/Bindings.cpp b/src/Bindings/Bindings.cpp
index 5536ab2b0..e46e42aa4 100644
--- a/src/Bindings/Bindings.cpp
+++ b/src/Bindings/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 12/15/13 20:25:06.
+** Generated automatically by tolua++-1.0.92 on 12/16/13 21:57:34.
*/
#ifndef __cplusplus
@@ -220,45 +220,46 @@ static void tolua_reg_types (lua_State* tolua_S)
tolua_usertype(tolua_S,"cItemGrid");
tolua_usertype(tolua_S,"cHTTPServer::cCallbacks");
tolua_usertype(tolua_S,"cLuaWindow");
- tolua_usertype(tolua_S,"cInventory");
+ tolua_usertype(tolua_S,"cServer");
tolua_usertype(tolua_S,"cHopperEntity");
tolua_usertype(tolua_S,"std::vector<AString>");
- tolua_usertype(tolua_S,"cBlockEntityWithItems");
tolua_usertype(tolua_S,"cWindow");
+ tolua_usertype(tolua_S,"cBlockEntityWithItems");
tolua_usertype(tolua_S,"cCraftingGrid");
tolua_usertype(tolua_S,"cBlockArea");
tolua_usertype(tolua_S,"cGroup");
tolua_usertype(tolua_S,"cTracer");
- tolua_usertype(tolua_S,"cItem");
tolua_usertype(tolua_S,"cBoundingBox");
+ tolua_usertype(tolua_S,"cItem");
+ tolua_usertype(tolua_S,"cCuboid");
tolua_usertype(tolua_S,"cArrowEntity");
tolua_usertype(tolua_S,"cDropSpenserEntity");
- tolua_usertype(tolua_S,"cCuboid");
tolua_usertype(tolua_S,"Vector3i");
tolua_usertype(tolua_S,"Vector3d");
+ tolua_usertype(tolua_S,"cTNTEntity");
tolua_usertype(tolua_S,"cNoteEntity");
- tolua_usertype(tolua_S,"cServer");
+ tolua_usertype(tolua_S,"cWebAdmin");
tolua_usertype(tolua_S,"cBlockEntity");
tolua_usertype(tolua_S,"cCriticalSection");
tolua_usertype(tolua_S,"HTTPTemplateRequest");
tolua_usertype(tolua_S,"cPickup");
tolua_usertype(tolua_S,"cItems");
tolua_usertype(tolua_S,"cClientHandle");
- tolua_usertype(tolua_S,"cWebAdmin");
- tolua_usertype(tolua_S,"cChatColor");
tolua_usertype(tolua_S,"HTTPRequest");
- tolua_usertype(tolua_S,"cIniFile");
+ tolua_usertype(tolua_S,"cChatColor");
tolua_usertype(tolua_S,"HTTPFormData");
+ tolua_usertype(tolua_S,"cIniFile");
tolua_usertype(tolua_S,"cSignEntity");
+ tolua_usertype(tolua_S,"cDropperEntity");
tolua_usertype(tolua_S,"cPawn");
tolua_usertype(tolua_S,"cThrownEggEntity");
tolua_usertype(tolua_S,"cGroupManager");
+ tolua_usertype(tolua_S,"cBlockEntityWindowOwner");
tolua_usertype(tolua_S,"cPluginManager");
- tolua_usertype(tolua_S,"cDropperEntity");
tolua_usertype(tolua_S,"cProjectileEntity");
tolua_usertype(tolua_S,"cItemGrid::cListener");
+ tolua_usertype(tolua_S,"cInventory");
tolua_usertype(tolua_S,"cPlayer");
- tolua_usertype(tolua_S,"cTNTEntity");
}
/* method: new of class cIniFile */
@@ -3279,6 +3280,23 @@ static int tolua_AllToLua_cLuaWindow_GetContents00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
+/* get function: __cItemGrid of class cLuaWindow */
+#ifndef TOLUA_DISABLE_tolua_get_cLuaWindow___cItemGrid__cListener__
+static int tolua_get_cLuaWindow___cItemGrid__cListener__(lua_State* tolua_S)
+{
+ cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0);
+#ifndef TOLUA_RELEASE
+ if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cItemGrid'",NULL);
+#endif
+#ifdef __cplusplus
+ tolua_pushusertype(tolua_S,(void*)static_cast<cItemGrid::cListener*>(self), "cItemGrid::cListener");
+#else
+ tolua_pushusertype(tolua_S,(void*)((cItemGrid::cListener*)self), "cItemGrid::cListener");
+#endif
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* function: BlockStringToType */
#ifndef TOLUA_DISABLE_tolua_AllToLua_BlockStringToType00
static int tolua_AllToLua_BlockStringToType00(lua_State* tolua_S)
@@ -18791,6 +18809,23 @@ static int tolua_AllToLua_cBlockEntityWithItems_GetContents00(lua_State* tolua_S
}
#endif //#ifndef TOLUA_DISABLE
+/* get function: __cBlockEntityWindowOwner__ of class cChestEntity */
+#ifndef TOLUA_DISABLE_tolua_get_cChestEntity___cBlockEntityWindowOwner__
+static int tolua_get_cChestEntity___cBlockEntityWindowOwner__(lua_State* tolua_S)
+{
+ cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0);
+#ifndef TOLUA_RELEASE
+ if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cBlockEntityWindowOwner__'",NULL);
+#endif
+#ifdef __cplusplus
+ tolua_pushusertype(tolua_S,(void*)static_cast<cBlockEntityWindowOwner*>(self), "cBlockEntityWindowOwner");
+#else
+ tolua_pushusertype(tolua_S,(void*)((cBlockEntityWindowOwner*)self), "cBlockEntityWindowOwner");
+#endif
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* method: AddDropSpenserDir of class cDropSpenserEntity */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00
static int tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00(lua_State* tolua_S)
@@ -18897,6 +18932,23 @@ static int tolua_AllToLua_cDropSpenserEntity_SetRedstonePower00(lua_State* tolua
}
#endif //#ifndef TOLUA_DISABLE
+/* get function: __cBlockEntityWindowOwner__ of class cDropSpenserEntity */
+#ifndef TOLUA_DISABLE_tolua_get_cDropSpenserEntity___cBlockEntityWindowOwner__
+static int tolua_get_cDropSpenserEntity___cBlockEntityWindowOwner__(lua_State* tolua_S)
+{
+ cDropSpenserEntity* self = (cDropSpenserEntity*) tolua_tousertype(tolua_S,1,0);
+#ifndef TOLUA_RELEASE
+ if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cBlockEntityWindowOwner__'",NULL);
+#endif
+#ifdef __cplusplus
+ tolua_pushusertype(tolua_S,(void*)static_cast<cBlockEntityWindowOwner*>(self), "cBlockEntityWindowOwner");
+#else
+ tolua_pushusertype(tolua_S,(void*)((cBlockEntityWindowOwner*)self), "cBlockEntityWindowOwner");
+#endif
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* method: GetInputSlot of class cFurnaceEntity */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cFurnaceEntity_GetInputSlot00
static int tolua_AllToLua_cFurnaceEntity_GetInputSlot00(lua_State* tolua_S)
@@ -19220,6 +19272,40 @@ static int tolua_AllToLua_cFurnaceEntity_HasFuelTimeLeft00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
+/* get function: __cBlockEntityWindowOwner__ of class cFurnaceEntity */
+#ifndef TOLUA_DISABLE_tolua_get_cFurnaceEntity___cBlockEntityWindowOwner__
+static int tolua_get_cFurnaceEntity___cBlockEntityWindowOwner__(lua_State* tolua_S)
+{
+ cFurnaceEntity* self = (cFurnaceEntity*) tolua_tousertype(tolua_S,1,0);
+#ifndef TOLUA_RELEASE
+ if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cBlockEntityWindowOwner__'",NULL);
+#endif
+#ifdef __cplusplus
+ tolua_pushusertype(tolua_S,(void*)static_cast<cBlockEntityWindowOwner*>(self), "cBlockEntityWindowOwner");
+#else
+ tolua_pushusertype(tolua_S,(void*)((cBlockEntityWindowOwner*)self), "cBlockEntityWindowOwner");
+#endif
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
+/* get function: __cBlockEntityWindowOwner__ of class cHopperEntity */
+#ifndef TOLUA_DISABLE_tolua_get_cHopperEntity___cBlockEntityWindowOwner__
+static int tolua_get_cHopperEntity___cBlockEntityWindowOwner__(lua_State* tolua_S)
+{
+ cHopperEntity* self = (cHopperEntity*) tolua_tousertype(tolua_S,1,0);
+#ifndef TOLUA_RELEASE
+ if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable '__cBlockEntityWindowOwner__'",NULL);
+#endif
+#ifdef __cplusplus
+ tolua_pushusertype(tolua_S,(void*)static_cast<cBlockEntityWindowOwner*>(self), "cBlockEntityWindowOwner");
+#else
+ tolua_pushusertype(tolua_S,(void*)((cBlockEntityWindowOwner*)self), "cBlockEntityWindowOwner");
+#endif
+ return 1;
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* method: GetRecord of class cJukeboxEntity */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cJukeboxEntity_GetRecord00
static int tolua_AllToLua_cJukeboxEntity_GetRecord00(lua_State* tolua_S)
@@ -30110,6 +30196,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_function(tolua_S,".call",tolua_AllToLua_cLuaWindow_new00_local);
tolua_function(tolua_S,"delete",tolua_AllToLua_cLuaWindow_delete00);
tolua_function(tolua_S,"GetContents",tolua_AllToLua_cLuaWindow_GetContents00);
+ tolua_variable(tolua_S,"__cItemGrid__cListener__",tolua_get_cLuaWindow___cItemGrid__cListener__,NULL);
tolua_endmodule(tolua_S);
tolua_constant(tolua_S,"E_BLOCK_AIR",E_BLOCK_AIR);
tolua_constant(tolua_S,"E_BLOCK_STONE",E_BLOCK_STONE);
@@ -31549,6 +31636,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_beginmodule(tolua_S,"cChestEntity");
tolua_constant(tolua_S,"ContentsHeight",cChestEntity::ContentsHeight);
tolua_constant(tolua_S,"ContentsWidth",cChestEntity::ContentsWidth);
+ tolua_variable(tolua_S,"__cBlockEntityWindowOwner__",tolua_get_cChestEntity___cBlockEntityWindowOwner__,NULL);
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"cDropSpenserEntity","cDropSpenserEntity","cBlockEntityWithItems",NULL);
tolua_beginmodule(tolua_S,"cDropSpenserEntity");
@@ -31557,6 +31645,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_function(tolua_S,"AddDropSpenserDir",tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00);
tolua_function(tolua_S,"Activate",tolua_AllToLua_cDropSpenserEntity_Activate00);
tolua_function(tolua_S,"SetRedstonePower",tolua_AllToLua_cDropSpenserEntity_SetRedstonePower00);
+ tolua_variable(tolua_S,"__cBlockEntityWindowOwner__",tolua_get_cDropSpenserEntity___cBlockEntityWindowOwner__,NULL);
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"cDispenserEntity","cDispenserEntity","cDropSpenserEntity",NULL);
tolua_beginmodule(tolua_S,"cDispenserEntity");
@@ -31581,12 +31670,14 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_function(tolua_S,"GetCookTimeLeft",tolua_AllToLua_cFurnaceEntity_GetCookTimeLeft00);
tolua_function(tolua_S,"GetFuelBurnTimeLeft",tolua_AllToLua_cFurnaceEntity_GetFuelBurnTimeLeft00);
tolua_function(tolua_S,"HasFuelTimeLeft",tolua_AllToLua_cFurnaceEntity_HasFuelTimeLeft00);
+ tolua_variable(tolua_S,"__cBlockEntityWindowOwner__",tolua_get_cFurnaceEntity___cBlockEntityWindowOwner__,NULL);
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"cHopperEntity","cHopperEntity","cBlockEntityWithItems",NULL);
tolua_beginmodule(tolua_S,"cHopperEntity");
tolua_constant(tolua_S,"ContentsHeight",cHopperEntity::ContentsHeight);
tolua_constant(tolua_S,"ContentsWidth",cHopperEntity::ContentsWidth);
tolua_constant(tolua_S,"TICKS_PER_TRANSFER",cHopperEntity::TICKS_PER_TRANSFER);
+ tolua_variable(tolua_S,"__cBlockEntityWindowOwner__",tolua_get_cHopperEntity___cBlockEntityWindowOwner__,NULL);
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"cJukeboxEntity","cJukeboxEntity","cBlockEntity",NULL);
tolua_beginmodule(tolua_S,"cJukeboxEntity");
diff --git a/src/Bindings/Bindings.h b/src/Bindings/Bindings.h
index ef3b6b49e..012a8b13a 100644
--- a/src/Bindings/Bindings.h
+++ b/src/Bindings/Bindings.h
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 12/15/13 20:25:06.
+** Generated automatically by tolua++-1.0.92 on 12/16/13 21:57:35.
*/
/* Exported function */
diff --git a/src/Bindings/LuaWindow.h b/src/Bindings/LuaWindow.h
index 58d26ef96..dab99a2e2 100644
--- a/src/Bindings/LuaWindow.h
+++ b/src/Bindings/LuaWindow.h
@@ -33,10 +33,10 @@ Additionally, to forbid Lua from deleting this object while it is used by player
cPlayer:OpenWindow check if the window is of this class, and if so, make a global Lua reference for this object.
This reference needs to be unreferenced in the Destroy() function.
*/
-class cLuaWindow : // tolua_export
- public cItemGrid::cListener,
- // tolua_begin
- public cWindow
+// tolua_begin
+class cLuaWindow :
+ public cWindow,
+ public cItemGrid::cListener
{
typedef cWindow super;
diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h
index 4f2c21e91..4110de1f3 100644
--- a/src/BlockEntities/ChestEntity.h
+++ b/src/BlockEntities/ChestEntity.h
@@ -21,10 +21,10 @@ class cNBTData;
-class cChestEntity : // tolua_export
- public cBlockEntityWindowOwner,
- // tolua_begin
- public cBlockEntityWithItems
+// tolua_begin
+class cChestEntity :
+ public cBlockEntityWithItems,
+ public cBlockEntityWindowOwner
{
typedef cBlockEntityWithItems super;
diff --git a/src/BlockEntities/DropSpenserEntity.h b/src/BlockEntities/DropSpenserEntity.h
index 0e9039915..f2f1eba36 100644
--- a/src/BlockEntities/DropSpenserEntity.h
+++ b/src/BlockEntities/DropSpenserEntity.h
@@ -29,10 +29,10 @@ class cServer;
-class cDropSpenserEntity : // tolua_export
- public cBlockEntityWindowOwner,
- // tolua_begin
- public cBlockEntityWithItems
+// tolua_begin
+class cDropSpenserEntity :
+ public cBlockEntityWithItems,
+ public cBlockEntityWindowOwner
{
typedef cBlockEntityWithItems super;
diff --git a/src/BlockEntities/EnderChestEntity.h b/src/BlockEntities/EnderChestEntity.h
index 683b652b2..0ee3cab3b 100644
--- a/src/BlockEntities/EnderChestEntity.h
+++ b/src/BlockEntities/EnderChestEntity.h
@@ -21,10 +21,10 @@ class cNBTData;
-class cEnderChestEntity : // tolua_export
- public cBlockEntityWindowOwner,
- // tolua_begin
- public cBlockEntityWithItems
+// tolua_begin
+class cEnderChestEntity :
+ public cBlockEntityWithItems,
+ public cBlockEntityWindowOwner
{
typedef cBlockEntityWithItems super;
diff --git a/src/BlockEntities/FurnaceEntity.h b/src/BlockEntities/FurnaceEntity.h
index 9464fd175..8b695d61a 100644
--- a/src/BlockEntities/FurnaceEntity.h
+++ b/src/BlockEntities/FurnaceEntity.h
@@ -21,10 +21,10 @@ class cServer;
-class cFurnaceEntity : // tolua_export
- public cBlockEntityWindowOwner,
- // tolua_begin
- public cBlockEntityWithItems
+// tolua_begin
+class cFurnaceEntity :
+ public cBlockEntityWithItems,
+ public cBlockEntityWindowOwner
{
typedef cBlockEntityWithItems super;
diff --git a/src/BlockEntities/HopperEntity.h b/src/BlockEntities/HopperEntity.h
index 3eaa05b7c..2c8b301fe 100644
--- a/src/BlockEntities/HopperEntity.h
+++ b/src/BlockEntities/HopperEntity.h
@@ -16,10 +16,10 @@
-class cHopperEntity : // tolua_export
- public cBlockEntityWindowOwner,
- // tolua_begin
- public cBlockEntityWithItems
+// tolua_begin
+class cHopperEntity :
+ public cBlockEntityWithItems,
+ public cBlockEntityWindowOwner
{
typedef cBlockEntityWithItems super;
diff --git a/src/ClientHandle.h b/src/ClientHandle.h
index 18274f6ae..b426153b9 100644
--- a/src/ClientHandle.h
+++ b/src/ClientHandle.h
@@ -29,7 +29,6 @@ class cExpOrb;
class cPickup;
class cPlayer;
class cProtocol;
-class cRedstone;
class cWindow;
class cFallingBlock;
class cItemHandler;
diff --git a/src/World.cpp b/src/World.cpp
index 35887c07d..f81456334 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -234,7 +234,6 @@ cWorld::cWorld(const AString & a_WorldName) :
m_WorldAge(0),
m_TimeOfDay(0),
m_LastTimeUpdate(0),
- m_RSList(0),
m_Weather(eWeather_Sunny),
m_WeatherInterval(24000), // Guaranteed 1 day of sunshine at server start :)
m_TickThread(*this),
@@ -716,29 +715,6 @@ void cWorld::Tick(float a_Dt, int a_LastTickDurationMSec)
}
TickMobs(a_Dt);
-
- std::vector<int> m_RSList_copy(m_RSList);
-
- m_RSList.clear();
-
- std::vector<int>::const_iterator cii; // FIXME - Please rename this variable, WTF is cii??? Use human readable variable names or common abbreviations (i, idx, itr, iter)
- for (cii = m_RSList_copy.begin(); cii != m_RSList_copy.end();)
- {
- int tempX = *cii; cii++;
- int tempY = *cii; cii++;
- int tempZ = *cii; cii++;
- int state = *cii; cii++;
-
- if ((state == 11111) && ((int)GetBlock(tempX, tempY, tempZ) == E_BLOCK_REDSTONE_TORCH_OFF))
- {
- FastSetBlock(tempX, tempY, tempZ, E_BLOCK_REDSTONE_TORCH_ON, (int)GetBlockMeta(tempX, tempY, tempZ));
- }
- else if ((state == 00000) && ((int)GetBlock(tempX, tempY, tempZ) == E_BLOCK_REDSTONE_TORCH_ON))
- {
- FastSetBlock(tempX, tempY, tempZ, E_BLOCK_REDSTONE_TORCH_OFF, (int)GetBlockMeta(tempX, tempY, tempZ));
- }
- }
- m_RSList_copy.erase(m_RSList_copy.begin(),m_RSList_copy.end());
}
diff --git a/src/World.h b/src/World.h
index 16d7f5146..2d9e8b551 100644
--- a/src/World.h
+++ b/src/World.h
@@ -27,7 +27,6 @@
-class cRedstone;
class cFireSimulator;
class cFluidSimulator;
class cSandSimulator;
@@ -668,10 +667,6 @@ private:
bool m_bEnabledPVP;
bool m_IsDeepSnowEnabled;
bool m_ShouldLavaSpawnFire;
-
- // The cRedstone class simulates redstone and needs access to m_RSList
- // friend class cRedstone;
- std::vector<int> m_RSList;
std::vector<BlockTickQueueItem *> m_BlockTickQueue;
std::vector<BlockTickQueueItem *> m_BlockTickQueueCopy; // Second is for safely removing the objects from the queue