coconut_collection/mods/telephone/init.lua

150 lines
3.7 KiB
Lua

dofile(minetest.get_modpath('telephone')..'/api.lua')
minetest.register_node("telephone:neusonic_kxt2378", {
description = "Neusonic KX-T2378",
tiles = {
"telephone_neusonic_kxt2378.png",
"telephone_neusonic_kxt2378_bottom.png",
"telephone_neusonic_kxt2378_side.png",
"telephone_neusonic_kxt2378_side.png",
"telephone_neusonic_kxt2378_front.png",
"telephone_neusonic_kxt2378_front.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
on_punch = function(pos, node, puncher, pointed_thing)
node.name = "telephone:neusonic_kxt2378_offhook"
minetest.set_node(pos, node)
end,
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, -0.4375, 0.3125, -0.25, 0.4375},
}
}
})
minetest.register_node("telephone:neusonic_kxt2378_offhook", {
description = "Neusonic KX-T2378 (Off Hook)",
tiles = {
"telephone_neusonic_kxt2378_offhook.png",
"telephone_neusonic_kxt2378_bottom.png",
"telephone_neusonic_kxt2378_side.png",
"telephone_neusonic_kxt2378_side.png",
"telephone_neusonic_kxt2378_front.png",
"telephone_neusonic_kxt2378_front.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
on_punch = function(pos, node, puncher, pointed_thing)
node.name = "telephone:neusonic_kxt2378"
minetest.set_node(pos, node)
end,
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, -0.4375, 0.3125, -0.25, 0.4375},
}
}
})
--minetest.register_node("telephone:neusonic_kxt2378mxwd_ringing", {
-- description = "Neusonic KXT-2378MXWD (Ringing)",
--tiles = {"telephone_neusonic_kxt2378mxwd_ringing.png"},
--groups = {cracky = 2},
--on_punch = function(pos, node, puncher, pointed_thing)
-- minetest.set_node({x = pos.x, y = pos.y, z = pos.z}, {name = "telephone:neusonic_kxt2378mxwd_conversation"})
--end,
--})
--Saxom exKanto
minetest.register_node("telephone:saxom_exkanto", {
description = "Saxom eXkanto",
on_punch = function(pos, node, puncher, pointed_thing)
node.name = "telephone:saxom_exkanto_offhook"
minetest.set_node(pos, node)
end,
tiles = {
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_bottom.png",
"telephone_saxom_exkanto.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.375, -0.4375, 0.0625, 0.375, 0.4375, 0.5},
}
}
})
minetest.register_node("telephone:saxom_exkanto_offhook", {
description = "Saxom eXkanto (Off Hook)",
on_punch = function(pos, node, puncher, pointed_thing)
if puncher:get_wielded_item():get_name() == "coconut:nut" then
if puncher:get_wielded_item():get_count() >= 99 then
puncher:set_wielded_item("main:drill")
end
if puncher:get_wielded_item():get_count() >= 20 then
puncher:set_wielded_item("main:pickaxe_tier2")
end
if puncher:get_wielded_item():get_count() >= 8 then
puncher:set_wielded_item("main:pickaxe_steel")
end
if puncher:get_wielded_item():get_count() >= 4 then
puncher:set_wielded_item("main:pickaxe_stone")
end
end
node.name = "telephone:saxom_exkanto"
minetest.set_node(pos, node)
end,
tiles = {
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_side.png",
"telephone_saxom_exkanto_bottom.png",
"telephone_saxom_exkanto_offhook.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.375, -0.4375, 0.0625, 0.375, 0.4375, 0.5},
}
}
})
minetest.register_craftitem("telephone:coin_2", {
description = "2-Golden Coin",
inventory_image = "telephone_coin_2.png",
})