bugfix
authorRealBadAngel <mk@realbadangel.pl>
Wed, 6 Mar 2013 20:51:45 +0000 (21:51 +0100)
committerRealBadAngel <mk@realbadangel.pl>
Wed, 6 Mar 2013 20:51:45 +0000 (21:51 +0100)
technic/chainsaw.lua
technic/mining_drill.lua
technic/mining_laser_mk1.lua
technic/sonic_screwdriver.lua

index eb12732301784b8120249ebf6bfd724c917fdc54..2c3fbf5e42b00305569127522f916f70d511e673 100644 (file)
@@ -9,8 +9,8 @@ minetest.register_tool("technic:chainsaw", {
                if pointed_thing.type=="node" then 
                item=itemstack:to_table()
                local meta=get_item_meta(item["metadata"])
-               if meta==nil then return false end --tool not charghed
-               if meta["charge"]==nil then return false end
+               if meta==nil then return end --tool not charghed
+               if meta["charge"]==nil then return end
                charge=meta["charge"]
                charge_to_take=600;
                if charge-charge_to_take>0 then
index ecaab6547fe0032f51dc4de333a3c4ff1aec13df..86c18acc87d89c57b4314a951d6f098ffc4fde5f 100644 (file)
@@ -219,8 +219,8 @@ minetest.register_tool("technic:mining_drill", {
                if pointed_thing.type=="node" then 
                item=itemstack:to_table()
                local meta=get_item_meta(item["metadata"])
-               if meta==nil then return false end --tool not charghed
-               if meta["charge"]==nil then return false end
+               if meta==nil then return end --tool not charghed
+               if meta["charge"]==nil then return end
                charge=meta["charge"]
                if charge-mining_drill_power_usage>0 then
                        charge_to_take=drill_dig_it(minetest.get_pointed_thing_position(pointed_thing, above),user,1,1)
@@ -291,7 +291,7 @@ function mining_drill_mk2_handler (itemstack,user,pointed_thing)
        if meta==nil or keys["sneak"]==true then return mining_drill_mk2_setmode(user,itemstack) end
        if meta["mode"]==nil then return mining_drill_mk2_setmode(user,itemstack) end
        if pointed_thing.type~="node" then return end
-       if meta["charge"]==nil then return false end
+       if meta["charge"]==nil then return end
        charge=meta["charge"]
        if charge-mining_drill_power_usage>0 then
                local charge_to_take=drill_dig_it(minetest.get_pointed_thing_position(pointed_thing, above),user,2,meta["mode"])
@@ -313,7 +313,7 @@ function mining_drill_mk3_handler (itemstack,user,pointed_thing)
        if meta==nil or keys["sneak"]==true then return mining_drill_mk3_setmode(user,itemstack) end
        if meta["mode"]==nil then return mining_drill_mk3_setmode(user,itemstack) end
        if pointed_thing.type~="node" then return end
-       if meta["charge"]==nil then return false end
+       if meta["charge"]==nil then return end
        charge=meta["charge"]
        if charge-mining_drill_power_usage>0 then
                print(dump(meta))
index 87c121da10d2ad08a695b08d10a25412de3d9188..a00af81c8497a854debf5d3e64b1c101eaf0791f 100644 (file)
@@ -57,8 +57,8 @@ minetest.register_tool("technic:laser_mk1", {
        on_use = function(itemstack, user, pointed_thing)
                item=itemstack:to_table()
                local meta=get_item_meta(item["metadata"])
-               if meta==nil then return false end --tool not charghed
-               if meta["charge"]==nil then return false end
+               if meta==nil then return end --tool not charghed
+               if meta["charge"]==nil then return end
                charge=meta["charge"]
                if charge-400>0 then
                 laser_shoot(item, user, pointed_thing)
index ffd2984d1cf43d94081ba8c92d8fcf32945b6241..523b253bf7fb83cda7172d3b4cb63cda9f686501 100644 (file)
@@ -14,8 +14,8 @@ minetest.register_tool("technic:sonic_screwdriver", {
                                        if node.param2==nil  then return end
                                        item=itemstack:to_table()
                                        local meta1=get_item_meta(item["metadata"])
-                                       if meta1==nil then return false end --tool not charghed
-                                       if meta1["charge"]==nil then return false end
+                                       if meta1==nil then return end --tool not charghed
+                                       if meta1["charge"]==nil then return end
                                        charge=meta1["charge"]
                                        if charge-100>0 then
                                                minetest.sound_play("technic_sonic_screwdriver", {pos = pos, gain = 0.3, max_hear_distance = 10,})