123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- glowstone = glowstone or {}
- glowstone.modpath = minetest.get_modpath("glowstone")
- minetest.register_craftitem("glowstone:glowing_dust", {
- description = "Radiant Dust",
- inventory_image = "glowstone_glowdust.png",
- })
- minetest.register_node("glowstone:luxore", {
- description = "Lux Ore",
- tiles = {"default_stone.png^glowstone_glowore.png"},
- paramtype = "light",
- light_source = 14,
- groups = utility.dig_groups("mineral", {glowmineral = 1}),
- drop = "glowstone:glowing_dust 2",
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- })
- -- Note: this spawns ONLY in the Outback realm!
- -- Silver picks cannot be obtained there (no silver).
- -- Therefore node must drop itself when dug.
- -- Shall have no crafting recipe. Only obtained in the Outback.
- minetest.register_node("glowstone:cobble", {
- description = "Sunstone Deposit",
- tiles = {"glowstone_cobble.png"},
- paramtype = "light",
- light_source = 14,
- groups = utility.dig_groups("mineral", {glowmineral = 1}),
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("glowstone:minerals", {
- description = "Radiant Minerals",
- tiles = {"glowstone_minerals.png"},
- paramtype = "light",
- light_source = 14,
- groups = utility.dig_groups("mineral", {glowmineral = 1}),
- drop = "glowstone:glowing_dust 2",
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- })
- local function walk_glowstone(player)
- local pname = player:get_player_name()
- hb4.delayed_harm({
- name = pname,
- step = 10,
- min = 1,
- max = 2,
- msg = "# Server: <" .. rename.gpn(pname) .. "> was poisoned by glowstone.",
- poison = true,
- })
- end
- local function punch_glowstone(player)
- local pname = player:get_player_name()
- hb4.delayed_harm({
- name = pname,
- step = 3,
- min = 1,
- max = 2,
- msg = "# Server: <" .. rename.gpn(pname) .. "> was poisoned by glowstone.",
- poison = true,
- })
- end
- minetest.register_node("glowstone:glowstone", {
- description = "Toxic Glowstone",
- tiles = {"glowstone_glowstone.png"},
- paramtype = "light",
- light_source = 14,
- groups = utility.dig_groups("mineral", {glowmineral = 1}),
- drop = "glowstone:glowing_dust 2",
- silverpick_drop = true,
- sounds = default.node_sound_stone_defaults(),
- -- Poison players who come into direct contact.
- on_player_walk_over = function(pos, player)
- if not player or not player:is_player() then
- return
- end
- return walk_glowstone(player)
- end,
- on_punch = function(pos, node, puncher, pt)
- if not puncher or not puncher:is_player() then
- return
- end
- return punch_glowstone(puncher)
- end,
- })
- minetest.register_craft({
- output = "glowstone:luxore",
- recipe = {
- {"glowstone:glowing_dust", "default:mossycobble", "glowstone:glowing_dust"},
- },
- })
- minetest.register_craft({
- output = "glowstone:minerals",
- recipe = {
- {"", "rackstone:redrack", "", },
- {"glowstone:glowing_dust", "rackstone:dauthsand", "glowstone:glowing_dust", },
- },
- })
- minetest.register_craft({
- output = "glowstone:glowstone",
- recipe = {
- {"", "rackstone:redrack", "", },
- {"glowstone:glowing_dust", "rackstone:blackrack", "glowstone:glowing_dust", },
- },
- })
- oregen.register_ore({
- ore_type = "scatter",
- ore = "glowstone:luxore",
- wherein = {"default:stone"},
- clust_scarcity = 18*18*18,
- clust_num_ores = 3,
- clust_size = 10,
- y_min = -30000,
- y_max = -1000,
- })
- minetest.register_alias("glowstone:ore", "glowstone:luxore")
- minetest.register_alias("glowstone:block", "glowstone:luxore")
- minetest.register_alias("glowstone:dust", "glowstone:glowing_dust")
- minetest.register_alias("glowrack:magma", "glowstone:glowstone")
- minetest.register_alias("glowrack:minerals", "glowstone:minerals")
|