From c057114de2418ad64a19e032d6c3f1f3743e3424 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 14 Jan 2016 19:29:11 +1100 Subject: [PATCH] Blocks that cannot be placed/deleted should still be shown in the inventory, only invalid blocks should be hidden. (Thanks gemsgem) --- ClassicalSharp/2D/Screens/BlockSelectScreen.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ClassicalSharp/2D/Screens/BlockSelectScreen.cs b/ClassicalSharp/2D/Screens/BlockSelectScreen.cs index 89376d11a..69c648e60 100644 --- a/ClassicalSharp/2D/Screens/BlockSelectScreen.cs +++ b/ClassicalSharp/2D/Screens/BlockSelectScreen.cs @@ -197,7 +197,7 @@ namespace ClassicalSharp { void RecreateBlockTable() { int blocksCount = 0; for( int tile = 1; tile < BlockInfo.BlocksCount; tile++ ) { - if( game.Inventory.CanPlace[tile] || game.Inventory.CanDelete[tile] ) + if( tile < BlockInfo.CpeBlocksCount || game.BlockInfo.Name[tile] != "Invalid" ) blocksCount++; } @@ -208,7 +208,7 @@ namespace ClassicalSharp { int tableIndex = 0; for( int tile = 1; tile < BlockInfo.BlocksCount; tile++ ) { - if( game.Inventory.CanPlace[tile] || game.Inventory.CanDelete[tile] ) + if( tile < BlockInfo.CpeBlocksCount || game.BlockInfo.Name[tile] != "Invalid" ) blocksTable[tableIndex++] = (Block)tile; } }