remove crafts

This commit is contained in:
tai 2016-10-29 17:37:24 +01:00
parent 0b56b4c344
commit fdce3368ae
2 changed files with 15 additions and 37 deletions

View File

@ -8,6 +8,13 @@ local chancer = function(hp,difficulty)
return math.floor(1000/hp * hp/(hp*0.4) * difficulty) return math.floor(1000/hp * hp/(hp*0.4) * difficulty)
end end
local sethas = function(needle,haystack)
if type(haystack) == "table" then
return haystack[needle] ~= nil
end
return haystack == needle
end
local capturedef = function(def) local capturedef = function(def)
local handchance = chancer(def.hp,0.2) local handchance = chancer(def.hp,0.2)
local netchance = chancer(def.hp,0.5) local netchance = chancer(def.hp,0.5)
@ -40,9 +47,13 @@ end
local identification = function(self,clicker) local identification = function(self,clicker)
if self.owner and self.owner ~= clicker:get_player_name() then if self.owner and self.owner ~= clicker:get_player_name() then
minetest.chat_send_player(clicker:get_player_name(), if not sethas(clicker:get_wielded_item():get_name(),self.follow) then
"This is a "..self.name..". It eats: "..getfollows(self.follow) minetest.chat_send_player(clicker:get_player_name(),
) "This is a "..self.name..". It eats: "..getfollows(self.follow)
)
else
minetest.chat_send_player(clicker:get_player_name(),"Feeding "..self.name.." ...")
end
end end
return true return true
end end

View File

@ -285,7 +285,7 @@ minetest.register_tool("staffmagic:staff_sending",{
range = 5, range = 5,
stack_max = 1, stack_max = 1,
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
if not staffmagic:staffcheck(user,"staffer") then return end --if not staffmagic:staffcheck(user,"staffer") then return end
if pointed_thing.type ~= "node" then if pointed_thing.type ~= "node" then
if pointed_thing.ref and pointed_thing.ref:is_player() then return end if pointed_thing.ref and pointed_thing.ref:is_player() then return end
if pointed_thing.type == "object" then if pointed_thing.type == "object" then
@ -495,7 +495,6 @@ minetest.register_tool("staffmagic:staff_melt", {
end, end,
}) })
if false then
minetest.register_craft( minetest.register_craft(
{ {
@ -508,27 +507,6 @@ minetest.register_craft(
} }
) )
minetest.register_craft(
{
output = "staffmagic:staff_stack",
recipe = {
{"bucket:bucket_lava","default:diamond","bucket:bucket_lava"},
{"","default:mese_crystal",""},
{"","default:mese_crystal",""},
}
}
)
minetest.register_craft(
{
output = "staffmagic:staff_clone",
recipe = {
{"default:mese_crystal","default:diamondblock","default:mese_crystal"},
{"","default:obsidian_shard",""},
{"","default:obsidian_shard",""},
}
}
)
minetest.register_craft( minetest.register_craft(
{ {
output = "staffmagic:staff_sending", output = "staffmagic:staff_sending",
@ -539,14 +517,3 @@ minetest.register_craft(
} }
} }
) )
minetest.register_craft(
{
output = "staffmagic:staff_boom",
recipe = {
{"default:mese","bucket:bucket_lava","default:mese"},
{"tnt:gunpowder","default:obsidian","tnt:gunpowder"},
{"tnt:gunpowder","default:obsidian","tnt:gunpowder"},
}
}
)
end