Fix give_initial_stuff mod; experimental mod: dug_item -> drop; scriptapi.cpp: drops...
authorKahrl <kahrl@gmx.net>
Sun, 22 Jan 2012 14:57:49 +0000 (15:57 +0100)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 22 Jan 2012 15:31:20 +0000 (17:31 +0200)
data/mods/experimental/init.lua
data/mods/give_initial_stuff/init.lua
src/scriptapi.cpp

index a58d8f08d9f8ce803092223284ee785f5b78fcb1..368295ea7fb35b556974becaa4dff667c14e3966 100644 (file)
@@ -271,7 +271,7 @@ minetest.register_node("experimental:tnt", {
                        "default_tnt_side.png", "default_tnt_side.png"},
        inventory_image = minetest.inventorycube("default_tnt_top.png",
                        "default_tnt_side.png", "default_tnt_side.png"),
-       dug_item = '', -- Get nothing
+       drop = '', -- Get nothing
        material = {
                diggability = "not",
        },
index e52784d64b6001702fa904e39c01f505b4a6d2f6..9cf6b51b55180217e085d92aeaf1a3222389b164 100644 (file)
@@ -2,11 +2,11 @@ minetest.register_on_newplayer(function(player)
        print("on_newplayer")
        if minetest.setting_getbool("give_initial_stuff") then
                print("giving give_initial_stuff to player")
-               player:add_to_inventory('tool "SteelPick" 0')
-               player:add_to_inventory('node "torch" 99')
-               player:add_to_inventory('tool "SteelAxe" 0')
-               player:add_to_inventory('tool "SteelShovel" 0')
-               player:add_to_inventory('node "cobble" 99')
+               player:get_inventory():add_item('main', 'default:pick_steel')
+               player:get_inventory():add_item('main', 'default:torch 99')
+               player:get_inventory():add_item('main', 'default:axe_steel')
+               player:get_inventory():add_item('main', 'default:shovel_steel')
+               player:get_inventory():add_item('main', 'default:cobble 99')
        end
 end)
 
index 173e5a827dfae22f1d978fb91e9b030c2ecd3ca7..5d68793e248a619ab8802cc024860f19b0161c54 100644 (file)
@@ -888,11 +888,11 @@ static ContentFeatures read_content_features(lua_State *L, int index)
        warn_if_field_exists(L, index, "light_propagates",
                        "deprecated: determined from paramtype");
        warn_if_field_exists(L, index, "dug_item",
-                       "deprecated: use 'drops' field");
+                       "deprecated: use 'drop' field");
        warn_if_field_exists(L, index, "extra_dug_item",
-                       "deprecated: use 'drops' field");
+                       "deprecated: use 'drop' field");
        warn_if_field_exists(L, index, "extra_dug_item_rarity",
-                       "deprecated: use 'drops' field");
+                       "deprecated: use 'drop' field");
        
        // True for all ground-like things like stone and mud, false for eg. trees
        getboolfield(L, index, "is_ground_content", f.is_ground_content);