Moved sound-configs into BlockID.h and fixed/ added loads of sounds

master
Masy98 2014-09-09 16:00:26 +02:00
parent d2c1518145
commit acae3c9c65
45 changed files with 172 additions and 272 deletions

View File

@ -18,6 +18,7 @@ cBlockInfo::cBlockInfo()
, m_IsSolid(true)
, m_FullyOccupiesVoxel(false)
, m_CanBeTerraformed(false)
, m_PlaceSound("")
, m_Handler(NULL)
{}
@ -571,6 +572,172 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_SOULSAND ].m_CanBeTerraformed = true;
a_Info[E_BLOCK_STAINED_CLAY ].m_CanBeTerraformed = true;
a_Info[E_BLOCK_STONE ].m_CanBeTerraformed = true;
// Block place sounds:
a_Info[E_BLOCK_STONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_GRASS ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_DIRT ].m_PlaceSound = "dig.gravel";
a_Info[E_BLOCK_COBBLESTONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_PLANKS ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_SAPLING ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_BEDROCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SAND ].m_PlaceSound = "dig.sand";
a_Info[E_BLOCK_GRAVEL ].m_PlaceSound = "dig.gravel";
a_Info[E_BLOCK_GOLD_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_IRON_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_COAL_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_LOG ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_LEAVES ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_SPONGE ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_GLASS ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_LAPIS_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_LAPIS_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DISPENSER ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SANDSTONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_NOTE_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_POWERED_RAIL ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_DETECTOR_RAIL ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_STICKY_PISTON ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_COBWEB ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_TALL_GRASS ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_DEAD_BUSH ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_PISTON ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_PISTON_EXTENSION ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_WOOL ].m_PlaceSound = "dig.cloth";
a_Info[E_BLOCK_PISTON_MOVED_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DANDELION ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_FLOWER ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_BROWN_MUSHROOM ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_RED_MUSHROOM ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_GOLD_BLOCK ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_IRON_BLOCK ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_DOUBLE_STONE_SLAB ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_STONE_SLAB ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_BRICK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_TNT ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_BOOKCASE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_MOSSY_COBBLESTONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_OBSIDIAN ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_TORCH ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_FIRE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_MOB_SPAWNER ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_WOODEN_STAIRS ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_CHEST ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_REDSTONE_WIRE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DIAMOND_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DIAMOND_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_CRAFTING_TABLE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_FARMLAND ].m_PlaceSound = "dig.gravel";
a_Info[E_BLOCK_FURNACE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_LIT_FURNACE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SIGN_POST ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_WOODEN_DOOR ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_LADDER ].m_PlaceSound = "dig.ladder";
a_Info[E_BLOCK_RAIL ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_COBBLESTONE_STAIRS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_WALLSIGN ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_LEVER ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_STONE_PRESSURE_PLATE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_IRON_DOOR ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_WOODEN_PRESSURE_PLATE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_REDSTONE_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_REDSTONE_ORE_GLOWING ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_REDSTONE_TORCH_OFF ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_REDSTONE_TORCH_ON ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_STONE_BUTTON ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SNOW ].m_PlaceSound = "dig.snow";
a_Info[E_BLOCK_ICE ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_SNOW_BLOCK ].m_PlaceSound = "dig.snow";
a_Info[E_BLOCK_CACTUS ].m_PlaceSound = "dig.cloth";
a_Info[E_BLOCK_CLAY ].m_PlaceSound = "dig.gravel";
a_Info[E_BLOCK_SUGARCANE ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_JUKEBOX ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_FENCE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_PUMPKIN ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_NETHERRACK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SOULSAND ].m_PlaceSound = "dig.sand";
a_Info[E_BLOCK_GLOWSTONE ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_NETHER_PORTAL ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_JACK_O_LANTERN ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_CAKE ].m_PlaceSound = "dig.snow";
a_Info[E_BLOCK_REDSTONE_REPEATER_OFF ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_REDSTONE_REPEATER_ON ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_STAINED_GLASS ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_TRAPDOOR ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_SILVERFISH_EGG ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_STONE_BRICKS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_HUGE_BROWN_MUSHROOM ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_HUGE_RED_MUSHROOM ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_IRON_BARS ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_GLASS_PANE ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_MELON ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_PUMPKIN_STEM ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_MELON_STEM ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_VINES ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_FENCE_GATE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_BRICK_STAIRS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_STONE_BRICK_STAIRS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_MYCELIUM ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_LILY_PAD ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_NETHER_BRICK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_NETHER_BRICK_FENCE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_NETHER_BRICK_STAIRS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_NETHER_WART ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_ENCHANTMENT_TABLE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_BREWING_STAND ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_CAULDRON ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_END_PORTAL ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_END_PORTAL_FRAME ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_END_STONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DRAGON_EGG ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_REDSTONE_LAMP_OFF ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_REDSTONE_LAMP_ON ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_DOUBLE_WOODEN_SLAB ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_WOODEN_SLAB ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_COCOA_POD ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_SANDSTONE_STAIRS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_EMERALD_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_ENDER_CHEST ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_TRIPWIRE_HOOK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_TRIPWIRE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_EMERALD_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SPRUCE_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_BIRCH_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_JUNGLE_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_COMMAND_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_BEACON ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_COBBLESTONE_WALL ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_FLOWER_POT ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_CARROTS ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_POTATOES ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_HEAD ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_ANVIL ].m_PlaceSound = "dig.anvil";
a_Info[E_BLOCK_TRAPPED_CHEST ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_INACTIVE_COMPARATOR ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_ACTIVE_COMPARATOR ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_DAYLIGHT_SENSOR ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_BLOCK_OF_REDSTONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_NETHER_QUARTZ_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_HOPPER ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_QUARTZ_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_QUARTZ_STAIRS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_ACTIVATOR_RAIL ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_DROPPER ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_STAINED_CLAY ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_STAINED_GLASS_PANE ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_NEW_LEAVES ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_NEW_LOG ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_ACACIA_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_DARK_OAK_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_HAY_BALE ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_CARPET ].m_PlaceSound = "dig.cloth";
a_Info[E_BLOCK_HARDENED_CLAY ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_BLOCK_OF_COAL ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_PACKED_ICE ].m_PlaceSound = "dig.glass";
a_Info[E_BLOCK_BIG_FLOWER ].m_PlaceSound = "dig.grass";
}

