fixed climable on ladders before they become ladder
modified hammer texture added 32 and 64 px shaddow textures
This commit is contained in:
parent
19f13ecd07
commit
f7e3fc00c2
52
hammer.lua
52
hammer.lua
@ -14,6 +14,12 @@ minetest.register_tool( "mymasonhammer:hammer",{
|
||||
description = "Mason Hammer",
|
||||
inventory_image = "mymasonhammer_hammer.png",
|
||||
wield_image = "mymasonhammer_hammer.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=3,
|
||||
groupcaps= {
|
||||
cracky={times={[1]=4.00, [2]=1.50, [3]=1.00}, uses=70, maxlevel=1}
|
||||
}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
@ -40,30 +46,34 @@ on_use = function(itemstack, user, pointed_thing)
|
||||
minetest.record_protection_violation(pos, user:get_player_name())
|
||||
return
|
||||
end
|
||||
if mode == "1" then
|
||||
if node.name == item then
|
||||
minetest.set_node(pos,{name = stair, param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
if mode == "1" then
|
||||
local tuse = 1
|
||||
if node.name == item then
|
||||
tuse = 2
|
||||
if tuse == 2 then
|
||||
minetest.set_node(pos,{name = stair, param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if mode == "2" then
|
||||
if node.name == item then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_ladder2", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
elseif node.name == "mymasonhammer:"..mat.."_ladder2" then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_ladder3", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
elseif node.name == "mymasonhammer:"..mat.."_ladder3" then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_ladder", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
if mode == "2" then
|
||||
if node.name == item then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_ladder2", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
elseif node.name == "mymasonhammer:"..mat.."_ladder2" then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_ladder3", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
elseif node.name == "mymasonhammer:"..mat.."_ladder3" then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_ladder", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
if mode == "3" then
|
||||
if node.name == item then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_foot", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
if mode == "3" then
|
||||
if node.name == item then
|
||||
minetest.set_node(pos,{name = "mymasonhammer:"..mat.."_foot", param2=minetest.dir_to_facedir(user:get_look_dir())})
|
||||
parti(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535 / (USES - 1))
|
||||
|
1
init.lua
1
init.lua
@ -1,3 +1,4 @@
|
||||
mycorners = {}
|
||||
dofile(minetest.get_modpath("mymasonhammer").."/hammer.lua")
|
||||
dofile(minetest.get_modpath("mymasonhammer").."/nodes.lua")
|
||||
|
||||
|
@ -60,7 +60,7 @@ minetest.register_node("mymasonhammer:"..mat.."_ladder2", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
climbable = true,
|
||||
--climbable = false,
|
||||
drop = item,
|
||||
groups = gro,
|
||||
node_box = {
|
||||
@ -90,7 +90,7 @@ minetest.register_node("mymasonhammer:"..mat.."_ladder3", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
climbable = true,
|
||||
--climbable = true,
|
||||
drop = item,
|
||||
groups = gro,
|
||||
node_box = {
|
||||
|
BIN
textures/32mymasonhammer_tint.png
Normal file
BIN
textures/32mymasonhammer_tint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 167 B |
BIN
textures/32mymasonhammer_tint2.png
Normal file
BIN
textures/32mymasonhammer_tint2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 185 B |
BIN
textures/64mymasonhammer_tint.png
Normal file
BIN
textures/64mymasonhammer_tint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 207 B |
BIN
textures/64mymasonhammer_tint2.png
Normal file
BIN
textures/64mymasonhammer_tint2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 246 B |
Binary file not shown.
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 362 B |
Loading…
x
Reference in New Issue
Block a user