Remove give_initial_stuff
authorPerttu Ahola <celeron55@gmail.com>
Fri, 25 Nov 2011 22:55:50 +0000 (00:55 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:52 +0000 (19:13 +0200)
src/content_craft.cpp
src/content_craft.h
src/defaultsettings.cpp
src/server.cpp

index 6a5052eea2e4b2cdc7ffadb4af1e8dc7f2c2edc7..c34e72a8e55f7e17a15900b260c18ede618b98b8 100644 (file)
@@ -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);
-       }*/
-}
 
index e7ff861eb91622dbd139d75f7fa979ea0b99df76..ee59c077b2f898d68123fe15ce64acfabf48a52d 100644 (file)
@@ -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
 
index 20a6dc0a8a71dcc689c2d8e7307a0f276d74b02c..8cad23dcefd9adaf1c106a2aa66051494abfe2be 100644 (file)
@@ -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");
 
index 7b44b1c03ea9b1c10945b2de8f5ec9ae7e7385a2..6cb125aa816d72b8fec3fbcc32b7252c082c2e82 100644 (file)
@@ -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;