From 77337271fc7ab3b767c6832424dc7d82cebd33f4 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 26 Nov 2011 00:55:50 +0200 Subject: [PATCH] Remove give_initial_stuff --- src/content_craft.cpp | 73 ----------------------------------------- src/content_craft.h | 3 -- src/defaultsettings.cpp | 1 - src/server.cpp | 4 --- 4 files changed, 81 deletions(-) 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; -- 2.30.2