mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-27 11:10:37 +01:00
Merge branch 'NALC2' into NALC
This commit is contained in:
commit
8abb777026
@ -154,7 +154,21 @@ function add_protected_bukket_liquid(nameofbukket,liquidsourcename)
|
|||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.registered_nodes[n.name].buildable_to then
|
local ndef
|
||||||
|
if n then
|
||||||
|
ndef = minetest.registered_nodes[n.name]
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Call on_rightclick if the pointed node defines it
|
||||||
|
if ndef and ndef.on_rightclick and
|
||||||
|
user and not user:get_player_control().sneak
|
||||||
|
then
|
||||||
|
return ndef.on_rightclick(
|
||||||
|
pointed_thing.under,
|
||||||
|
n, user, itemstack) or itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
if ndef and ndef.buildable_to then
|
||||||
-- buildable; replace the node
|
-- buildable; replace the node
|
||||||
minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.under))
|
minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.under))
|
||||||
minetest.add_node(pointed_thing.under, {name=liquidsourcename})
|
minetest.add_node(pointed_thing.under, {name=liquidsourcename})
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
default
|
default
|
||||||
witchcraft?
|
witchcraft?
|
||||||
|
bones?
|
||||||
|
bonemeal?
|
||||||
|
vessels?
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Change craft recipe of Witchcraft:tooth
|
-- Change some craft recipe of Witchcraft
|
||||||
if minetest.get_modpath("witchcraft") then
|
if minetest.get_modpath("witchcraft") then
|
||||||
|
|
||||||
-- clear crafts with this particular recipe
|
-- clear crafts with this particular recipe
|
||||||
@ -25,4 +25,40 @@ if minetest.get_modpath("witchcraft") then
|
|||||||
{"", "default:sand", ""},
|
{"", "default:sand", ""},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Register craft recipe of bones:bones with bonemeal:bone
|
||||||
|
if minetest.get_modpath("bones")
|
||||||
|
and minetest.get_modpath("bonemeal") and bonemeal
|
||||||
|
then
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "bones:bones",
|
||||||
|
recipe = {
|
||||||
|
{"bonemeal:bone", "bonemeal:bone", "bonemeal:bone"},
|
||||||
|
{"bonemeal:bone", "bonemeal:bone", "bonemeal:bone"},
|
||||||
|
{"bonemeal:bone", "bonemeal:bone", "bonemeal:bone"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Override craft recipe of witchcraft:shelf
|
||||||
|
if minetest.get_modpath("vessels") then
|
||||||
|
minetest.clear_craft(
|
||||||
|
{
|
||||||
|
recipe = {
|
||||||
|
{"group:wood", "group:wood", "group:wood"},
|
||||||
|
{"group:potion", "group:potion", "group:potion"},
|
||||||
|
{"group:wood", "group:wood", "group:wood"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "witchcraft:shelf",
|
||||||
|
recipe = {
|
||||||
|
{"", "group:potion", ""},
|
||||||
|
{"group:potion", "vessels:shelf", "group:potion"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user