Add craft recipe for wand

This commit is contained in:
Jordan Irwin 2021-05-16 10:45:45 -07:00
parent 4c17be1eab
commit 0cee06f0ed
2 changed files with 30 additions and 3 deletions

View File

@ -3,4 +3,4 @@ title = Alter Node
description = Manage node meta data description = Manage node meta data
version = 1.1 version = 1.1
author = Jordan Irwin (AntumDeluge) author = Jordan Irwin (AntumDeluge)
optional_depends = default, technic, simple_protection optional_depends = default, technic, simple_protection, gems, gems_encrustable

View File

@ -226,8 +226,35 @@ core.register_craftitem(alternode.modname .. ":wand", {
else else
core.chat_send_player(pname, "This node is owned by " .. node_owner) core.chat_send_player(pname, "This node is owned by " .. node_owner)
end end
return true
end, end,
}) })
core.register_alias("ownit:wand", alternode.modname .. ":wand") core.register_alias("ownit:wand", alternode.modname .. ":wand")
-- crafting of wand
local wand = {
ing_head = nil,
ing_handle = nil,
}
if core.registered_items["gems_encrustable:aquamarine"] then
wand.ing_head = "gems_encrustable:aquamarine"
elseif core.registered_items["gems:aquamarine"] then
wand.ing_head = "gems:aquamarine"
end
if core.registered_items["gems_encrustable:opal"] then
wand.ing_handle = "gems_encrustable:opal"
elseif core.registered_items["gems:opal"] then
wand.ing_handle = "gems:opal"
end
if wand.ing_head and wand.ing_handle then
core.register_craft({
output = alternode.modname .. ":wand",
recipe = {
{"", "", wand.ing_head},
{"", wand.ing_handle, ""},
{wand.ing_handle, "", ""},
},
})
end