View File

@ -48,6 +48,9 @@ public:
/** Can a finisher change it? */
bool m_CanBeTerraformed;
/** Sound when placing this block */
AString m_PlaceSound;
// tolua_end
/** Associated block handler. */
@ -64,6 +67,7 @@ public:
inline static bool IsSolid (BLOCKTYPE a_Type) { return Get(a_Type).m_IsSolid; }
inline static bool FullyOccupiesVoxel (BLOCKTYPE a_Type) { return Get(a_Type).m_FullyOccupiesVoxel; }
inline static bool CanBeTerraformed (BLOCKTYPE a_Type) { return Get(a_Type).m_CanBeTerraformed; }
inline static AString GetPlaceSound (BLOCKTYPE a_Type) { return Get(a_Type).m_PlaceSound; }
// tolua_end

View File

@ -118,12 +118,6 @@ public:
}
}
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -57,12 +57,6 @@ public:
}
virtual const char * GetStepSound(void) override
{
return m_BlockType == E_BLOCK_WOODEN_BUTTON ? "step.wood" : "step.stone";
}
inline static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_BlockFace)
{
switch (a_BlockFace)

View File

@ -69,12 +69,6 @@ public:
{
a_Chunk.GetWorld()->GrowCactus(a_RelX + a_Chunk.GetPosX() * cChunkDef::Width, a_RelY, a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width, 1);
}
virtual const char * GetStepSound(void) override
{
return "step.cloth";
}
} ;

View File

@ -43,11 +43,6 @@ public:
{
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.cloth";
}
} ;

View File

