Fix craftresult_is_preview flood in log and remove unnecessary debug output
authorKahrl <kahrl@gmx.net>
Mon, 23 Jan 2012 14:28:57 +0000 (15:28 +0100)
committerPerttu Ahola <celeron55@gmail.com>
Wed, 25 Jan 2012 18:18:20 +0000 (20:18 +0200)
data/builtin.lua
src/player.cpp

index 2e31c43b86b3c13591486e3e0532f1acfe3862a2..3a38b60ad329209791702b73bd6b56f983d09e14 100644 (file)
@@ -159,7 +159,6 @@ function minetest.get_node_drops(nodename, toolname)
        local drop = ItemStack({name=nodename}):get_definition().drop
        if drop == nil then
                -- default drop
-               print("default drop: " .. nodename)
                return {ItemStack({name=nodename})}
        elseif type(drop) == "string" then
                -- itemstring drop
index 688be5d9890e060d899b3918d4b0d6b5e4163911..6506c43c37293ef9234b6242003ade5cfd054f42 100644 (file)
@@ -156,10 +156,6 @@ void Player::deSerialize(std::istream &is)
        setPitch(args.getFloat("pitch"));
        setYaw(args.getFloat("yaw"));
        setPosition(args.getV3F("position"));
-       bool craftresult_is_preview = true;
-       try{
-               craftresult_is_preview = args.getBool("craftresult_is_preview");
-       }catch(SettingNotFoundException &e){}
        try{
                hp = args.getS32("hp");
        }catch(SettingNotFoundException &e){
@@ -173,6 +169,9 @@ void Player::deSerialize(std::istream &is)
                // Convert players without craftpreview
                inventory.addList("craftpreview", 1);
 
+               bool craftresult_is_preview = true;
+               if(args.exists("craftresult_is_preview"))
+                       craftresult_is_preview = args.getBool("craftresult_is_preview");
                if(craftresult_is_preview)
                {
                        // Clear craftresult