From: Perttu Ahola Date: Fri, 25 Nov 2011 22:55:50 +0000 (+0200) Subject: Remove give_initial_stuff X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=77337271fc7ab3b767c6832424dc7d82cebd33f4;p=zefram%2Fminetest%2Fminetest_engine.git Remove give_initial_stuff --- diff --git a/src/content_craft.cpp b/src/content_craft.cpp index 6a5052ee..c34e72a8 100644 --- a/src/content_craft.cpp +++ b/src/content_craft.cpp @@ -124,77 +124,4 @@ void craft_set_creative_inventory(Player *player, IGameDef *gamedef) }*/ } -void craft_give_initial_stuff(Player *player, IGameDef *gamedef) -{ - INodeDefManager *ndef = gamedef->ndef(); - - { - InventoryItem *item = new ToolItem(gamedef, "SteelPick", 0); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new MaterialItem(gamedef, LEGN(ndef, "CONTENT_TORCH"), 99); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new ToolItem(gamedef, "SteelAxe", 0); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new ToolItem(gamedef, "SteelShovel", 0); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new MaterialItem(gamedef, LEGN(ndef, "CONTENT_COBBLE"), 99); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - /*{ - InventoryItem *item = new MaterialItem(gamedef, LEGN(ndef, "CONTENT_MESE"), 6); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new MaterialItem(gamedef, LEGN(ndef, "CONTENT_COALSTONE"), 6); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new MaterialItem(gamedef, LEGN(ndef, "CONTENT_WOOD"), 6); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new CraftItem(gamedef, "Stick", 4); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new ToolItem(gamedef, "WPick", 32000); - void* r = player->inventory.addItem("main", item); - assert(r == NULL); - } - { - InventoryItem *item = new ToolItem(gamedef, "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(gamedef, "Sign Example text"); - bool r = player->inventory.addItem("main", item); - assert(r == true); - }*/ - /*// Give some other stuff - { - InventoryItem *item = new MaterialItem(gamedef, LEGN(ndef, "CONTENT_TREE"), 999); - bool r = player->inventory.addItem("main", item); - assert(r == true); - }*/ -} diff --git a/src/content_craft.h b/src/content_craft.h index e7ff861e..ee59c077 100644 --- a/src/content_craft.h +++ b/src/content_craft.h @@ -26,8 +26,5 @@ class IGameDef; void craft_set_creative_inventory(Player *player, IGameDef *gamedef); -// Called when give_initial_stuff setting is used -void craft_give_initial_stuff(Player *player, IGameDef *gamedef); - #endif diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 20a6dc0a..8cad23dc 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -89,7 +89,6 @@ void set_default_settings(Settings *settings) settings->setDefault("enable_damage", "true"); settings->setDefault("only_peaceful_mobs", "false"); settings->setDefault("fixed_map_seed", ""); - settings->setDefault("give_initial_stuff", "false"); settings->setDefault("default_password", ""); settings->setDefault("default_privs", "build, shout"); diff --git a/src/server.cpp b/src/server.cpp index 7b44b1c0..6cb125aa 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -4647,10 +4647,6 @@ Player *Server::emergePlayer(const char *name, const char *password, u16 peer_id // Set creative inventory craft_set_creative_inventory(player, this); } - else if(g_settings->getBool("give_initial_stuff")) - { - craft_give_initial_stuff(player, this); - } return player;