mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 05:42:33 +01:00
bugfix
This commit is contained in:
parent
fa9ff3b851
commit
8f485a6ee2
@ -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
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
@ -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,})
|
||||
|
Loading…
Reference in New Issue
Block a user