@ -22,12 +22,6 @@ public:
cBlockHandler(a_BlockType)
{
}
virtual const char * GetStepSound(void) override
{
return "step.cloth";
}
virtual bool GetPlacementBlockTypeMeta(

View File

@ -106,12 +106,6 @@ public:
// Single chest, no further processing needed
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width;

View File

@ -15,11 +15,6 @@ public:
: cBlockHandler(a_BlockType)
{
}
virtual const char * GetStepSound(void) override
{
return "step.cloth";
}
} ;

View File

@ -20,11 +20,6 @@ public:
{
a_Pickups.push_back(cItem(E_BLOCK_AIR, 8, 0));
}
virtual const char * GetStepSound(void) override
{
return "step.stone";
}
} ;

View File

@ -64,12 +64,6 @@ public:
a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetYaw());
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -100,12 +100,6 @@ public:
{
return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) == E_BLOCK_FARMLAND));
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -88,12 +88,6 @@ public:
}
} // for i - repeat twice
}
virtual const char * GetStepSound(void) override
{
return "step.gravel";
}
} ;

View File

@ -33,11 +33,6 @@ public:
a_BlockMeta = RotationToMetaData(a_Player->GetYaw());
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.stone";
}
static NIBBLETYPE RotationToMetaData(double a_Rotation)
{

View File

@ -50,11 +50,6 @@ public:
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
/** Traces along YP until it finds an obsidian block, returns Y difference or 0 if no portal, and -1 for border
Takes the X, Y, and Z of the base block; with an optional MaxY for portal border finding */
int FindObsidianCeiling(int X, int Y, int Z, cChunkInterface & a_ChunkInterface, int MaxY = 0)

View File

@ -28,12 +28,6 @@ public:
{
return (a_RelY > 0) && IsBlockTypeOfDirt(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ));
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -15,11 +15,6 @@ public:
: cBlockHandler(a_BlockType)
{
}
virtual const char * GetStepSound(void) override
{
return "step.gravel";
}
} ;

View File

@ -495,15 +495,6 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac
const char * cBlockHandler::GetStepSound()
{
return "step.stone";
}
bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ, const cChunk & a_Chunk)
{
return true;

View File

@ -84,9 +84,6 @@ public:
*/
virtual void DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_CanDrop = true, bool a_DropVerbatim = false);
/// Returns step sound name of block
virtual const char * GetStepSound(void);
/// Checks if the block can stay at the specified relative coords in the chunk
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk);

View File

@ -15,12 +15,6 @@ public:
: cBlockSidewaysHandler(a_BlockType)
{
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -111,12 +111,6 @@ public:
int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width;
return LadderCanBePlacedAt(a_ChunkInterface, BlockX, a_RelY, BlockZ, BlockFace);
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -112,12 +112,6 @@ public:
DropBlock(a_ChunkInterface, a_WorldInterface, a_PluginInterface, NULL, BlockX, a_RelY, BlockZ);
a_ChunkInterface.DigBlock(a_WorldInterface, BlockX, a_RelY, BlockZ);
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -70,12 +70,6 @@ public:
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
inline static eBlockFace BlockMetaDataToBlockFace(NIBBLETYPE a_Meta)
{
switch (a_Meta & 0x7)

View File

@ -22,12 +22,6 @@ public:
cFastRandom Random;
a_Pickups.push_back(cItem(E_ITEM_MELON_SLICE, (char)(3 + Random.NextInt(5)), 0));
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -50,12 +50,6 @@ public:
}
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -22,11 +22,6 @@ public:
{
a_Pickups.push_back(cItem(E_BLOCK_DIRT, 1, 0));
}
virtual const char * GetStepSound(void) override
{
return "step.gravel";
}
} ;

View File

@ -27,12 +27,6 @@ public:
a_BlockMeta = (NIBBLETYPE)(a_Player->GetEquippedItem().m_ItemDamage);
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -23,12 +23,6 @@ public:
// Always drop the ON torch, meta 0
a_Pickups.push_back(cItem(E_BLOCK_REDSTONE_TORCH_ON, 1, 0));
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -15,12 +15,6 @@ public:
: cBlockHandler(a_BlockType)
{
}
virtual const char * GetStepSound(void) override
{
return "step.sand";
}
};

