summaryrefslogtreecommitdiff
path: root/technic/tools
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-14 00:04:17 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-14 00:04:17 -0400
commit6885943d0491db83268f8bb4743bfd82ed725ea2 (patch)
tree4be2bba618fe67d1b99a99f9aedf1a0f397a9c9c /technic/tools
parenta46f07cbfbd9ae59b7b1cc2fc32f68c39ae34de0 (diff)
downloaddreambuilder_modpack-6885943d0491db83268f8bb4743bfd82ed725ea2.tar
dreambuilder_modpack-6885943d0491db83268f8bb4743bfd82ed725ea2.tar.gz
dreambuilder_modpack-6885943d0491db83268f8bb4743bfd82ed725ea2.tar.bz2
dreambuilder_modpack-6885943d0491db83268f8bb4743bfd82ed725ea2.tar.xz
dreambuilder_modpack-6885943d0491db83268f8bb4743bfd82ed725ea2.zip
update coloredwood, digilines, technic, gloopblocks, homedecor, mesecons,
pipeworks, player_textures, signs_lib, unifieddyes, and worldedit
Diffstat (limited to 'technic/tools')
-rw-r--r--technic/tools/mining_drill.lua26
1 files changed, 13 insertions, 13 deletions
diff --git a/technic/tools/mining_drill.lua b/technic/tools/mining_drill.lua
index 8a25abe..bc426e7 100644
--- a/technic/tools/mining_drill.lua
+++ b/technic/tools/mining_drill.lua
@@ -71,20 +71,21 @@ local function drill_dig_it1 (player)
end
local function drill_dig_it2 (pos,player)
+ pos.y=pos.y+1
drill_dig_it0 (pos,player)
pos.z=pos.z+1
drill_dig_it0 (pos,player)
pos.z=pos.z-2
drill_dig_it0 (pos,player)
pos.z=pos.z+1
- pos.y=pos.y+1
+ pos.y=pos.y-1
drill_dig_it0 (pos,player)
pos.z=pos.z+1
drill_dig_it0 (pos,player)
pos.z=pos.z-2
drill_dig_it0 (pos,player)
pos.z=pos.z+1
- pos.y=pos.y-2
+ pos.y=pos.y-1
drill_dig_it0 (pos,player)
pos.z=pos.z+1
drill_dig_it0 (pos,player)
@@ -93,20 +94,21 @@ local function drill_dig_it2 (pos,player)
end
local function drill_dig_it3 (pos,player)
+ pos.y=pos.y+1
drill_dig_it0 (pos,player)
pos.x=pos.x+1
drill_dig_it0 (pos,player)
pos.x=pos.x-2
drill_dig_it0 (pos,player)
pos.x=pos.x+1
- pos.y=pos.y+1
+ pos.y=pos.y-1
drill_dig_it0 (pos,player)
pos.x=pos.x+1
drill_dig_it0 (pos,player)
pos.x=pos.x-2
drill_dig_it0 (pos,player)
pos.x=pos.x+1
- pos.y=pos.y-2
+ pos.y=pos.y-1
drill_dig_it0 (pos,player)
pos.x=pos.x+1
drill_dig_it0 (pos,player)
@@ -252,10 +254,9 @@ local function mining_drill_mk2_setmode(user,itemstack)
mode=mode+1
if mode>=5 then mode=1 end
minetest.chat_send_player(player_name, S("Mining Drill Mk%d Mode %d"):format(2, mode)..": "..mining_drill_mode_text[mode][1])
- item["name"]="technic:mining_drill_mk2_"..mode
+ itemstack:set_name("technic:mining_drill_mk2_"..mode);
meta["mode"]=mode
- item["metadata"]=minetest.serialize(meta)
- itemstack:replace(item)
+ itemstack:set_metadata(minetest.serialize(meta))
return itemstack
end
@@ -276,10 +277,9 @@ local function mining_drill_mk3_setmode(user,itemstack)
mode=mode+1
if mode>=6 then mode=1 end
minetest.chat_send_player(player_name, S("Mining Drill Mk%d Mode %d"):format(3, mode)..": "..mining_drill_mode_text[mode][1])
- item["name"]="technic:mining_drill_mk3_"..mode
+ itemstack:set_name("technic:mining_drill_mk3_"..mode);
meta["mode"]=mode
- item["metadata"]=minetest.serialize(meta)
- itemstack:replace(item)
+ itemstack:set_metadata(minetest.serialize(meta))
return itemstack
end
@@ -296,7 +296,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
@@ -319,7 +319,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
@@ -348,7 +348,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