aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Expand)AuthorAge
* fix memory leaks introduced by invalid gettext usagesapier2013-04-07
* replace Server smart pointer with conventional one to gain control over dtor ...sapier2013-04-07
* Add a small optimization to the menu splash and remove a old commentShadowNinja2013-03-30
* Don't load menu textures every framekhonkhortisan2013-03-30
* GUI: Make singleplayer default tab, store selected serverlist, show title of ...PilzAdam2013-03-30
* Add varying levels of precision to TimeTakerkwolekr2013-03-29
* Random guest name and finite liquid checkboxproller2013-03-23
* Add FPS limit to menu cloudsShadowNinja2013-03-17
* build with ogles2 driverproller2013-03-16
* Add cloud menu background by Krisi, configurable with the menu_clouds option.ShadowNinja2013-03-13
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Read server_announce from minetest.conf for GUIPilzAdam2013-02-23
* Added debug log level settingkwolekr2013-02-21
* new auto masterserverproller2013-02-22
* Add Freetype supportIlya Zhuravlev2013-02-14
* Add a list of servers to the "Multiplayer" tabJeija2013-01-21
* Add particlesJeija2013-01-14
* Set proper field background colors in Irrlicht 1.8Perttu Ahola2012-12-06
* Add checkboxes for shaders and on-demand item visual generationobneq2012-12-02
* Added video settings filter options via config file - second try :-)Vanessa Ezekowitz2012-11-09
* Improve build configuration optionsPerttu Ahola2012-07-23
* Optimize headersPerttu Ahola2012-06-17
* Initially split utility.h to multiple files in util/Perttu Ahola2012-06-17
* Fix build error due to DEBUGFILEPerttu Ahola2012-06-16
* Clean up constants.h a bitPerttu Ahola2012-06-16
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Use gettext for more basic user interface stringsPerttu Ahola2012-06-04
* Add better trace peudo-loglevel supportPerttu Ahola2012-05-20
* Allow using --worldname for local game tooPerttu Ahola2012-05-20
* --world listPerttu Ahola2012-05-20
* Support placing a minetest game inside $world/game to allow creating proper a...Perttu Ahola2012-04-08
* Fullscreen, vsync, fullscreen_bpp and fsaa options in the config; fsaa is exp...q662012-04-07
* New world removal GUI codePerttu Ahola2012-03-26
* Make server world selection not brain dead and use gameid 'minetest' instead ...Perttu Ahola2012-03-25
* Add output levels --info and --trace (--verbose is now more verbose)Perttu Ahola2012-03-22
* Flatten share/ and user/ in the source and for the RUN_IN_PLACE buildPerttu Ahola2012-03-20
* Rework directory structurePerttu Ahola2012-03-19
* Create main menu tab "Settings" for client settingsPerttu Ahola2012-03-15
* Add "simple singleplayer mode"; Fix a number of GUI thingsPerttu Ahola2012-03-15
* Save selected tabPerttu Ahola2012-03-15
* Add [new] to world name when supplying a non-existent world on command linePerttu Ahola2012-03-13
* Allow directly supplying world as a parameter, including world.mtPerttu Ahola2012-03-13
* Add confirmation menu and make world deletion possible in GUIPerttu Ahola2012-03-13
* World creation button and dialog and functionalityPerttu Ahola2012-03-13
* Remember selected world by pathPerttu Ahola2012-03-12
* Make finish quicktune and leave it unused (as intended)Perttu Ahola2012-03-12
* Handle certain errors properly when using --goPerttu Ahola2012-03-11
* Use default_game when making a new world using --world without --gameidPerttu Ahola2012-03-11
50'>450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "content_craft.h"
#include "inventory.h"
#include "content_mapnode.h"
#include "player.h"
#include "mapnode.h" // For content_t

