Source files cleanup: Removed unused cBlockToPickup
git-svn-id: http://mc-server.googlecode.com/svn/trunk@884 0a769ca7-a7f5-676a-18bf-c427514a06d6master
parent
16f44ab7de
commit
3953277568
|
@ -935,14 +935,6 @@
|
|||
RelativePath="..\source\cBlockEntity.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\cBlockToPickup.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\cBlockToPickup.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\cChestEntity.cpp"
|
||||
>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
** Lua binding: AllToLua
|
||||
** Generated automatically by tolua++-1.0.92 on 09/08/12 22:43:41.
|
||||
** Generated automatically by tolua++-1.0.92 on 09/23/12 23:08:35.
|
||||
*/
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
@ -2655,6 +2655,35 @@ static int tolua_AllToLua_ItemTypeToString00(lua_State* tolua_S)
|
|||
}
|
||||
#endif //#ifndef TOLUA_DISABLE
|
||||
|
||||
/* function: ItemToFullString */
|
||||
#ifndef TOLUA_DISABLE_tolua_AllToLua_ItemToFullString00
|
||||
static int tolua_AllToLua_ItemToFullString00(lua_State* tolua_S)
|
||||
{
|
||||
#ifndef TOLUA_RELEASE
|
||||
tolua_Error tolua_err;
|
||||
if (
|
||||
(tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const cItem",0,&tolua_err)) ||
|
||||
!tolua_isnoobj(tolua_S,2,&tolua_err)
|
||||
)
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,1,0));
|
||||
{
|
||||
AString tolua_ret = (AString) ItemToFullString(*a_Item);
|
||||
tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
#ifndef TOLUA_RELEASE
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'ItemToFullString'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif //#ifndef TOLUA_DISABLE
|
||||
|
||||
/* get function: g_BlockLightValue */
|
||||
#ifndef TOLUA_DISABLE_tolua_get_AllToLua_g_BlockLightValue
|
||||
static int tolua_get_AllToLua_g_BlockLightValue(lua_State* tolua_S)
|
||||
|
@ -12841,12 +12870,12 @@ static int tolua_AllToLua_cInventory_GetFromHotBar00(lua_State* tolua_S)
|
|||
#endif
|
||||
{
|
||||
cInventory* self = (cInventory*) tolua_tousertype(tolua_S,1,0);
|
||||
int a_SlotNum = ((int) tolua_tonumber(tolua_S,2,0));
|
||||
int a_HotBarSlotNum = ((int) tolua_tonumber(tolua_S,2,0));
|
||||
#ifndef TOLUA_RELEASE
|
||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFromHotBar'", NULL);
|
||||
#endif
|
||||
{
|
||||
cItem* tolua_ret = (cItem*) self->GetFromHotBar(a_SlotNum);
|
||||
cItem* tolua_ret = (cItem*) self->GetFromHotBar(a_HotBarSlotNum);
|
||||
tolua_pushusertype(tolua_S,(void*)tolua_ret,"cItem");
|
||||
}
|
||||
}
|
||||
|
@ -13573,7 +13602,7 @@ static int tolua_AllToLua_cChestEntity_SetSlot00(lua_State* tolua_S)
|
|||
if (
|
||||
!tolua_isusertype(tolua_S,1,"cChestEntity",0,&tolua_err) ||
|
||||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
|
||||
(tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"cItem",0,&tolua_err)) ||
|
||||
(tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const cItem",0,&tolua_err)) ||
|
||||
!tolua_isnoobj(tolua_S,4,&tolua_err)
|
||||
)
|
||||
goto tolua_lerror;
|
||||
|
@ -13582,7 +13611,7 @@ static int tolua_AllToLua_cChestEntity_SetSlot00(lua_State* tolua_S)
|
|||
{
|
||||
cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0);
|
||||
int a_Slot = ((int) tolua_tonumber(tolua_S,2,0));
|
||||
cItem* a_Item = ((cItem*) tolua_tousertype(tolua_S,3,0));
|
||||
const cItem* a_Item = ((const cItem*) tolua_tousertype(tolua_S,3,0));
|
||||
#ifndef TOLUA_RELEASE
|
||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSlot'", NULL);
|
||||
#endif
|
||||
|
@ -21547,6 +21576,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"StringToItem",tolua_AllToLua_StringToItem00);
|
||||
tolua_function(tolua_S,"ItemToString",tolua_AllToLua_ItemToString00);
|
||||
tolua_function(tolua_S,"ItemTypeToString",tolua_AllToLua_ItemTypeToString00);
|
||||
tolua_function(tolua_S,"ItemToFullString",tolua_AllToLua_ItemToFullString00);
|
||||
tolua_array(tolua_S,"g_BlockLightValue",tolua_get_AllToLua_g_BlockLightValue,tolua_set_AllToLua_g_BlockLightValue);
|
||||
tolua_array(tolua_S,"g_BlockSpreadLightFalloff",tolua_get_AllToLua_g_BlockSpreadLightFalloff,tolua_set_AllToLua_g_BlockSpreadLightFalloff);
|
||||
tolua_array(tolua_S,"g_BlockTransparent",tolua_get_AllToLua_g_BlockTransparent,tolua_set_AllToLua_g_BlockTransparent);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
** Lua binding: AllToLua
|
||||
** Generated automatically by tolua++-1.0.92 on 09/08/12 22:43:41.
|
||||
** Generated automatically by tolua++-1.0.92 on 09/23/12 23:08:36.
|
||||
*/
|
||||
|
||||
/* Exported function */
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cBlockToPickup.h"
|
||||
#include "Defines.h"
|
||||
#include "BlockID.h"
|
||||
#include "MersenneTwister.h"
|
||||
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "BlockID.h"
|
||||
#else
|
||||
enum ENUM_ITEM_ID;
|
||||
#endif
|
||||
|
||||
#include "cItem.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cBlockToPickup // tolua_export
|
||||
{ // tolua_export
|
||||
public:
|
||||
/// For a given block and tool, returns the list of drops generated
|
||||
|
||||
/// Returns true if the tool used for the block is the right one for the job. cClientHandle uses this to determine whether to decrease tool durability twice as much
|
||||
static bool IsRightTool(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, ENUM_ITEM_ID a_UsedTool); // tolua_export
|
||||
|
||||
}; // tolua_export
|
||||
|
||||
|
||||
|
||||
|
|
@ -25,7 +25,6 @@
|
|||
#include "cItem.h"
|
||||
#include "cNoise.h"
|
||||
#include "cRoot.h"
|
||||
#include "cBlockToPickup.h"
|
||||
#include "MersenneTwister.h"
|
||||
#include "cPlayer.h"
|
||||
#include "BlockArea.h"
|
||||
|
@ -440,84 +439,6 @@ void cChunk::CheckBlocks(void)
|
|||
|
||||
m_World->SetBlock(WorldPos.x, WorldPos.y, WorldPos.z, E_BLOCK_AIR, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
BLOCKTYPE BlockType = GetBlock(index);
|
||||
NIBBLETYPE BlockMeta = GetMeta (index);
|
||||
switch (BlockType)
|
||||
{
|
||||
// Stuff that drops when block below is destroyed:
|
||||
case E_BLOCK_REDSTONE_REPEATER_OFF:
|
||||
case E_BLOCK_REDSTONE_REPEATER_ON:
|
||||
case E_BLOCK_REDSTONE_WIRE:
|
||||
case E_BLOCK_CACTUS:
|
||||
case E_BLOCK_REEDS:
|
||||
case E_BLOCK_WOODEN_PRESSURE_PLATE:
|
||||
case E_BLOCK_STONE_PRESSURE_PLATE:
|
||||
case E_BLOCK_MINECART_TRACKS:
|
||||
case E_BLOCK_SIGN_POST:
|
||||
case E_BLOCK_CROPS:
|
||||
case E_BLOCK_SAPLING:
|
||||
case E_BLOCK_YELLOW_FLOWER:
|
||||
case E_BLOCK_RED_ROSE:
|
||||
case E_BLOCK_RED_MUSHROOM:
|
||||
case E_BLOCK_BROWN_MUSHROOM:
|
||||
case E_BLOCK_SNOW:
|
||||
{
|
||||
if (GetBlock(BlockPos.x, BlockPos.y - 1, BlockPos.z) == E_BLOCK_AIR)
|
||||
{
|
||||
SetBlock( BlockPos, E_BLOCK_AIR, 0 );
|
||||
|
||||
Vector3i WorldPos = PositionToWorldPosition( BlockPos );
|
||||
|
||||
m_World->GetSimulatorManager()->WakeUp(WorldPos.x, WorldPos.y, WorldPos.z);
|
||||
|
||||
cItems Pickups;
|
||||
cBlockToPickup::ToPickup(BlockType, BlockMeta, E_ITEM_EMPTY, Pickups);
|
||||
m_World->SpawnItemPickups(Pickups, WorldPos.x, WorldPos.y, WorldPos.z);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case E_BLOCK_REDSTONE_TORCH_OFF:
|
||||
case E_BLOCK_REDSTONE_TORCH_ON:
|
||||
case E_BLOCK_TORCH:
|
||||
{
|
||||
char Dir = cTorch::MetaDataToDirection( GetNibble( m_BlockMeta, BlockPos ) );
|
||||
Vector3i WorldPos = PositionToWorldPosition( BlockPos );
|
||||
|
||||
Vector3i AttachedTo = WorldPos;
|
||||
AddDirection( AttachedTo.x, AttachedTo.y, AttachedTo.z, Dir, true );
|
||||
if( m_World->GetBlock( AttachedTo ) == E_BLOCK_AIR )
|
||||
{
|
||||
SetBlock( BlockPos, E_BLOCK_AIR, 0 );
|
||||
|
||||
m_World->GetSimulatorManager()->WakeUp(WorldPos.x, WorldPos.y, WorldPos.z);
|
||||
|
||||
cItems Pickups;
|
||||
cBlockToPickup::ToPickup(BlockType, BlockMeta, E_ITEM_EMPTY, Pickups);
|
||||
m_World->SpawnItemPickups(Pickups, WorldPos.x, WorldPos.y, WorldPos.z);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case E_BLOCK_LADDER:
|
||||
{
|
||||
char Dir = cLadder::MetaDataToDirection( GetNibble( m_BlockMeta, BlockPos ) );
|
||||
Vector3i WorldPos = PositionToWorldPosition( BlockPos );
|
||||
Vector3i AttachedTo = WorldPos;
|
||||
AddDirection( AttachedTo.x, AttachedTo.y, AttachedTo.z, Dir, true );
|
||||
if( m_World->GetBlock( AttachedTo ) == E_BLOCK_AIR )
|
||||
{
|
||||
SetBlock( BlockPos, E_BLOCK_AIR, 0 );
|
||||
cItems Pickups;
|
||||
cBlockToPickup::ToPickup(BlockType, BlockMeta, E_ITEM_EMPTY, Pickups);
|
||||
m_World->SpawnItemPickups(Pickups, WorldPos.x, WorldPos.y, WorldPos.z);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} // switch (BlockType)
|
||||
*/
|
||||
} // for itr - ToTickBlocks[]
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "cSign.h"
|
||||
#include "cRedstone.h"
|
||||
#include "cPiston.h"
|
||||
#include "cBlockToPickup.h"
|
||||
#include "Mobs/Monster.h"
|
||||
#include "cChatColor.h"
|
||||
#include "cSocket.h"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include "cBlockToPickup.h"
|
||||
|
||||
|
||||
class cDoors //tolua_export
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "cRedstone.h"
|
||||
#include "ChunkDef.h"
|
||||
#include "cPickup.h"
|
||||
#include "cBlockToPickup.h"
|
||||
#include "cItem.h"
|
||||
#include "cRoot.h"
|
||||
#include "cClientHandle.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "ChunkDef.h"
|
||||
#include "cClientHandle.h"
|
||||
#include "cPickup.h"
|
||||
#include "cBlockToPickup.h"
|
||||
#include "cPlayer.h"
|
||||
#include "cServer.h"
|
||||
#include "cItem.h"
|
||||
|
|
Loading…
Reference in New Issue