summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Bindings/AllToLua.pkg4
-rw-r--r--src/Bindings/LuaWindow.h6
-rw-r--r--src/Bindings/ManualBindings.cpp6
-rw-r--r--src/BlockEntities/BlockEntityWithItems.h2
-rw-r--r--src/Inventory.h2
-rw-r--r--src/Map.h5
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp3
-rw-r--r--src/WebAdmin.h2
8 files changed, 22 insertions, 8 deletions
diff --git a/src/Bindings/AllToLua.pkg b/src/Bindings/AllToLua.pkg
index cea86f432..8f55eba07 100644
--- a/src/Bindings/AllToLua.pkg
+++ b/src/Bindings/AllToLua.pkg
@@ -42,7 +42,6 @@ $cfile "WebPlugin.h"
$cfile "LuaWindow.h"
$cfile "../BlockID.h"
-$cfile "../Mobs/MonsterTypes.h"
$cfile "../BlockInfo.h"
$cfile "../StringUtils.h"
$cfile "../Defines.h"
@@ -63,7 +62,6 @@ $cfile "../BlockArea.h"
$cfile "../Generating/ChunkDesc.h"
$cfile "../CraftingRecipes.h"
$cfile "../UI/Window.h"
-$cfile "../Mobs/Monster.h"
$cfile "../CompositeChat.h"
$cfile "../Map.h"
$cfile "../MapManager.h"
@@ -93,6 +91,8 @@ $cfile "../Entities/ThrownEnderPearlEntity.h"
$cfile "../Entities/ThrownSnowballEntity.h"
$cfile "../Entities/TNTEntity.h"
$cfile "../Entities/WitherSkullEntity.h"
+$cfile "../Mobs/MonsterTypes.h"
+$cfile "../Mobs/Monster.h"
// Block entities:
$cfile "../BlockEntities/BlockEntity.h"
diff --git a/src/Bindings/LuaWindow.h b/src/Bindings/LuaWindow.h
index 76530d99d..d4fc58660 100644
--- a/src/Bindings/LuaWindow.h
+++ b/src/Bindings/LuaWindow.h
@@ -35,8 +35,10 @@ This reference needs to be unreferenced in the Destroy() function.
*/
// tolua_begin
class cLuaWindow :
- public cWindow,
- public cItemGrid::cListener
+ public cWindow
+ // tolua_end
+ , public cItemGrid::cListener
+ // tolua_begin
{
typedef cWindow super;
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index e93b11eaa..035be55ae 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -638,11 +638,11 @@ static int tolua_DoWithID(lua_State* tolua_S)
private:
virtual bool Item(Ty2 * a_Item) override
{
- lua_rawgeti(LuaState, LUA_REGISTRYINDEX, FuncRef); // Push function to call
- tolua_pushusertype(LuaState, a_Item, Ty2::GetClassStatic()); // Push the item
+ lua_rawgeti(LuaState, LUA_REGISTRYINDEX, FuncRef); // Push function to call
+ tolua_pushusertype(LuaState, a_Item, a_Item->GetClass()); // Push the item
if (TableRef != LUA_REFNIL)
{
- lua_rawgeti(LuaState, LUA_REGISTRYINDEX, TableRef); // Push the optional callbackdata param
+ lua_rawgeti(LuaState, LUA_REGISTRYINDEX, TableRef); // Push the optional callbackdata param
}
int s = lua_pcall(LuaState, (TableRef == LUA_REFNIL ? 1 : 2), 1, 0);
diff --git a/src/BlockEntities/BlockEntityWithItems.h b/src/BlockEntities/BlockEntityWithItems.h
index 2c2ced1cb..740dbca51 100644
--- a/src/BlockEntities/BlockEntityWithItems.h
+++ b/src/BlockEntities/BlockEntityWithItems.h
@@ -21,7 +21,9 @@
// tolua_begin
class cBlockEntityWithItems :
public cBlockEntity,
+ // tolua_end
public cItemGrid::cListener,
+ // tolua_begin
public cBlockEntityWindowOwner
{
typedef cBlockEntity super;
diff --git a/src/Inventory.h b/src/Inventory.h
index 4e76bc0d3..311f64562 100644
--- a/src/Inventory.h
+++ b/src/Inventory.h
@@ -31,7 +31,9 @@ You can use the invArmorOffset, invInventoryOffset and invHotbarOffset constants
*/
class cInventory :
+ // tolua_end
public cItemGrid::cListener
+ // tolua_begin
{
public:
diff --git a/src/Map.h b/src/Map.h
index fe324a5e7..3e775231a 100644
--- a/src/Map.h
+++ b/src/Map.h
@@ -189,6 +189,11 @@ public:
return "cMap";
}
+ const char * GetClass(void) // Needed for ManualBindings' DoWith templates
+ {
+ return "cMap";
+ }
+
protected:
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index bcd083294..a9481edb0 100644
--- a/src/Simulator/FloodyFluidSimulator.cpp
+++ b/src/Simulator/FloodyFluidSimulator.cpp
@@ -108,8 +108,9 @@ void cFloodyFluidSimulator::SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_Re
{
SpreadXZ(a_Chunk, a_RelX, a_RelY, a_RelZ, NewMeta);
}
+
// If source creation is on, check for it here:
- else if (
+ if (
(m_NumNeighborsForSource > 0) && // Source creation is on
(MyMeta == m_Falloff) && // Only exactly one block away from a source (fast bail-out)
!IsPassableForFluid(Below) && // Only exactly 1 block deep
diff --git a/src/WebAdmin.h b/src/WebAdmin.h
index 86a8a9a4b..1e1a9bfa9 100644
--- a/src/WebAdmin.h
+++ b/src/WebAdmin.h
@@ -95,7 +95,9 @@ struct sWebAdminPage
// tolua_begin
class cWebAdmin :
+ // tolua_end
public cHTTPServer::cCallbacks
+ // tolua_begin
{
public:
// tolua_end