summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-03-06 21:51:45 +0100
committerRealBadAngel <mk@realbadangel.pl>2013-03-06 21:51:45 +0100
commit8f485a6ee2d89f085360a1f3dc3ffd88c2f4aa08 (patch)
tree0f0b377dc0e3a07ba3a8e11e58555ada80aba6d0
parentfa9ff3b851a891e6835ab7c048809bafab32d7e5 (diff)
bugfix
-rw-r--r--technic/chainsaw.lua4
-rw-r--r--technic/mining_drill.lua8
-rw-r--r--technic/mining_laser_mk1.lua4
-rw-r--r--technic/sonic_screwdriver.lua4
4 files changed, 10 insertions, 10 deletions
diff --git a/technic/chainsaw.lua b/technic/chainsaw.lua
index eb12732..2c3fbf5 100644
--- a/technic/chainsaw.lua
+++ b/technic/chainsaw.lua
@@ -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
diff --git a/technic/mining_drill.lua b/technic/mining_drill.lua
index ecaab65..86c18ac 100644
--- a/technic/mining_drill.lua
+++ b/technic/mining_drill.lua
@@ -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))
diff --git a/technic/mining_laser_mk1.lua b/technic/mining_laser_mk1.lua
index 87c121d..a00af81 100644
--- a/technic/mining_laser_mk1.lua
+++ b/technic/mining_laser_mk1.lua
@@ -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)
diff --git a/technic/sonic_screwdriver.lua b/technic/sonic_screwdriver.lua
index ffd2984..523b253 100644
--- a/technic/sonic_screwdriver.lua
+++ b/technic/sonic_screwdriver.lua
@@ -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,})