forked from minetest-mods/technic
Merge pull request #297 from t4im/fix/drill_pointed_thing
Remove reading of undefined global to fix drill drilling pointed_thing.above in combination with other badly coded mods.
This commit is contained in:
commit
05dfc14fdb
|
@ -294,7 +294,7 @@ local function mining_drill_mk2_handler(itemstack, user, pointed_thing)
|
|||
end
|
||||
local charge_to_take = cost_to_use(2, meta.mode)
|
||||
if meta.charge >= charge_to_take then
|
||||
local pos = minetest.get_pointed_thing_position(pointed_thing, above)
|
||||
local pos = minetest.get_pointed_thing_position(pointed_thing, false)
|
||||
drill_dig_it(pos, user, meta.mode)
|
||||
if not technic.creative_mode then
|
||||
meta.charge = meta.charge - charge_to_take
|
||||
|
@ -317,7 +317,7 @@ local function mining_drill_mk3_handler(itemstack, user, pointed_thing)
|
|||
end
|
||||
local charge_to_take = cost_to_use(3, meta.mode)
|
||||
if meta.charge >= charge_to_take then
|
||||
local pos = minetest.get_pointed_thing_position(pointed_thing, above)
|
||||
local pos = minetest.get_pointed_thing_position(pointed_thing, false)
|
||||
drill_dig_it(pos, user, meta.mode)
|
||||
if not technic.creative_mode then
|
||||
meta.charge = meta.charge - charge_to_take
|
||||
|
@ -346,7 +346,7 @@ minetest.register_tool("technic:mining_drill", {
|
|||
end
|
||||
local charge_to_take = cost_to_use(1, 1)
|
||||
if meta.charge >= charge_to_take then
|
||||
local pos = minetest.get_pointed_thing_position(pointed_thing, above)
|
||||
local pos = minetest.get_pointed_thing_position(pointed_thing, false)
|
||||
drill_dig_it(pos, user, 1)
|
||||
if not technic.creative_mode then
|
||||
meta.charge = meta.charge - charge_to_take
|
||||
|
|
Loading…
Reference in New Issue
Block a user