1017 lines
26 KiB
Lua
1017 lines
26 KiB
Lua
local hell_sound = default.node_sound_stone_defaults({
|
|
dig = {name="hell_dig", gain=0.7},
|
|
dug = {name="hell_dug", gain=1},
|
|
footstep = {name="hell_footstep", gain=0.4}
|
|
})
|
|
|
|
local add_fence = minetest.register_fence
|
|
local function add_more_nodes(name)
|
|
local nd = "hell:"..name
|
|
if not string.find(name, "hell") then
|
|
name = "hell_"..name
|
|
end
|
|
local data = minetest.registered_nodes[nd]
|
|
if stairsplus then
|
|
stairsplus:register_all(
|
|
"hell",
|
|
name,
|
|
nd,
|
|
data
|
|
)
|
|
minetest.register_alias("stairs:stair_"..name, "hell"..":stair_"..name)
|
|
minetest.register_alias("stairs:slab_"..name, "hell"..":slab_"..name)
|
|
else
|
|
stairs.register_stair_and_slab(
|
|
name, nd,
|
|
data.groups,
|
|
data.tiles,
|
|
data.description.." Stair",
|
|
data.description.." Slab",
|
|
data.sounds
|
|
)
|
|
end
|
|
if add_fence then
|
|
add_fence({fence_of = nd})
|
|
end
|
|
end
|
|
|
|
--[[
|
|
local function add_fence(name)
|
|
local def = minetest.registered_nodes[name]
|
|
local fencedef = {}
|
|
for _,i in pairs({"walkable", "sunlike_propagates"}) do
|
|
if def[i] ~= nil then
|
|
fencedef[i] = def[i]
|
|
end
|
|
end
|
|
end
|
|
--]]
|
|
|
|
local creative_installed = minetest.global_exists("creative")
|
|
|
|
local function digging_allowed(player, v)
|
|
if not player then
|
|
return false
|
|
end
|
|
if creative_installed and creative.is_enabled_for(player:get_player_name()) then
|
|
return true
|
|
end
|
|
local tool = player:get_wielded_item():get_name()
|
|
tool = minetest.registered_tools[tool] or tool == "" and minetest.registered_items[tool]
|
|
if not tool
|
|
or not tool.tool_capabilities then
|
|
return false
|
|
end
|
|
local groups = tool.tool_capabilities.groupcaps
|
|
if not groups then
|
|
return false
|
|
end
|
|
if groups.hell
|
|
and groups.hell.times[v] then
|
|
return true
|
|
end
|
|
return false
|
|
end
|
|
|
|
-- Hellrack
|
|
minetest.register_node("hell:hellrack", {
|
|
description = "Hellrack",
|
|
tiles = {"hell_hellrack.png"},
|
|
groups = {hell=2},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 2)
|
|
end,
|
|
})
|
|
add_more_nodes("hellrack")
|
|
|
|
minetest.register_node("hell:hellrack_tiled", {
|
|
description = "Tiled Hellrack",
|
|
tiles = {"hell_hellrack_tiled.png"},
|
|
groups = {hell=2},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 2)
|
|
end,
|
|
})
|
|
add_more_nodes("hellrack_tiled")
|
|
|
|
minetest.register_node("hell:hellrack_soil", {
|
|
description = "Dirty Hellrack",
|
|
tiles = {"hell_hellrack.png^hell_hellrack_soil.png"},
|
|
groups = {hell=2},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 2)
|
|
end,
|
|
})
|
|
|
|
minetest.register_node("hell:hellrack_black", {
|
|
description = "Black Hellrack",
|
|
tiles = {"hell_hellrack_black.png"},
|
|
groups = {hell=2},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 2)
|
|
end,
|
|
})
|
|
add_more_nodes("hellrack_black")
|
|
|
|
minetest.register_node("hell:hellrack_blue", {
|
|
description = "Blue Hellrack",
|
|
tiles = {"hell_hellrack_blue.png"},
|
|
groups = {hell=1},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 1)
|
|
end,
|
|
})
|
|
add_more_nodes("hellrack_blue")
|
|
|
|
-- Hellbrick
|
|
minetest.register_node("hell:hellrack_brick", {
|
|
description = "Hellrack Brick",
|
|
tiles = {"hell_hellrack_brick.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
add_more_nodes("hellrack_brick")
|
|
|
|
minetest.register_node("hell:hellrack_brick_blue", {
|
|
description = "Blue Hellrack Brick",
|
|
tiles = {"hell_hellrack_brick_blue.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
add_more_nodes("hellrack_brick_blue")
|
|
|
|
minetest.register_node("hell:hellrack_brick_black", {
|
|
description = "Black Hellrack Brick",
|
|
tiles = {"hell_hellrack_brick_black.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
add_more_nodes("hellrack_brick_black")
|
|
|
|
minetest.register_node("hell:white", {
|
|
description = "Siwtonic block",
|
|
tiles = {"hell_white.png"},
|
|
groups = {hell=1},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 1)
|
|
end,
|
|
})
|
|
add_more_nodes("white")
|
|
|
|
|
|
-- Hell blood
|
|
minetest.register_node("hell:sapling", {
|
|
description = "Hell Blood Child",
|
|
drawtype = "plantlike",
|
|
tiles = {"hell_sapling.png"},
|
|
inventory_image = "hell_sapling.png",
|
|
wield_image = "hell_sapling.png",
|
|
paramtype = "light",
|
|
walkable = false,
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
|
},
|
|
groups = {snappy=2, oddly_breakable_by_hand=2, attached_node=1},
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
})
|
|
|
|
minetest.register_node("hell:blood", {
|
|
description = "Hell Blood",
|
|
tiles = {"hell_blood.png"},
|
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("blood")
|
|
|
|
minetest.register_node("hell:blood_cooked", {
|
|
description = "Cooked Hell Blood",
|
|
tiles = {"hell_blood_cooked.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
furnace_burntime = 10,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
add_more_nodes("blood_cooked")
|
|
|
|
minetest.register_node("hell:blood_empty", {
|
|
description = "Hell Blood Extracted",
|
|
tiles = {"hell_blood_empty.png"},
|
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("blood_empty")
|
|
|
|
|
|
minetest.register_node("hell:blood_top", {
|
|
description = "Hell Blood Head",
|
|
tiles = {"hell_blood_top.png", "hell_blood.png", "hell_blood.png^hell_blood_side.png"},
|
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("blood_top")
|
|
|
|
minetest.register_node("hell:blood_top_cooked", {
|
|
description = "Cooked Hell Blood Head",
|
|
tiles = {"hell_blood_top_cooked.png", "hell_blood_cooked.png", "hell_blood_cooked.png^hell_blood_side_cooked.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
furnace_burntime = 10,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
add_more_nodes("blood_top_cooked")
|
|
|
|
minetest.register_node("hell:blood_top_empty", {
|
|
description = "Hell Blood Head Extracted",
|
|
tiles = {"hell_blood_top_empty.png", "hell_blood_empty.png", "hell_blood_empty.png^hell_blood_side_empty.png"},
|
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("blood_top_empty")
|
|
|
|
|
|
minetest.register_node("hell:blood_stem", {
|
|
description = "Hell Blood Stem",
|
|
tiles = {"hell_blood_stem_top.png", "hell_blood_stem_top.png", "hell_blood_stem.png"},
|
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("blood_stem")
|
|
|
|
minetest.register_node("hell:blood_stem_cooked", {
|
|
description = "Cooked Hell Blood Stem",
|
|
tiles = {"hell_blood_stem_top_cooked.png", "hell_blood_stem_top_cooked.png", "hell_blood_stem_cooked.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
furnace_burntime = 30,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
add_more_nodes("blood_stem_cooked")
|
|
|
|
minetest.register_node("hell:blood_stem_empty", {
|
|
description = "Hell Blood Stem Extracted",
|
|
tiles = {"hell_blood_stem_top_empty.png", "hell_blood_stem_top_empty.png", "hell_blood_stem_empty.png"},
|
|
groups = {tree=1, choppy=2, oddly_breakable_by_hand=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("blood_stem_empty")
|
|
|
|
|
|
minetest.register_node("hell:wood", {
|
|
description = "Hell Blood Wood",
|
|
tiles = {"hell_wood.png"},
|
|
groups = {choppy=2, oddly_breakable_by_hand=2},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("wood")
|
|
|
|
minetest.register_node("hell:wood_cooked", {
|
|
description = "Cooked Hell Blood Wood",
|
|
tiles = {"hell_wood_cooked.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
furnace_burntime = 8,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
add_more_nodes("wood_cooked")
|
|
|
|
minetest.register_node("hell:wood_empty", {
|
|
description = "Hell Wood",
|
|
tiles = {"hell_wood_empty.png"},
|
|
groups = {choppy=2, oddly_breakable_by_hand=2, wood=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("wood_empty")
|
|
|
|
minetest.register_node("hell:extractor", {
|
|
description = "Hell Blood Extractor",
|
|
tiles = {"hell_blood_extractor.png"},
|
|
groups = {hell=3},
|
|
sounds = hell_sound,
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 3)
|
|
end,
|
|
})
|
|
|
|
-- Hell fruit
|
|
minetest.register_node("hell:fruit_leaves", {
|
|
description = "Hell Fruit Leaves",
|
|
tiles = {"hell_fruit_leaves.png"},
|
|
groups = {fleshy=3, dig_immediate=2},
|
|
sounds = default.node_sound_defaults(),
|
|
furnace_burntime = 18,
|
|
})
|
|
add_more_nodes("fruit_leaves")
|
|
|
|
local function room_for_items(inv)
|
|
local free_slots = 0
|
|
for _,i in ipairs(inv:get_list("main")) do
|
|
if i:get_count() == 0 then
|
|
free_slots = free_slots+1
|
|
end
|
|
end
|
|
if free_slots < 2 then
|
|
return false
|
|
end
|
|
return true
|
|
end
|
|
|
|
local drop_mushroom = minetest.registered_nodes["riesenpilz:nether_shroom"].on_drop
|
|
minetest.override_item("riesenpilz:nether_shroom", {
|
|
on_drop = function(itemstack, dropper, pos)
|
|
if dropper:get_player_control().aux1 then
|
|
return drop_mushroom(itemstack, dropper, pos)
|
|
end
|
|
local inv = dropper:get_inventory()
|
|
if not inv then
|
|
return
|
|
end
|
|
if not room_for_items(inv) then
|
|
return
|
|
end
|
|
minetest.sound_play("hell_remove_leaf", {pos = pos, gain = 0.25})
|
|
itemstack:take_item()
|
|
inv:add_item("main", "hell:shroom_head")
|
|
inv:add_item("main", "hell:shroom_stem")
|
|
return itemstack
|
|
end,
|
|
})
|
|
|
|
minetest.register_node("hell:apple", {
|
|
description = "Hell Fruit",
|
|
drawtype = "nodebox",
|
|
tiles = {"hell_fruit_top.png", "hell_fruit_bottom.png", "hell_fruit.png", "hell_fruit.png^[transformFX", "hell_fruit.png^[transformFX", "hell_fruit.png"},
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{-1/6, -1/4, -1/6, 1/6, -1/6, 1/6},
|
|
|
|
{-1/6, -1/6, -1/4, 1/6, 1/6, 1/4},
|
|
{-1/4, -1/6, -1/6, 1/4, 1/6, 1/6},
|
|
|
|
{-1/4, 1/6, -1/12, 1/4, 1/4, 1/12},
|
|
{-1/12, 1/6, -1/4, 1/12, 1/4, 1/4},
|
|
|
|
{-1/6, 1/6, -1/6, 1/6, 1/3, 1/6},
|
|
|
|
{-1/12, 1/3, -1/12, 0, 5/12, 0},
|
|
|
|
{-1/12, 5/12, -1/6, 0, 0.5, 1/12},
|
|
{-1/6, 5/12, -1/12, 1/12, 0.5, 0},
|
|
}
|
|
},
|
|
paramtype = "light",
|
|
groups = {fleshy=3, dig_immediate=3},
|
|
sounds = default.node_sound_defaults(),
|
|
furnace_burntime = 6,
|
|
on_use = minetest.item_eat(-5, "hell:blood_extracted 2"),
|
|
})
|
|
|
|
local drop_fruit = minetest.registered_nodes["hell:apple"].on_drop
|
|
minetest.override_item("hell:apple", {
|
|
on_drop = function(itemstack, dropper, pos)
|
|
if dropper:get_player_control().aux1 then
|
|
return drop_fruit(itemstack, dropper, pos)
|
|
end
|
|
local inv = dropper:get_inventory()
|
|
if not inv then
|
|
return
|
|
end
|
|
if not room_for_items(inv) then
|
|
return
|
|
end
|
|
minetest.sound_play("hell_remove_leaf", {pos = pos, gain = 0.25})
|
|
itemstack:take_item()
|
|
inv:add_item("main", "hell:fruit_leaf")
|
|
inv:add_item("main", "hell:fruit_no_leaf")
|
|
return itemstack
|
|
end,
|
|
})
|
|
|
|
-- Hell vine
|
|
minetest.register_node("hell:vine", {
|
|
description = "Hell vine",
|
|
walkable = false,
|
|
drop = "hell:sapling",
|
|
sunlight_propagates = true,
|
|
paramtype = "light",
|
|
tiles = { "hell_vine.png" },
|
|
drawtype = "plantlike",
|
|
inventory_image = "hell_vine.png",
|
|
groups = { snappy = 3,flammable=2 },
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
after_dig_node = function(pos, _, _, digger)
|
|
if digger then
|
|
local p = {x=pos.x, y=pos.y-1, z=pos.z}
|
|
local nn = minetest.get_node(p)
|
|
if nn.name == "hell:vine" then
|
|
minetest.node_dig(p, nn, digger)
|
|
end
|
|
end
|
|
end
|
|
})
|
|
|
|
|
|
-- forest stuff
|
|
|
|
for n,i in pairs({"small", "middle", "big"}) do
|
|
minetest.register_node("hell:grass_"..i, {
|
|
description = "Hell Grass",
|
|
drawtype = "plantlike",
|
|
waving = 1,
|
|
tiles = {"hell_grass_"..i..".png"},
|
|
inventory_image = "hell_grass_"..i..".png",
|
|
wield_image = "hell_grass_"..i..".png",
|
|
paramtype = "light",
|
|
walkable = false,
|
|
buildable_to = true,
|
|
drop = "hell:grass "..n,
|
|
groups = {snappy=3,flora=1,attached_node=1},
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
},
|
|
})
|
|
end
|
|
|
|
minetest.register_node("hell:glowflower", {
|
|
description = "Glowing Flower",
|
|
drawtype = "plantlike",
|
|
tiles = {"hell_glowflower.png"},
|
|
inventory_image = "hell_glowflower.png",
|
|
wield_image = "hell_glowflower.png",
|
|
sunlight_propagates = true,
|
|
paramtype = "light",
|
|
walkable = false,
|
|
buildable_to = true,
|
|
light_source = 10,
|
|
groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1},
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
},
|
|
})
|
|
|
|
minetest.register_node("hell:tree_sapling", {
|
|
description = "Hell Tree Sapling",
|
|
drawtype = "plantlike",
|
|
tiles = {"hell_tree_sapling.png"},
|
|
inventory_image = "hell_tree_sapling.png",
|
|
wield_image = "hell_tree_sapling.png",
|
|
paramtype = "light",
|
|
walkable = false,
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
|
},
|
|
groups = {snappy=2, oddly_breakable_by_hand=2, attached_node=1},
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
})
|
|
|
|
minetest.register_node("hell:tree", {
|
|
description = "Hell Trunk",
|
|
tiles = {"hell_tree_top.png", "hell_tree_top.png", "hell_tree.png"},
|
|
paramtype2 = "facedir",
|
|
is_ground_content = false,
|
|
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
on_place = minetest.rotate_node
|
|
})
|
|
|
|
minetest.register_node("hell:tree_corner", {
|
|
description = "Hell Trunk Corner",
|
|
tiles = {"hell_tree.png^[transformR180", "hell_tree_top.png", "hell_tree_corner.png^[transformFY",
|
|
"hell_tree_corner.png^[transformR180", "hell_tree.png", "hell_tree_top.png"},
|
|
paramtype2 = "facedir",
|
|
is_ground_content = false,
|
|
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,not_in_creative_inventory=1},
|
|
drop = "hell:tree",
|
|
sounds = default.node_sound_wood_defaults(),
|
|
on_place = minetest.rotate_node
|
|
})
|
|
|
|
minetest.register_node("hell:forest_wood", {
|
|
description = "Hell Wood Block",
|
|
tiles = {"hell_forest_wood.png"},
|
|
groups = {choppy=2,oddly_breakable_by_hand=2,wood=1},
|
|
sounds = default.node_sound_wood_defaults(),
|
|
})
|
|
add_more_nodes("forest_wood")
|
|
|
|
minetest.register_node("hell:leaves", {
|
|
description = "Hell Leaves",
|
|
drawtype = "plantlike",
|
|
waving = 1,
|
|
visual_scale = math.sqrt(2) + 0.01,
|
|
tiles = {"hell_leaves.png"},
|
|
inventory_image = "hell_leaves.png",
|
|
wield_image = "hell_leaves.png",
|
|
paramtype = "light",
|
|
paramtype2 = "degrotate",
|
|
is_ground_content = false,
|
|
groups = {snappy=3, leafdecay=3, leaves=1},
|
|
drop = {
|
|
max_items = 1,
|
|
items = {
|
|
{
|
|
items = {"hell:tree_sapling"},
|
|
rarity = 30,
|
|
},
|
|
{
|
|
items = {"hell:leaves"},
|
|
}
|
|
}
|
|
},
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
})
|
|
|
|
minetest.register_node("hell:dirt", {
|
|
description = "Hell Dirt",
|
|
tiles = {"hell_dirt.png"},
|
|
groups = {crumbly=3,soil=1,hell_dirt=1},
|
|
sounds = default.node_sound_dirt_defaults(),
|
|
})
|
|
|
|
minetest.register_node("hell:dirt_top", {
|
|
description = "Hell Dirt Top",
|
|
tiles = {"hell_dirt_top.png", "hell_dirt.png",
|
|
{name="hell_dirt.png^hell_dirt_top_side.png", tileable_vertical = false}
|
|
},
|
|
groups = {crumbly=3,soil=1,hell_dirt=1},
|
|
drop = "hell:dirt",
|
|
sounds = default.node_sound_dirt_defaults({
|
|
footstep = {name="default_grass_footstep", gain=0.25},
|
|
}),
|
|
})
|
|
|
|
minetest.register_node("hell:dirt_bottom", {
|
|
description = "Hellrack Dirt Transition",
|
|
tiles = {"hell_dirt.png", "hell_hellrack.png",
|
|
{name="hell_hellrack.png^hell_dirt_transition.png", tileable_vertical = false}
|
|
},
|
|
groups = {hell=2},
|
|
drop = "hell:hellrack",
|
|
sounds = default.node_sound_dirt_defaults({
|
|
dig = {name="hell_dig", gain=0.7},
|
|
dug = {name="hell_dug", gain=1},
|
|
}),
|
|
can_dig = function(_, player)
|
|
return digging_allowed(player, 2)
|
|
end,
|
|
})
|
|
|
|
|
|
-- Hell torch
|
|
minetest.register_node("hell:torch", {
|
|
description = "Hell Torch",
|
|
drawtype = "torchlike",
|
|
tiles = {"hell_torch_on_floor.png", "hell_torch_on_ceiling.png",
|
|
{
|
|
name = "hell_torch.png",
|
|
animation = {
|
|
type = "vertical_frames",
|
|
aspect_w = 16,
|
|
aspect_h = 16,
|
|
length = 2.0,
|
|
},
|
|
},
|
|
},
|
|
inventory_image = "hell_torch_on_floor.png",
|
|
wield_image = "hell_torch_on_floor.png",
|
|
paramtype = "light",
|
|
paramtype2 = "wallmounted",
|
|
sunlight_propagates = true,
|
|
walkable = false,
|
|
light_source = 13,
|
|
selection_box = {
|
|
type = "wallmounted",
|
|
wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
|
|
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
|
wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
|
|
},
|
|
groups = {choppy=2, dig_immediate=3, attached_node=1, hot=3, igniter=1},
|
|
legacy_wallmounted = true,
|
|
sounds = default.node_sound_defaults(),
|
|
})
|
|
|
|
local invisible = "hell_transparent.png"
|
|
minetest.register_node("hell:portal", {
|
|
description = "Hell Portal Essence",
|
|
tiles = {invisible, invisible, invisible, invisible, "hell_portal_stuff.png"},
|
|
inventory_image = "hell_portal_stuff.png",
|
|
wield_image = "hell_portal_stuff.png",
|
|
light_source = 12,
|
|
paramtype = "light",
|
|
sunlight_propagates = true,
|
|
use_texture_alpha = true,
|
|
walkable = false,
|
|
pointable = false,
|
|
buildable_to = false,
|
|
drop = "",
|
|
diggable = false,
|
|
groups = {not_in_creative_inventory=1},
|
|
post_effect_color = {a=200, r=50, g=0, b=60},--{a=180, r=128, g=0, b=128}
|
|
drawtype = "nodebox",
|
|
paramtype2 = "facedir",
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{-0.5, -0.5, -0.1, 0.5, 0.5, 0.1},
|
|
},
|
|
},
|
|
})
|
|
|
|
|
|
minetest.register_craftitem("hell:grass", {
|
|
description = "Hell Grass",
|
|
inventory_image = "hell_grass.png",
|
|
})
|
|
|
|
minetest.register_craftitem("hell:grass_dried", {
|
|
description = "Dried Hell Grass",
|
|
inventory_image = "hell_grass_dried.png",
|
|
furnace_burntime = 1,
|
|
})
|
|
|
|
minetest.register_craftitem("hell:forest_planks", {
|
|
description = "Hell Wooden Planks",
|
|
inventory_image = "hell_forest_planks.png",
|
|
stack_max = 990,
|
|
})
|
|
|
|
minetest.register_craftitem("hell:bark", {
|
|
description = "Hell Trunk Bark",
|
|
inventory_image = "hell_bark.png",
|
|
furnace_burntime = 5,
|
|
})
|
|
|
|
-- Hell Pearl
|
|
minetest.register_craftitem("hell:pearl", {
|
|
description = "Hell Pearl",
|
|
inventory_image = "hell_pearl.png",
|
|
})
|
|
|
|
minetest.register_craftitem("hell:stick", {
|
|
description = "Hell Stick",
|
|
inventory_image = "hell_stick.png",
|
|
groups = {stick=1},
|
|
})
|
|
|
|
local tmp = {}
|
|
minetest.register_craftitem("hell:shroom_head", {
|
|
description = "Hell Mushroom Head",
|
|
inventory_image = "hell_shroom_top.png",
|
|
furnace_burntime = 3,
|
|
on_place = function(itemstack, _, pointed_thing)
|
|
if not pointed_thing then
|
|
return
|
|
end
|
|
|
|
if pointed_thing.type ~= "node" then
|
|
return
|
|
end
|
|
|
|
local pos = minetest.get_pointed_thing_position(pointed_thing)
|
|
local node = minetest.get_node(pos)
|
|
local pstr = pos.x.." "..pos.y.." "..pos.z
|
|
|
|
if node.name == "hell:hellrack_soil"
|
|
and not tmp[pstr] then
|
|
minetest.sound_play("default_grass_footstep", {pos=pos})
|
|
minetest.set_node(pos, {name="hell:hellrack_soil", param2=math.max(node.param2, math.random(3, 10))})
|
|
tmp[pstr] = true
|
|
minetest.after(3, function() tmp[pos.x.." "..pos.y.." "..pos.z] = nil end)
|
|
end
|
|
end
|
|
})
|
|
|
|
minetest.register_craftitem("hell:shroom_stem", {
|
|
description = "Hell Mushroom Stem",
|
|
inventory_image = "hell_shroom_stem.png",
|
|
furnace_burntime = 3,
|
|
})
|
|
|
|
minetest.register_craftitem("hell:fruit_leaf", {
|
|
description = "Hell Fruit Leaf",
|
|
inventory_image = "hell_fruit_leaf.png",
|
|
furnace_burntime = 2,
|
|
})
|
|
|
|
minetest.register_craftitem("hell:fruit_no_leaf", {
|
|
description = "Hell Fruit Without Leaf",
|
|
inventory_image = "hell_fruit_no_leaf.png",
|
|
furnace_burntime = 4,
|
|
})
|
|
|
|
minetest.register_craftitem("hell:fim", {
|
|
description = "Hell FIM", --fruit in mushroom
|
|
inventory_image = "hell_fim.png",
|
|
furnace_burntime = 10,
|
|
})
|
|
|
|
local blood_exno = {}
|
|
for _,i in ipairs({"hell:blood", "hell:blood_top", "hell:blood_stem"}) do
|
|
blood_exno[i] = i.."_empty"
|
|
end
|
|
|
|
minetest.register_craftitem("hell:blood_extracted", {
|
|
description = "Blood",
|
|
inventory_image = "hell_blood_extracted.png",
|
|
on_place = function(itemstack, _, pointed_thing)
|
|
if not pointed_thing then
|
|
return
|
|
end
|
|
|
|
if pointed_thing.type ~= "node" then
|
|
return
|
|
end
|
|
|
|
local pos = minetest.get_pointed_thing_position(pointed_thing)
|
|
local node = minetest.get_node_or_nil(pos)
|
|
|
|
if not node then
|
|
return
|
|
end
|
|
|
|
if node.name == "hell:vine" then
|
|
pos = {x=pos.x, y=pos.y-1, z=pos.z}
|
|
if minetest.get_node(pos).name == "air" then
|
|
minetest.set_node(pos, {name = "hell:vine"})
|
|
end
|
|
itemstack:take_item()
|
|
return itemstack
|
|
end
|
|
|
|
if node.name ~= "hell:extractor" then
|
|
return
|
|
end
|
|
itemstack:take_item()
|
|
minetest.after(1, function(pos)
|
|
for i = -1,1,2 do
|
|
for _,p in ipairs({
|
|
{x=pos.x+i, y=pos.y, z=pos.z},
|
|
{x=pos.x, y=pos.y, z=pos.z+i},
|
|
}) do
|
|
local nodename = blood_exno[minetest.get_node(p).name]
|
|
if nodename then
|
|
minetest.set_node(p, {name=nodename})
|
|
p = vector.add(p, {x=math.random()-0.5, y=math.random()+0.5, z=math.random()-0.5})
|
|
minetest.sound_play("hell_extract_blood", {pos = p, gain = 1})
|
|
minetest.add_item(p, "hell:blood_extracted")
|
|
end
|
|
end
|
|
end
|
|
end, pos)
|
|
|
|
return itemstack
|
|
end
|
|
})
|
|
|
|
minetest.register_craftitem("hell:hotbed", {
|
|
description = "Cooked Blood",
|
|
inventory_image = "hell_hotbed.png",
|
|
on_place = function(itemstack, _, pointed_thing)
|
|
if not pointed_thing then
|
|
return
|
|
end
|
|
if pointed_thing.type ~= "node" then
|
|
return
|
|
end
|
|
local pos = minetest.get_pointed_thing_position(pointed_thing)
|
|
local node = minetest.get_node(pos)
|
|
|
|
if node.name ~= "hell:hellrack" then
|
|
return
|
|
end
|
|
|
|
minetest.sound_play("default_place_node", {pos=pos})
|
|
minetest.set_node(pos, {name = "hell:hellrack_soil"})
|
|
|
|
itemstack:take_item()
|
|
return itemstack
|
|
end
|
|
})
|
|
|
|
|
|
minetest.register_tool("hell:pick_mushroom", {
|
|
description = "Hell Mushroom Pickaxe",
|
|
inventory_image = "hell_pick_mushroom.png",
|
|
tool_capabilities = {
|
|
max_drop_level=0,
|
|
groupcaps={
|
|
cracky = {times={[3]=3}, uses=1, maxlevel=1},
|
|
hell = {times={[3]=3}, uses=1, maxlevel=1},
|
|
},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:pick_wood", {
|
|
description = "Hell Wood Pickaxe",
|
|
inventory_image = "hell_pick_wood.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1.2,
|
|
max_drop_level=0,
|
|
groupcaps={
|
|
cracky = {times={[3]=1.6}, uses=10, maxlevel=1},
|
|
hell = {times={[2]=6, [3]=1.6}, uses=10, maxlevel=1},
|
|
},
|
|
damage_groups = {fleshy=2},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:pick_hellrack", {
|
|
description = "Hellrack Pickaxe",
|
|
inventory_image = "hell_pick_hellrack.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1.3,
|
|
max_drop_level=0,
|
|
groupcaps={
|
|
cracky = {times={[2]=2.0, [3]=1.20}, uses=20, maxlevel=1},
|
|
hell = {times={[1]=16, [2]=2, [3]=1.20}, uses=20, maxlevel=1},
|
|
},
|
|
damage_groups = {fleshy=3},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:pick_hellrack_blue", {
|
|
description = "Blue Hellrack Pickaxe",
|
|
inventory_image = "hell_pick_hellrack_blue.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1.0,
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
|
|
hell = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
|
|
},
|
|
damage_groups = {fleshy=4},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:pick_white", {
|
|
description = "Siwtonic Pickaxe",
|
|
inventory_image = "hell_pick_white.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 0.9,
|
|
max_drop_level=3,
|
|
groupcaps={
|
|
cracky = {times={[1]=1, [2]=0.8, [3]=0.3}, uses=180, maxlevel=3},
|
|
hell = {times={[1]=1, [2]=0.5, [3]=0.3}, uses=180, maxlevel=3},
|
|
},
|
|
damage_groups = {fleshy=5},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:axe_hellrack", {
|
|
description = "Hellrack Axe",
|
|
inventory_image = "hell_axe_hellrack.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1.3,
|
|
max_drop_level=0,
|
|
groupcaps={
|
|
choppy={times={[1]=2.9, [2]=1.9, [3]=1.4}, uses=20, maxlevel=1},
|
|
},
|
|
damage_groups = {fleshy=4},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:axe_hellrack_blue", {
|
|
description = "Blue Hellrack Axe",
|
|
inventory_image = "hell_axe_hellrack_blue.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 0.9,
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
choppy={times={[1]=2.5, [2]=1.5, [3]=1}, uses=30, maxlevel=2},
|
|
},
|
|
damage_groups = {fleshy=6},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:axe_white", {
|
|
description = "Siwtonic Axe",
|
|
inventory_image = "hell_axe_white.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 0.9,
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
choppy={times={[1]=1.2, [2]=0.5, [3]=0.3}, uses=180, maxlevel=2},
|
|
},
|
|
damage_groups = {fleshy=8},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:shovel_hellrack", {
|
|
description = "Hellrack Shovel",
|
|
inventory_image = "hell_shovel_hellrack.png",
|
|
wield_image = "hell_shovel_hellrack.png^[transformR90",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1.4,
|
|
max_drop_level=0,
|
|
groupcaps={
|
|
crumbly = {times={[1]=1.7, [2]=1.1, [3]=0.45}, uses=22, maxlevel=2},
|
|
},
|
|
damage_groups = {fleshy=2},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:shovel_hellrack_blue", {
|
|
description = "Blue Hellrack Shovel",
|
|
inventory_image = "hell_shovel_hellrack_blue.png",
|
|
wield_image = "hell_shovel_hellrack_blue.png^[transformR90",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1.1,
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
crumbly = {times={[1]=1.4, [2]=0.8, [3]=0.35}, uses=50, maxlevel=2},
|
|
},
|
|
damage_groups = {fleshy=3},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:shovel_white", {
|
|
description = "Siwtonic Shovel",
|
|
inventory_image = "hell_shovel_white.png",
|
|
wield_image = "hell_shovel_white.png^[transformR90",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1,
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
crumbly = {times={[1]=0.95, [2]=0.45, [3]=0.1}, uses=151, maxlevel=3},
|
|
},
|
|
damage_groups = {fleshy=4},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:sword_hellrack", {
|
|
description = "Hellrack Sword",
|
|
inventory_image = "hell_sword_hellrack.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 1,
|
|
max_drop_level=0,
|
|
groupcaps={
|
|
snappy={times={[2]=1.3, [3]=0.38}, uses=40, maxlevel=1},
|
|
},
|
|
damage_groups = {fleshy=5},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:sword_hellrack_blue", {
|
|
description = "Blue Hellrack Sword",
|
|
inventory_image = "hell_sword_hellrack_blue.png",
|
|
tool_capabilities = {
|
|
full_punch_interval = 0.8,
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
snappy={times={[1]=2.5, [2]=1.1, [3]=0.33}, uses=40, maxlevel=2},
|
|
},
|
|
damage_groups = {fleshy=7},
|
|
},
|
|
})
|
|
|
|
minetest.register_tool("hell:sword_white", {
|
|
description = "Siwtonic Sword",
|
|
inventory_image = "hell_sword_white.png",
|
|
wield_image = "hell_sword_white.png^[transformR90",
|
|
tool_capabilities = {
|
|
full_punch_interval = 0.7,
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
snappy={times={[1]=1.7, [2]=0.8, [3]=0.2}, uses=100, maxlevel=3},
|
|
},
|
|
damage_groups = {fleshy=11},
|
|
},
|
|
})
|
|
|
|
|
|
-- override creative hand
|
|
if minetest.settings:get_bool("creative_mode") then
|
|
local capas = minetest.registered_items[""].tool_capabilities
|
|
capas.groupcaps.hell = capas.groupcaps.cracky
|
|
minetest.override_item("", {tool_capabilities = capas})
|
|
end
|