View File

@ -46,12 +46,6 @@ public:
a_Chunk.SetMeta(a_RelX, a_RelY, a_RelZ, Meta | 0x08);
}
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -65,12 +65,6 @@ public:
}
}
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -85,18 +85,6 @@ public:
return true;
}
virtual const char * GetStepSound(void) override
{
switch (m_BlockType)
{
case E_BLOCK_WOODEN_SLAB: return "step.wood";
case E_BLOCK_STONE_SLAB: return "step.stone";
}
ASSERT(!"Unhandled slab type!");
return "";
}
virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta) override
@ -174,17 +162,6 @@ public:
ASSERT(!"Unhandled double slab type!");
return a_BlockType;
}
virtual const char * GetStepSound(void) override
{
switch (m_BlockType)
{
case E_BLOCK_DOUBLE_STONE_SLAB: return "step.stone";
case E_BLOCK_DOUBLE_WOODEN_SLAB: return "step.wood";
}
ASSERT(!"Unhandled double slab type!");
return "";
}
} ;

View File

@ -87,12 +87,6 @@ public:
{
return false;
}
virtual const char * GetStepSound(void) override
{
return "step.cloth";
}
} ;

View File

@ -55,24 +55,6 @@ public:
}
virtual const char * GetStepSound(void) override
{
if (
(m_BlockType == E_BLOCK_WOODEN_STAIRS) ||
(m_BlockType == E_BLOCK_SPRUCE_WOOD_STAIRS) ||
(m_BlockType == E_BLOCK_JUNGLE_WOOD_STAIRS) ||
(m_BlockType == E_BLOCK_ACACIA_WOOD_STAIRS) ||
(m_BlockType == E_BLOCK_BIRCH_WOOD_STAIRS) ||
(m_BlockType == E_BLOCK_DARK_OAK_WOOD_STAIRS)
)
{
return "step.wood";
}
return "step.stone";
}
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
// Reset meta to zero

View File

@ -47,12 +47,6 @@ public:
{
return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) == E_BLOCK_FARMLAND));
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -78,12 +78,6 @@ public:
{
a_Chunk.GetWorld()->GrowSugarcane(a_RelX + a_Chunk.GetPosX() * cChunkDef::Width, a_RelY, a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width, 1);
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -16,11 +16,6 @@ public:
{
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
{
a_WorldInterface.SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player);

View File

@ -53,12 +53,6 @@ public:
{
return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) != E_BLOCK_AIR));
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
} ;

View File

@ -184,12 +184,6 @@ public:
// Always drop meta = 0
a_Pickups.push_back(cItem(m_BlockType, 1, 0));
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -20,11 +20,6 @@ public:
{
a_Pickups.push_back(cItem(E_ITEM_STRING, 1, 0));
}
virtual const char * GetStepSound(void) override
{
return "";
}
};

View File

@ -70,11 +70,6 @@ public:
return ((a_RelY > 0) && cBlockInfo::FullyOccupiesVoxel(BlockIsOn));
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
};

View File

@ -159,12 +159,6 @@ public:
{
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.grass";
}
virtual bool DoesDropOnUnsuitable(void) override

View File

@ -27,12 +27,6 @@ public:
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
virtual void OnPlacedByPlayer(
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,

View File

@ -30,12 +30,6 @@ public:
{
return true;
}
virtual const char * GetStepSound(void) override
{
return "step.wood";
}
} ;

View File

@ -1448,7 +1448,7 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, e
NewBlock->OnPlacedByPlayer(ChunkInterface, *World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta);
// Step sound with 0.8f pitch is used as block placement sound
World->BroadcastSoundEffect(NewBlock->GetStepSound(), (double)a_BlockX, (double)a_BlockY, (double)a_BlockZ, 1.0f, 0.8f);
World->BroadcastSoundEffect(cBlockInfo::GetPlaceSound(BlockType), (double)a_BlockX, (double)a_BlockY, (double)a_BlockZ, 1.0f, 0.8f);
cRoot::Get()->GetPluginManager()->CallHookPlayerPlacedBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta);
}