Longer attack distance. Wooden pick burns.

This commit is contained in:
Andrey 2018-11-10 23:49:42 +02:00
parent 1eec9ddcd1
commit 39d60c6657
4 changed files with 8 additions and 2 deletions

0
LICENSE Executable file → Normal file
View File

0
README.txt Executable file → Normal file
View File

0
depends.txt Executable file → Normal file
View File

10
init.lua Executable file → Normal file
View File

@ -32,7 +32,7 @@ climbing_pick.pick_on_use = function(itemstack, user, pointed_thing)
if user and pt.type == "object" and pt.ref and pt.ref:is_player() then
local pos = user:getpos()
local target_pos = pt.ref:get_pos()
if pos and target_pos and vector.distance(pos, target_pos) < 2 then
if pos and target_pos and vector.distance(pos, target_pos) < 5 then
local tmp_dir = vector.direction(pos, target_pos)
local damage = 1
if math.random(1, 100) > 33 then
@ -59,7 +59,7 @@ climbing_pick.pick_on_use = function(itemstack, user, pointed_thing)
elseif user and pt.type == "object" and pt.ref then
local pos = user:getpos()
local target_pos = pt.ref:get_pos()
if pos and target_pos and vector.distance(pos, target_pos) < 2 then
if pos and target_pos and vector.distance(pos, target_pos) < 5 then
local tmp_dir = vector.direction(pos, target_pos)
local damage = 5
if math.random(1, 100) > 33 then
@ -252,6 +252,12 @@ minetest.register_craft({
},
})
minetest.register_craft({
type = "fuel",
recipe = "climbing_pick:pick_wood",
burntime = 20,
})
minetest.register_craft({
output = "climbing_pick:pick_stone",
recipe = {