123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- --
- -- Bones sign (sellhead)
- --
- minetest.register_node("x_marketplace:sign_wall_bones", {
- description = "Bones Sign - write '/mp sellhead' to sell heads",
- drawtype = "nodebox",
- tiles = {"x_marketplace_sign_wall_bones.png"},
- inventory_image = "x_marketplace_sign_bones.png",
- wield_image = "x_marketplace_sign_bones.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- sunlight_propagates = true,
- is_ground_content = false,
- walkable = false,
- node_box = {
- type = "wallmounted",
- wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
- wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
- wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
- },
- groups = {crumbly = 2},
- sounds = default.node_sound_gravel_defaults(),
- on_construct = function(pos)
- local meta = minetest.get_meta(pos)
- meta:set_string("formspec", "field[text;;${text}]")
- end,
- on_receive_fields = function(pos, formname, fields, sender)
- --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
- local player_name = sender:get_player_name()
- if minetest.is_protected(pos, player_name) then
- minetest.record_protection_violation(pos, player_name)
- return
- end
- local meta = minetest.get_meta(pos)
- if not fields.text then return end
- minetest.log("action", (player_name or "") .. " wrote \"" ..
- fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
- meta:set_string("text", fields.text)
- meta:set_string("infotext", '"' .. fields.text .. '"')
- end,
- })
- --
- -- Mese sign (sell)
- --
- minetest.register_node("x_marketplace:sign_wall_mese", {
- description = "Mese Sign - write '/mp sell' to sell to marketplace",
- drawtype = "nodebox",
- tiles = {"x_marketplace_sign_wall_mese.png"},
- inventory_image = "x_marketplace_sign_mese.png",
- wield_image = "x_marketplace_sign_mese.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- sunlight_propagates = true,
- is_ground_content = false,
- walkable = false,
- node_box = {
- type = "wallmounted",
- wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
- wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
- wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
- },
- groups = {cracky = 1, level = 2},
- sounds = default.node_sound_stone_defaults(),
- on_construct = function(pos)
- local meta = minetest.get_meta(pos)
- meta:set_string("formspec", "field[text;;${text}]")
- end,
- on_receive_fields = function(pos, formname, fields, sender)
- --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
- local player_name = sender:get_player_name()
- if minetest.is_protected(pos, player_name) then
- minetest.record_protection_violation(pos, player_name)
- return
- end
- local meta = minetest.get_meta(pos)
- if not fields.text then return end
- minetest.log("action", (player_name or "") .. " wrote \"" ..
- fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
- meta:set_string("text", fields.text)
- meta:set_string("infotext", '"' .. fields.text .. '"')
- end,
- })
- --
- -- Diamond sign (buy)
- --
- minetest.register_node("x_marketplace:sign_wall_diamond", {
- description = "Diamond Sign - write '/mp buy' to buy from marketplace",
- drawtype = "nodebox",
- tiles = {"x_marketplace_sign_wall_diamond.png"},
- inventory_image = "x_marketplace_sign_diamond.png",
- wield_image = "x_marketplace_sign_diamond.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- sunlight_propagates = true,
- is_ground_content = false,
- walkable = false,
- node_box = {
- type = "wallmounted",
- wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
- wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
- wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
- },
- groups = {cracky = 1, level = 3},
- sounds = default.node_sound_stone_defaults(),
- on_construct = function(pos)
- local meta = minetest.get_meta(pos)
- meta:set_string("formspec", "field[text;;${text}]")
- end,
- on_receive_fields = function(pos, formname, fields, sender)
- --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
- local player_name = sender:get_player_name()
- if minetest.is_protected(pos, player_name) then
- minetest.record_protection_violation(pos, player_name)
- return
- end
- local meta = minetest.get_meta(pos)
- if not fields.text then return end
- minetest.log("action", (player_name or "") .. " wrote \"" ..
- fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
- meta:set_string("text", fields.text)
- meta:set_string("infotext", '"' .. fields.text .. '"')
- end,
- })
- --
- -- CRAFTING
- --
- minetest.register_craft({
- output = "x_marketplace:sign_wall_bones",
- recipe = {
- {"bones:bones", "bones:bones", "bones:bones"},
- {"bones:bones", "bones:bones", "bones:bones"},
- {"", "group:stick", ""},
- }
- })
- minetest.register_craft({
- output = "x_marketplace:sign_wall_mese",
- recipe = {
- {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
- {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
- {"", "group:stick", ""},
- }
- })
- minetest.register_craft({
- output = "x_marketplace:sign_wall_diamond",
- recipe = {
- {"default:diamond", "default:diamond", "default:diamond"},
- {"default:diamond", "default:diamond", "default:diamond"},
- {"", "group:stick", ""},
- }
- })
|