/*
	items: actually *items[9]
	return value: allocates a new item, or returns NULL.
*/
InventoryItem *craft_get_result(InventoryItem **items)
{
	// Wood
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_TREE);
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_WOOD, 4);
		}
	}

	// Stick
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		if(checkItemCombination(items, specs))
		{
			return new CraftItem("Stick", 4);
		}
	}

	// Fence
	{
		ItemSpec specs[9];
		specs[3] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[5] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[6] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[8] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_FENCE, 2);
		}
	}

	// Sign
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			//return new MapBlockObjectItem("Sign");
			return new MaterialItem(CONTENT_SIGN_WALL, 1);
		}
	}

	// Torch
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
		specs[3] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_TORCH, 4);
		}
	}

	// Wooden pick
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("WPick", 0);
		}
	}

	// Stone pick
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("STPick", 0);
		}
	}

	// Steel pick
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[1] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[2] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("SteelPick", 0);
		}
	}

	// Mese pick
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_MESE);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_MESE);
		specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_MESE);
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("MesePick", 0);
		}
	}

	// Wooden shovel
	{
		ItemSpec specs[9];
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("WShovel", 0);
		}
	}

	// Stone shovel
	{
		ItemSpec specs[9];
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("STShovel", 0);
		}
	}

	// Steel shovel
	{
		ItemSpec specs[9];
		specs[1] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("SteelShovel", 0);
		}
	}

	// Wooden axe
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("WAxe", 0);
		}
	}

	// Stone axe
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("STAxe", 0);
		}
	}

	// Steel axe
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[1] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[3] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("SteelAxe", 0);
		}
	}

	// Wooden sword
	{
		ItemSpec specs[9];
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("WSword", 0);
		}
	}

	// Stone sword
	{
		ItemSpec specs[9];
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("STSword", 0);
		}
	}

	// Steel sword
	{
		ItemSpec specs[9];
		specs[1] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[4] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		if(checkItemCombination(items, specs))
		{
			return new ToolItem("SteelSword", 0);
		}
	}

	// Rail
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[1] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[2] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[3] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[5] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[6] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
		specs[8] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_RAIL, 15);
		}
	}

	// Chest
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_CHEST, 1);
		}
	}

	// Furnace
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_FURNACE, 1);
		}
	}

	// Steel block
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[1] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[2] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[3] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[4] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[5] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[6] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[7] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		specs[8] = ItemSpec(ITEM_CRAFT, "steel_ingot");
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_STEEL, 1);
		}
	}

	// Sandstone
	{
		ItemSpec specs[9];
		specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
		specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
		specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
		specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_SANDSTONE, 1);
		}
	}

	// Clay
	{
		ItemSpec specs[9];
		specs[3] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
		specs[4] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
		specs[6] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
		specs[7] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_CLAY, 1);
		}
	}

	// Brick
	{
		ItemSpec specs[9];
		specs[3] = ItemSpec(ITEM_CRAFT, "clay_brick");
		specs[4] = ItemSpec(ITEM_CRAFT, "clay_brick");
		specs[6] = ItemSpec(ITEM_CRAFT, "clay_brick");
		specs[7] = ItemSpec(ITEM_CRAFT, "clay_brick");
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_BRICK, 1);
		}
	}

	// Paper
	{
		ItemSpec specs[9];
		specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
		specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
		specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
		if(checkItemCombination(items, specs))
		{
			return new CraftItem("paper", 1);
		}
	}

	// Book
	{
		ItemSpec specs[9];
		specs[1] = ItemSpec(ITEM_CRAFT, "paper");
		specs[4] = ItemSpec(ITEM_CRAFT, "paper");
		specs[7] = ItemSpec(ITEM_CRAFT, "paper");
		if(checkItemCombination(items, specs))
		{
			return new CraftItem("book", 1);
		}
	}

	// Book shelf
	{
		ItemSpec specs[9];
		specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[3] = ItemSpec(ITEM_CRAFT, "book");
		specs[4] = ItemSpec(ITEM_CRAFT, "book");
		specs[5] = ItemSpec(ITEM_CRAFT, "book");
		specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
		if(checkItemCombination(items, specs))
		{
			return new MaterialItem(CONTENT_BOOKSHELF, 1);
		}
	}

	return NULL;
}

