Exemplo n.º 1
0
        /// <summary> Initialises the default blocks the player is allowed to place and delete. </summary>
        public void SetDefaultPerms(InventoryPermissions place, InventoryPermissions delete)
        {
            for (int block = Block.Stone; block <= Block.MaxDefinedBlock; block++)
            {
                place[block]  = true;
                delete[block] = true;
            }

            place[Block.Lava]       = false; delete[Block.Lava] = false;
            place[Block.Water]      = false; delete[Block.Water] = false;
            place[Block.StillLava]  = false; delete[Block.StillLava] = false;
            place[Block.StillWater] = false; delete[Block.StillWater] = false;
            place[Block.Bedrock]    = false; delete[Block.Bedrock] = false;
        }
Exemplo n.º 2
0
        public void SetDefaultBlockPermissions(InventoryPermissions canPlace, InventoryPermissions canDelete)
        {
            for (int tile = (int)Block.Stone; tile <= (int)Block.Obsidian; tile++)
            {
                canPlace[tile]  = true;
                canDelete[tile] = true;
            }
            canPlace[(int)Block.Lava]       = false;
            canPlace[(int)Block.Water]      = false;
            canPlace[(int)Block.StillLava]  = false;
            canPlace[(int)Block.StillWater] = false;
            canPlace[(int)Block.Bedrock]    = false;

            canDelete[(int)Block.Bedrock]    = false;
            canDelete[(int)Block.Lava]       = false;
            canDelete[(int)Block.Water]      = false;
            canDelete[(int)Block.StillWater] = false;
            canDelete[(int)Block.StillLava]  = false;
        }
Exemplo n.º 3
0
        public void SetDefaultBlockPermissions(InventoryPermissions canPlace, InventoryPermissions canDelete)
        {
            for (int block = Block.Stone; block <= BlockInfo.MaxOriginalBlock; block++)
            {
                canPlace[block]  = true;
                canDelete[block] = true;
            }
            canPlace[Block.Lava]       = false;
            canPlace[Block.Water]      = false;
            canPlace[Block.StillLava]  = false;
            canPlace[Block.StillWater] = false;
            canPlace[Block.Bedrock]    = false;

            canDelete[Block.Bedrock]    = false;
            canDelete[Block.Lava]       = false;
            canDelete[Block.Water]      = false;
            canDelete[Block.StillWater] = false;
            canDelete[Block.StillLava]  = false;
        }
Exemplo n.º 4
0
        public void SetDefaultBlockPermissions( InventoryPermissions canPlace, InventoryPermissions canDelete )
        {
            for( int tile = (int)Block.Stone; tile <= (int)Block.Obsidian; tile++ ) {
                canPlace[tile] = true;
                canDelete[tile] = true;
            }
            canPlace[(int)Block.Grass] = false;
            canPlace[(int)Block.Lava] = false;
            canPlace[(int)Block.Water] = false;
            canPlace[(int)Block.StillLava] = false;
            canPlace[(int)Block.StillWater] = false;
            canPlace[(int)Block.Bedrock] = false;

            canDelete[(int)Block.Bedrock] = false;
            canDelete[(int)Block.Lava] = false;
            canDelete[(int)Block.Water] = false;
            canDelete[(int)Block.StillWater] = false;
            canDelete[(int)Block.StillLava] = false;
        }