Skip to content

Commit

Permalink
disable slingshot till its fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxionary committed Dec 8, 2019
1 parent 84afcb3 commit d9b414a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,9 @@ hook.slingshot_onuse=function(itemstack, user)
end

minetest.register_tool("hook:slingshot", {
description = "Slingshot",
description = "Slingshot (currently disabled)",
range = 4,
inventory_image = "hook_slingshot.png",
on_use=function(itemstack, user, pointed_thing)
local ref = pointed_thing.ref
if ref and not (ref:get_luaentity() and ref:get_luaentity().name == "__builtin:item") then
hook.punch(user,ref,4)
return itemstack
end
hook.slingshot_onuse(itemstack, user)
return itemstack
end,
on_place=function(itemstack, user, pointed_thing)
local item=itemstack:to_table()
local meta=minetest.deserialize(item["metadata"])
Expand Down Expand Up @@ -498,4 +489,4 @@ minetest.register_craft({
{"","default:steelblock",""},
{"","default:steel_ingot",""},
}
})
})

0 comments on commit d9b414a

Please sign in to comment.