void craft_set_creative_inventory(Player *player)
{
	player->resetInventory();
	
	// Give some good tools
	{
		InventoryItem *item = new ToolItem("MesePick", 0);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new ToolItem("SteelPick", 0);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new ToolItem("SteelAxe", 0);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new ToolItem("SteelShovel", 0);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}

	/*
		Give materials
	*/
	
	// CONTENT_IGNORE-terminated list
	content_t material_items[] = {
		CONTENT_TORCH,
		CONTENT_COBBLE,
		CONTENT_MUD,
		CONTENT_STONE,
		CONTENT_SAND,
		CONTENT_SANDSTONE,
		CONTENT_CLAY,
		CONTENT_BRICK,
		CONTENT_TREE,
		CONTENT_LEAVES,
		CONTENT_CACTUS,
		CONTENT_PAPYRUS,
		CONTENT_BOOKSHELF,
		CONTENT_GLASS,
		CONTENT_FENCE,
		CONTENT_RAIL,
		CONTENT_MESE,
		CONTENT_WATERSOURCE,
		CONTENT_CLOUD,
		CONTENT_CHEST,
		CONTENT_FURNACE,
		CONTENT_SIGN_WALL,
		CONTENT_IGNORE
	};
	
	content_t *mip = material_items;
	for(u16 i=0; i<PLAYER_INVENTORY_SIZE; i++)
	{
		if(*mip == CONTENT_IGNORE)
			break;

		InventoryItem *item = new MaterialItem(*mip, 1);
		player->inventory.addItem("main", item);

		mip++;
	}

#if 0
	assert(USEFUL_CONTENT_COUNT <= PLAYER_INVENTORY_SIZE);
	
	// add torch first
	InventoryItem *item = new MaterialItem(CONTENT_TORCH, 1);
	player->inventory.addItem("main", item);
	
	// Then others
	for(u16 i=0; i<USEFUL_CONTENT_COUNT; i++)
	{
		// Skip some materials
		if(i == CONTENT_WATER || i == CONTENT_TORCH
			|| i == CONTENT_COALSTONE)
			continue;

		InventoryItem *item = new MaterialItem(i, 1);
		player->inventory.addItem("main", item);
	}
#endif

	/*// Sign
	{
		InventoryItem *item = new MapBlockObjectItem("Sign Example text");
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}*/
}

void craft_give_initial_stuff(Player *player)
{
	{
		InventoryItem *item = new ToolItem("SteelPick", 0);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new MaterialItem(CONTENT_TORCH, 99);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new ToolItem("SteelAxe", 0);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new ToolItem("SteelShovel", 0);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new MaterialItem(CONTENT_COBBLE, 99);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	/*{
		InventoryItem *item = new MaterialItem(CONTENT_MESE, 6);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new MaterialItem(CONTENT_COALSTONE, 6);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new MaterialItem(CONTENT_WOOD, 6);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new CraftItem("Stick", 4);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new ToolItem("WPick", 32000);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}
	{
		InventoryItem *item = new ToolItem("STPick", 32000);
		void* r = player->inventory.addItem("main", item);
		assert(r == NULL);
	}*/
	/*// and some signs
	for(u16 i=0; i<4; i++)
	{
		InventoryItem *item = new MapBlockObjectItem("Sign Example text");
		bool r = player->inventory.addItem("main", item);
		assert(r == true);
	}*/
	/*// Give some other stuff
	{
		InventoryItem *item = new MaterialItem(CONTENT_TREE, 999);
		bool r = player->inventory.addItem("main", item);
		assert(r == true);
	}*/
}