Add craft recipe for wand
This commit is contained in:
parent
4c17be1eab
commit
0cee06f0ed
2
mod.conf
2
mod.conf
@ -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
|
||||||
|
31
tools.lua
31
tools.lua
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user