Remplit le dépôt

This commit is contained in:
Sys Quatre 2020-03-06 11:52:34 +01:00
parent 2904faac51
commit 45e037402e
128 changed files with 3621 additions and 0 deletions

253
crafting.lua Normal file
View File

@ -0,0 +1,253 @@
minetest.register_craft({
output = "hell:fim",
recipe = {
{"hell:shroom_head"},
{"hell:fruit_no_leaf"},
{"hell:shroom_head"},
}
})
minetest.register_craft({
output = "hell:fruit_leaves",
recipe = {
{"hell:fruit_leaf", "hell:fruit_leaf", "hell:fruit_leaf"},
{"hell:fruit_leaf", "hell:fruit_leaf", "hell:fruit_leaf"},
{"hell:fruit_leaf", "hell:fruit_leaf", "hell:fruit_leaf"},
}
})
minetest.register_craft({
output = "hell:pick_mushroom",
recipe = {
{"hell:shroom_head", "hell:shroom_head", "hell:shroom_head"},
{"", "hell:shroom_stem", ""},
{"", "hell:shroom_stem", ""},
}
})
minetest.register_craft({
output = "hell:pick_wood",
recipe = {
{"hell:wood_cooked", "hell:wood_cooked", "hell:wood_cooked"},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
for _,m in pairs({"hellrack", "hellrack_blue", "white"}) do
local input = "hell:"..m
minetest.register_craft({
output = "hell:pick_"..m,
recipe = {
{input, input, input},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = "hell:axe_"..m,
recipe = {
{input, input},
{input, "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = "hell:sword_"..m,
recipe = {
{input},
{input},
{"group:stick"},
}
})
minetest.register_craft({
output = "hell:shovel_"..m,
recipe = {
{input},
{"group:stick"},
{"group:stick"},
}
})
end
minetest.register_craft({
output = "hell:hellrack_brick 4",
recipe = {
{"hell:hellrack", "hell:hellrack"},
{"hell:hellrack", "hell:hellrack"},
}
})
minetest.register_craft({
output = "hell:hellrack_brick_black 4",
recipe = {
{"hell:hellrack_black", "hell:hellrack_black"},
{"hell:hellrack_black", "hell:hellrack_black"},
}
})
minetest.register_craft({
output = "hell:hellrack_brick_blue 4",
recipe = {
{"hell:hellrack_blue", "hell:hellrack_blue"},
{"hell:hellrack_blue", "hell:hellrack_blue"},
}
})
minetest.register_craft({
output = "default:furnace",
recipe = {
{"hell:hellrack_brick", "hell:hellrack_brick", "hell:hellrack_brick"},
{"hell:hellrack_brick", "", "hell:hellrack_brick"},
{"hell:hellrack_brick", "hell:hellrack_brick", "hell:hellrack_brick"},
}
})
minetest.register_craft({
output = "hell:extractor",
recipe = {
{"hell:hellrack_brick", "hell:blood_top_cooked", "hell:hellrack_brick"},
{"hell:blood_cooked", "hell:shroom_stem", "hell:blood_cooked"},
{"hell:hellrack_brick", "hell:blood_stem_cooked", "hell:hellrack_brick"},
}
})
minetest.register_craft({
output = "hell:wood 4",
recipe = {
{"hell:blood_stem"},
}
})
minetest.register_craft({
output = "hell:wood_empty 4",
recipe = {
{"hell:blood_stem_empty"},
}
})
minetest.register_craft({
output = "hell:stick 4",
recipe = {
{"hell:wood_empty"},
}
})
minetest.register_craft({
output = "hell:torch",
recipe = {
{"hell:bark"},
{"group:stick"},
}
})
minetest.register_craft({
output = "hell:forest_wood",
recipe = {
{"hell:forest_planks", "hell:forest_planks", "hell:forest_planks"},
{"hell:forest_planks", "", "hell:forest_planks"},
{"hell:forest_planks", "hell:forest_planks", "hell:forest_planks"},
}
})
minetest.register_craft({
output = "hell:forest_planks 8",
recipe = {
{"hell:forest_wood"},
}
})
minetest.register_craft({
output = "hell:forest_planks 7",
recipe = {
{"hell:tree"},
},
})
local sound_allowed = true
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
if itemstack:get_name() ~= "hell:forest_planks"
or itemstack:get_count() ~= 7 then
return
end
local tree
for i = 1,9 do
if old_craft_grid[i]:get_name() == "hell:tree" then
tree = i
break
end
end
if not tree then -- do nth if theres no tree
return
end
local rdif = math.random(-1,1) -- add a bit randomness
local barkstack = ItemStack("hell:bark "..4-rdif)
local inv = player:get_inventory()
if not inv:room_for_item("main", barkstack) then -- disallow crafting if there's not enough free space
craft_inv:set_list("craft", old_craft_grid)
itemstack:set_name("")
return
end
itemstack:set_count(7+rdif)
inv:add_item("main", barkstack)
if not sound_allowed then -- avoid playing the sound multiple times, e.g. when middle mouse click
return
end
minetest.sound_play("default_wood_footstep", {pos=player:getpos(), gain=0.25})
sound_allowed = false
minetest.after(0, function()
sound_allowed = true
end)
end)
minetest.register_craft({
output = "default:paper",
recipe = {
{"hell:grass_dried", "hell:grass_dried", "hell:grass_dried"},
}
})
minetest.register_craft({
type = "cooking",
output = "default:coal_lump",
recipe = "hell:tree",
})
minetest.register_craft({
type = "cooking",
output = "hell:grass_dried",
recipe = "hell:grass",
})
minetest.register_craft({
type = "cooking",
output = "hell:pearl",
recipe = "hell:fim",
})
minetest.register_craft({
type = "cooking",
output = "hell:hotbed",
recipe = "hell:blood_extracted",
})
for _,i in ipairs({"hell:blood", "hell:blood_top", "hell:blood_stem", "hell:wood"}) do
local cooked = i.."_cooked"
minetest.register_craft({
type = "cooking",
output = cooked,
recipe = i,
})
minetest.register_craft({
type = "fuel",
recipe = cooked,
burntime = 30,
})
end

13
depends.txt Normal file
View File

@ -0,0 +1,13 @@
default
nether
creative?
glow
riesenpilz
stairs
moreblocks?
vector_extras
fence_registration?
function_delayer?
watershed?
darkage
witchcraft

397
guide.lua Normal file
View File

@ -0,0 +1,397 @@
local cube = minetest.inventorycube
-- the content of the guide
local guide_infos = {
{
description = "Mushrooms",
{"text", "Hell mushrooms can be found on the hell's ground and\n"..
"on hellrack soil, it can be dug by hand."},
{"image", {1, 1, "riesenpilz_nether_shroom_side.png"}},
{"y", 0.2},
{"text", "If you drop it without holding the fast key, you can split it into its stem and head:"},
{"image", {1, 1, "hell_shroom_top.png", 1}},
{"image", {1, 1, "hell_shroom_stem.png"}},
{"y", 0.1},
{"text", "You can get more mushrooms by using a hellrack soil:\n"..
"1. search a dark place and, if necessary, place hellrack with air about it\n"..
"2. right click with cooked blood onto the hellrack to make it soiled\n"..
"3. right click onto the hellrack soil with a hell mushroom head to add some spores\n"..
"4. dig the mushroom which grew after some time to make place for another one"},
{"image", {1, 1, "riesenpilz_nether_shroom_side.png", 6, 0.12}},
{"y", 1},
{"image", {1, 1, "hell_hellrack.png^hell_hellrack_soil.png", 1.8}},
{"image", {1, 1, "hell_hotbed.png", 1.3, -0.4}},
{"image", {1, 1, "hell_hellrack.png^hell_hellrack_soil.png", 3.6}},
{"image", {1, 1, "hell_shroom_top.png", 3.1, -0.5}},
{"image", {1, 1, "hell_hellrack.png^hell_hellrack_soil.png", 6}},
{"image", {1, 1, "hell_hellrack.png"}},
},
{
description = "Tools",
{"text", "You can craft 5 kinds of tools in the hell,\n"..
"which (except the mushroom pick) require sticks to be crafted:"},
{"image", {1, 1, "hell_pick_mushroom.png"}},
{"y", 0.1},
{"text", "strength : 1\n"..
"The mushroom pick needs mushroom stems and heads to be crafted."},
{"image", {1, 1, "hell_pick_wood.png"}},
{"y", 0.1},
{"text", "strength : 2\n"..
"The hell wood pick can be crafted with cooked hell blood wood."},
{"image", {1, 1, "hell_axe_hellrack.png", 1.5}},
{"image", {1, 1, "hell_shovel_hellrack.png", 3}},
{"image", {1, 1, "hell_sword_hellrack.png", 4.5}},
{"image", {1, 1, "hell_pick_hellrack.png"}},
{"y", 0.1},
{"text", "strength : 3\n"..
"The red hellrack tools can be crafted with usual hellrack."},
{"image", {1, 1, "hell_axe_hellrack_blue.png", 1.5}},
{"image", {1, 1, "hell_shovel_hellrack_blue.png", 3}},
{"image", {1, 1, "hell_sword_hellrack_blue.png", 4.5}},
{"image", {1, 1, "hell_pick_hellrack_blue.png"}},
{"y", 0.1},
{"text", "strength : 3\n"..
"The blue hellrack tools can be crafted with blue hellrack."},
{"image", {1, 1, "hell_axe_white.png", 1.5}},
{"image", {1, 1, "hell_shovel_white.png", 3}},
{"image", {1, 1, "hell_sword_white.png", 4.5}},
{"image", {1, 1, "hell_pick_white.png"}},
{"y", 0.1},
{"text", "strength : 3\n"..
"The siwtonic tools can be crafted with the siwtonic ore."},
},
{
description = "Blood structures",
{"text", "You can find blood structures on the ground and\n"..
"dig their nodes even with the bare hand."},
{"y", 0.5},
{"text", "One contains 4 kinds of blocks :"},
{"image", {1, 1, cube("hell_blood.png"), 1}},
{"image", {1, 1,
cube("hell_blood_top.png", "hell_blood.png^hell_blood_side.png", "hell_blood.png^hell_blood_side.png"),
2}},
{"image", {1, 1, "hell_fruit.png", 3}},
{"image", {1, 1, cube("hell_blood_stem_top.png", "hell_blood_stem.png", "hell_blood_stem.png")}},
{"y", 0.1},
{"text", "Blood stem, blood, blood head and hell fruit"},
{"y", 0.1},
{"text", "You can craft 4 blood wood with the stem :"},
{"image", {1, 1, cube("hell_wood.png")}},
{"y", 0.1},
{"text", "The 4 blood nodes can be cooked and, except\n"..
"blood wood, their blood can be extracted."},
},
{
description = "Fruits",
{"text", "You can find the hell fruits on blood structures\n"..
"and dig them even with the bare hand."},
{"image", {1, 1, "hell_fruit.png"}},
{"text", "Eating it will make you lose life but\n"..
"it might feed you and give you blood :"},
{"image", {1, 1, "hell_blood_extracted.png"}},
{"y", 0.2},
{"text", "If you eat it at the right place inside a portal,\n"..
"you will teleport instead of getting blood."},
{"y", 0.2},
{"text", "If you drop it without holding the fast key,\n"..
"you can split it into its fruit and leaf:"},
{"image", {1, 1, "hell_fruit_leaf.png", 1}},
{"image", {1, 1, "hell_fruit_no_leaf.png"}},
{"y", 0.2},
{"text", "Craft a fruit leave block out of 9 fruit leaves\n"..
"The fruit can be used to craft a hell pearl."},
{"image", {1, 1, cube("hell_fruit_leaves.png")}},
{"y", 0.2},
{"text", "A fruit leaves block"},
},
{
description = "Cooking",
{"text", "To get a furnace you need to dig at least 8 hellrack bricks.\n"..
"They can be found at pyramid like constructions and require at least\n"..
"a strength 1 hell pick to be dug.\n"..
"To craft the furnace, use the hellrack bricks like cobble:"},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png"), 0.5}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png")}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png")}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png"), 0.5}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png")}},
{"y", 0.2},
{"text", "To begin cooking stuff, you can use a mushroom or fruit.\n"..
"After that it's recommended to use cooked blood nodes."},
{"y", 0.1},
{"text", "Some hell items can be cooked:"},
{"image", {1, 1, cube("hell_blood_stem_top_cooked.png", "hell_blood_stem_cooked.png", "hell_blood_stem_cooked.png"), 0.35}},
{"image", {1, 1, cube("hell_blood_cooked.png"), 1.6}},
{"image", {1, 1,
cube("hell_blood_top_cooked.png", "hell_blood_cooked.png^hell_blood_side_cooked.png", "hell_blood_cooked.png^hell_blood_side_cooked.png"),
2.9}},
{"image", {1, 1, cube("hell_wood_cooked.png"), 4.3}},
{"y", 1.2},
{"text", "Some cooked blood stem, cooked blood,\n"..
"cooked blood head and cooked blood wood,"},
{"image", {1, 1, "hell_hotbed.png", 0.3}},
{"image", {1, 1, "hell_pearl.png", 2}},
{"y", 1.2},
{"text", "Some cooked extracted blood and a hell pearl"},
},
{
description = "Extractors",
{"text", "Here you can find out information about the hell extractor."},
{"y", 0.2},
{"text", "Here you can see its craft recipe:"},
{"image", {0.5, 0.5, cube("hell_blood_top_cooked.png", "hell_blood_cooked.png^hell_blood_side_cooked.png", "hell_blood_cooked.png^hell_blood_side_cooked.png"), 0.5}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png")}},
{"image", {0.5, 0.5, cube("hell_blood_extractor.png"), 2.5}},
{"image", {0.5, 0.5, "hell_shroom_stem.png", 0.5}},
{"image", {0.5, 0.5, cube("hell_blood_cooked.png"), 1}},
{"image", {0.5, 0.5, cube("hell_blood_cooked.png")}},
{"image", {0.5, 0.5, cube("hell_blood_stem_top_cooked.png", "hell_blood_stem_cooked.png", "hell_blood_stem_cooked.png"), 0.5}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("hell_hellrack_brick.png")}},
{"y", 0.2},
{"text", "Extract blood from the blood nodes you get from the blood structures.\n"..
"You can also get blood with a hell fruit."},
{"y", 0.2},
{"text", "So you can use it:\n"..
"1. place it somewhere\n"..
"2. place blood blocks next to it (4 or less)\n"..
"3. right click with extracted blood onto it to power it\n"..
"4. take the new extracted blood and dig the extracted nodes"},
{"y", 0.2},
{"text", "Example (view from the top):"},
{"y", 0.88},
{"image", {1, 1, "hell_blood_stem_top.png", 0.82, -0.88}},
{"image", {1, 1, "hell_blood.png", 1.63}},
{"image", {1, 1, "hell_blood_extractor.png", 0.82}},
{"image", {1, 1, "hell_blood_stem_top_empty.png", 3.82, -0.88}},
{"image", {1, 1, "hell_blood_empty.png", 4.63}},
{"image", {1, 1, "hell_blood_empty.png", 3.001}},
{"image", {1, 1, "hell_blood_extractor.png", 3.82}},
{"image", {1, 1, "hell_blood.png"}},
{"image", {1, 1, "hell_blood.png", 0.82, -0.12}},
{"image", {1, 1, "hell_blood_empty.png", 3.82, -0.12}},
{"y", 1.2},
{"text", "The empty blood stem can be crafted into empty hell wood,\n"..
"which can be crafted into hell sticks."},
},
{
description = "Ores",
{"text", "You can find 5 types of ores:"},
{"image", {1, 1, cube("hell_hellrack_black.png"), 4}},
{"image", {1, 1, cube("hell_hellrack.png")}},
{"y", 0.2},
{"text", "The red hellrack is generated like stone.\n"..
"The black hellrack is generated like gravel.\n"..
"Both require at least a strength 2 hell pick to be dug."},
{"image", {1, 1, cube("hell_white.png"), 4}},
{"image", {1, 1, cube("hell_hellrack_blue.png")}},
{"y", 0.2},
{"text", "The blue hellrack is generated like diamond ore.\n"..
"The siwtonic ore is generated like mese blocks.\n"..
"Both require at least a strength 3 hell pick to be dug."},
{"image", {1, 1, cube("hell_hellrack_tiled.png"), 4}},
{"image", {1, 1, cube("glow_stone.png")}},
{"y", 0.2},
{"text", "Glow stone can be used for lighting.\n"..
"Tiled hellrack is generated like coal ore.\n"..
"Glow stone requires at least a strength 1 pick to be dug.\n"..
"Dig tiled hellrack with at least a level 2 pickaxe."},
},
{
description = "Vines",
{"text", "Feed hell vines with blood.\n"..
"Dig them with anything."},
{"image", {1, 1, "hell_vine.png"}},
{"y", 0.2},
{"text", "Grow hell child by placing\n"..
"placing it to a dark place onto a\n"..
"blood structure head node."},
{"image", {1, 1, "hell_sapling.png"}},
{"y", -0.10},
{"image", {1, 1, "hell_blood.png^hell_blood_side.png"}},
},
{
description = "Pearls",
{"text", "The hell pearl can be used to teleport by throwing it.\n"..
"Here is how to get one :"},
{"y", 0.2},
{"text", "First of all craft 2 mushroom heads and 1 hell fruit\n"..
"without leaf together :"},
{"image", {1, 1, "hell_shroom_top.png"}},
{"image", {1, 1, "hell_fim.png", 3}},
{"image", {1, 1, "hell_fruit_no_leaf.png"}},
{"image", {1, 1, "hell_shroom_top.png"}},
{"y", 0.2},
{"text", "Put the result into the furnace\n"..
"to cook it into a hell pearl :"},
{"image", {1, 1, "hell_pearl.png"}},
},
{
description = "Bricks",
{"text", "Craft bricks out of red,\n"..
"black and blue hellrack."},
{"image", {1, 1, cube("hell_hellrack_brick_black.png"), 1}},
{"image", {1, 1, cube("hell_hellrack_brick_blue.png"), 2}},
{"image", {1, 1, cube("hell_hellrack_brick.png")}},
{"y", 0.4},
{"text", "Dig them with at least a level 1 pickaxe."},
{"y", 0.2},
},
{
description = "Portals",
{"text", "Here you can find out how to built the hell portal."},
{"y", 0.3},
{"text", "A hell portal requires following nodes:"},
{"y", 0.05},
{"text", "25 empty hell wooden planks\n"..
"16 black hellrack\n"..
"12 blue hellrack bricks\n"..
"8 red hellrack\n"..
"8 cooked hell blood\n"..
"4 hell fruits\n"..
"2 siwtonic blocks"},
{"y", 0.2},
{"text", "It should look approximately like this one:"},
{"image", {5.625, 6, "hell_teleporter.png", 0, -1.5}},
{"y", 5.5},
{"text", "Activate it by standing in the middle,\n"..
"on the siwtonic block and eating a hell fruit.\n"..
"Take enough stuff with you to build a portal when you'll come back."},
},
{
description = "Forests",
{"text", "The hell forest is generated in caves,\n"..
"above the usual hell."},
{"y", 0.2},
{"text", "There you can find some plants:"},
{"image", {1, 1, "hell_grass_middle.png", 1}},
{"image", {1, 1, "hell_grass_big.png", 2}},
{"image", {1, 1, "hell_grass_small.png"}},
{"y", 0.2},
{"text", "Use the hell forest grass to get paper.\n"..
"Craft paper out of the dried grass."},
{"image", {1, 1, cube("hell_tree_top.png", "hell_tree.png", "hell_tree.png")}},
{"y", 0.2},
{"text", "Hell trunks can be found at hell trees.\n"..
"Craft hell wood out of hell trunk."},
{"image", {1, 1, "hell_glowflower.png"}},
{"y", 0.2},
{"text", "Use it for lighting and decoration."},
},
}
-- the size of guide pages
local guide_size = {x=40, y=10, cx=0.2, cy=0.2}
-- informations about settings and ...
local formspec_offset = {x=0.25, y=0.50}
local font_size
if minetest.is_singleplayer() then
font_size = tonumber(minetest.settings:get("font_size")) or 13
else
font_size = 13
end
guide_size.fx = math.floor((40*(guide_size.cx+formspec_offset.x))*font_size)
guide_size.fy = font_size/40
-- the default guide formspecs
local guide_forms = {
contents = "size[3.6,"..(#guide_infos)-2 ..";]label["..guide_size.cx+0.7 ..","..guide_size.cy+0.2 ..";Contents:]",
}
-- change the infos to formspecs
for n,data in ipairs(guide_infos) do
local form = ""
local y = 0
local x = guide_size.cx
for _,i in ipairs(data) do
local typ, content = unpack(i)
if typ == "y" then
y = y+content
elseif typ == "x" then
x = math.max(x, content)
elseif typ == "text" then
local tab = minetest.wrap_text(content, guide_size.fx, true)
local l = guide_size.cx
for _,str in ipairs(tab) do
form = form.."label["..guide_size.cx ..","..guide_size.cy+y..";"..str.."]"
y = y+guide_size.fy
l = math.max(l, #str)
end
x = math.max(x, l/font_size)
elseif typ == "image" then
local w, h, texture_name, px, py = unpack(content)
if not px then
form = form.."image["..guide_size.cx..","..guide_size.cy+y+h*0.3 ..";"..w..","..h..";"..texture_name.."]"
y = y+h
else
px = guide_size.cx+px
py = py or 0
form = form.."image["..px..","..
guide_size.cy+y+h*0.3+py ..";"..w..","..h..";"..texture_name.."]"
x = math.max(x, px+w)
end
end
end
form = "size["..x*1.8 ..","..y+1 ..";]"..form.."button["..x/2-0.5 ..","..y ..";1,2;quit;Back]"
guide_forms[n] = {data.description, form}
end
local desc_tab = {}
for n,i in ipairs(guide_forms) do
desc_tab[i[1]] = n
end
-- creates contents formspec
local y = 0
for y,i in ipairs(guide_forms) do
local desc, form = unpack(i)
local s = #desc*1.3/font_size+1.5
guide_forms.contents = guide_forms.contents.."button["..guide_size.cx*12/s-0.5 ..","..guide_size.cy+y/1.3 ..";"..s..",1;name;"..desc.."]"
end
-- shows the contents of the formspec
local function show_guide(pname)
minetest.show_formspec(pname, "hell_guide_contents", guide_forms["contents"])
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname == "hell_guide_contents" then
local fname = fields.name
local pname = player:get_player_name()
if fname
and pname then
minetest.show_formspec(pname, "hell_guide", guide_forms[desc_tab[fname]][2])
end
elseif formname == "hell_guide" then
local fname = fields.quit
local pname = player:get_player_name()
if fname
and pname then
minetest.show_formspec(pname, "hell_guide_contents", guide_forms["contents"])
end
end
end)
minetest.register_chatcommand("hell_help", {
params = "",
description = "Shows a hell guide",
func = function(name)
local player = minetest.get_player_by_name(name)
if not player then
minetest.chat_send_player(name, "Something went wrong.")
return false
end
if player:getpos().y > hell.start then
minetest.chat_send_player(name, "Usually you don't neet this guide here. You can view it in the hell.")
return false
end
minetest.chat_send_player(name, "Showing guide...")
show_guide(name)
return true
end
})

1044
hell.lua Normal file

File diff suppressed because it is too large Load Diff

35
init.lua Normal file
View File

@ -0,0 +1,35 @@
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator("hell")
else
-- mock the translator function for MT 0.4
S = function(str, ...)
local args={...}
return str:gsub(
"@%d+",
function(match) return args[tonumber(match:sub(2))] end
)
end
end
-- Global Hell namespace
hell = {}
hell.modname = minetest.get_current_modname()
hell.path = minetest.get_modpath(hell.modname)
hell.get_translator = S
-- Settings
hell.DEPTH = -20000 -- The y location of the Hell
hell.FASTTRAVEL_FACTOR = 10 -- 10 could be better value for Minetest, since there's no sprint, but ex-Minecraft players will be mathing for 8
hell.HELL_REALM_ENABLED = true -- Setting to false disables the Hell and Hell portal
-- Override default settings with values from the .conf file, if any are present.
hell.FASTTRAVEL_FACTOR = tonumber(minetest.settings:get("hell_fasttravel_factor") or hell.FASTTRAVEL_FACTOR)
hell.HELL_REALM_ENABLED = minetest.settings:get_bool("hell_realm_enabled", hell.HELL_REALM_ENABLED) or hell.HELL_REALM_ENABLED
-- Load files
if hell.HELL_REALM_ENABLED then
dofile(hell.path .. "/hell.lua")
end

1016
items.lua Normal file

File diff suppressed because it is too large Load Diff

8
locale/hell.fr.tr Normal file
View File

@ -0,0 +1,8 @@
# textdomain: hell
For any reason you arrived here. Type /hell_help to find out things like craft recipes.=Peu importe la raison, vous vous retrouvez ici. Entrez /hell_help pour trouver quoi faire comme des recettes de craft.
Hell Gate=Porte de l'Enfer
Construction requires 16 blocks of ??. The finished frame must be in the shape of a circle and laid vertically, like a door.=La construction requiert 16 blocks de ??. Le cadre fini doit être en forme de cercle et posé verticalement, comme une porte.
However, I never knew what material to use for building this door despite my many attempts.=Par contre je n'ai jamais su quels matériaux utiliser pour construire cette porte malgré mes multiples essaies.
One day, however, I met an old lady who frankly looked like a witch. In the course of our discussion we came to talk about the Hell Gate. This old lady confessed to me that in her family there was a legend that one of her ancestors had managed to activate the portal. But that the poor man was instantly killed as he passed through it. The gate was destroyed and several years passed. But since a certain night, the poor widow of the deceased began to rave that her Husband had come back from the dead to take her also to hell because he said that he had made this world a wonderful place and that after several years, he would have found a way to come back and return to it as he wished without causing death. A few days later, the widow disappeared without a trace. Since then the house was destroyed in a fire with all the secrets it could hold. Only an old cauldron remained amidst the ashes.=Un jour cependant, je fis la rencontre d'une vielle dame qui franchement avait l'allure d'une sorcière. Au cours de notre discussion nous en vîmes à parler de la Porte de l'Enfer. Cette vieille dame me confessa que dans sa famille se perpétuait une légende selon laquelle un de ses ancêtres serait parvenu à activer le portail. Mais que le pauvre homme fût instantanément tué en le traversant. Le portail fût détruit et plusieurs années ont passées. Mais depuis une certaine nuit, la pauvre veuve du défunt se mit à délirer en affirmant que son Mari était revenue d'entre les morts pour l'emmener elle aussi en enfer car il disait qu'il avait fait de ce monde un endroit merveilleux et qu'après plusieurs années, il aurait découvert un moyen d'en revenir et d'y retourner à sa guise sans provoquer la mort. Quelques jours après, la veuve disparu sans laisser de traces. Depuis la maison fût détruite dans un incendie avec tous les secrets qu'elle pouvait renfermer. Il ne resta qu'un vieux chaudron au milieux des cendres.
When I wanted to ask the old lady with what material the gate was made, she stared at me with eyes so black that I had the impression that the Nether wanted to take over me, and I did not insist any further.=En voulant questionner la vielle dame de quelle matière le portail était fait, elle me fixa du regard avec des yeux si noirs que j'avais l'impression que les Bas-Fonds voulaient s'emparer de moi et je n'insista pas plus.
You shall not pass!=Vous ne passerez pas !

8
locale/template.txt Normal file
View File

@ -0,0 +1,8 @@
# textdomain: hell
For any reason you arrived here. Type /hell_help to find out things like craft recipes.=
Hell Gate=
Construction requires 16 blocks of ??. The finished frame must be in the shape of a circle and laid vertically, like a door.=
However, I never knew what material to use for building this door despite my many attempts.=
One day, however, I met an old lady who frankly looked like a witch. In the course of our discussion we came to talk about the Hell Gate. This old lady confessed to me that in her family there was a legend that one of her ancestors had managed to activate the portal. But that the poor man was instantly killed as he passed through it. The gate was destroyed and several years passed. But since a certain night, the poor widow of the deceased began to rave that her Husband had come back from the dead to take her also to hell because he said that he had made this world a wonderful place and that after several years, he would have found a way to come back and return to it as he wished without causing death. A few days later, the widow disappeared without a trace. Since then the house was destroyed in a fire with all the secrets it could hold. Only an old cauldron remained amidst the ashes.=
When I wanted to ask the old lady with what material the gate was made, she stared at me with eyes so black that I had the impression that the Nether wanted to take over me, and I did not insist any further.=
You shall not pass!=

198
pearl.lua Normal file
View File

@ -0,0 +1,198 @@
local function table_contains(t, v)
for _,i in pairs(t) do
if v == i then
return true
end
end
return false
end
local creative = minetest.settings:get_bool("creative_mode")
local function throw_pearl(item, player)
local playerpos = player:getpos()
playerpos.y = playerpos.y+1.625
local obj = minetest.add_entity(playerpos, "hell:pearl_entity")
local dir = player:get_look_dir()
obj:setvelocity(vector.multiply(dir, 30))
obj:setacceleration({x=dir.x*-3, y=-dir.y^8*80-10, z=dir.z*-3})
obj:get_luaentity().player = player:get_player_name()
if not creative then
item:take_item()
return item
end
end
local function get_node(pos)
local name = minetest.get_node(pos).name
if name ~= "ignore" then
return name
end
minetest.get_voxel_manip():read_from_map(pos, pos)
name = minetest.get_node_or_nil(pos)
if not name then
return
end
return name.name
end
local softs = {}
local function is_soft(pos)
local name = get_node(pos)
if not name then
return false
end
local is_soft = softs[name]
if is_soft ~= nil then
return is_soft
end
if not minetest.registered_nodes[name] then
softs[name] = false
return false
end
is_soft = minetest.registered_nodes[name].walkable == false
softs[name] = is_soft
return is_soft
end
-- teleports the player there if there's free space
local function teleport_player(pos, player)
if not is_soft(pos) then
return false
end
if not is_soft({x=pos.x, y=pos.y+1, z=pos.z})
and not is_soft({x=pos.x, y=pos.y-1, z=pos.z}) then
return false
end
pos.y = pos.y+0.05
player:moveto(pos)
return true
end
--[[
local dg_ps = {}
local function forceload(pos)
dg_ps[#dg_ps+1] = pos
minetest.forceload_block(pos)
minetest.after(5, function(pos)
minetest.forceload_free_block(pos)
for i,p in pairs(dg_ps) do
if vector.equals(p, pos) then
dg_ps[i] = nil
return
end
end
end, pos)
end
minetest.register_on_shutdown(function()
for _,p in pairs(dg_ps) do
minetest.forceload_free_block(p)
end
end)--]]
minetest.register_entity("hell:pearl_entity", {
collisionbox = {0,0,0,0,0,0}, --not pointable
visual_size = {x=0.1, y=0.1},
physical = false, -- Collides with things
textures = {"hell_pearl.png"},
on_activate = function(self, staticdata)
if not staticdata
or staticdata == "" then
return
end
local tmp = minetest.deserialize(staticdata)
if not tmp then
minetest.log("error", "[hell] pearl: invalid staticdata ")
return
end
self.player = tmp.player
end,
get_staticdata = function(self)
--forceload(vector.round(self.object:getpos()))
return minetest.serialize({
player = self.player,
})
end,
timer = 0,
on_step = function(self, dtime)
self.timer = self.timer+dtime
--[[
local delay = self.delay
if delay < 0.1 then
self.delay = delay+dtime
return
end
self.delay = 0--]]
if self.timer > 20 then
self.object:remove()
return
end
local pos = self.object:getpos()
local rpos = vector.round(pos)
local lastpos = self.lastpos
if not lastpos then
self.lastpos = vector.new(rpos)
return
end
if lastpos.x
and vector.equals(vector.round(lastpos), rpos) then
return
end
local player = self.player
if not player then
minetest.log("error", "[hell] pearl: missing playername")
self.object:remove()
return
end
player = minetest.get_player_by_name(player)
if not player then
minetest.log("error", "[hell] pearl: missing player")
self.object:remove()
return
end
if not get_node(rpos) then
minetest.log("error", "[hell] pearl: missing node")
self.object:remove()
return
end
self.lastpos = vector.new(pos)
local free, p = minetest.line_of_sight(lastpos, pos)
if free then
return
end
if is_soft(p) then
return
end
self.object:remove()
minetest.after(0, function(p) --minetest.after is used that the sound is played after the teleportation
minetest.sound_play("hell_pearl", {pos=p, max_hear_distance=10})
end, p)
p.y = p.y+1
if teleport_player(vector.new(p), player) then
return
end
p.y = p.y-2
for i = -1,1,2 do
for _,j in pairs({{i, 0}, {0, i}}) do
if teleport_player({x=p.x+j[1], y=p.y, z=p.z+j[2]}, player) then
return
end
end
end
for i = -1,1,2 do
for j = -1,1,2 do
if teleport_player({x=p.x+j, y=p.y, z=p.z+i}, player) then
return
end
end
end
end
})
minetest.override_item("hell:pearl", {on_use = throw_pearl})

561
portal.lua Normal file
View File

@ -0,0 +1,561 @@
--code copied from Pilzadam's nether mod and edited
local S = hell.get_translator
-- kills the player if he uses PilzAdam portal
local portal_target = hell.buildings+1
local hell_prisons = minetest.settings:get_bool("enable_damage")
local obsidian_portal_kills = hell_prisons and true
local mclike_portal = false
local save_path = minetest.get_worldpath() .. "/hell_players"
local players_in_hell = {}
-- only get info from file if hell prisons
if hell_prisons then
local file = io.open(save_path, "r")
if file then
local contents = file:read("*all")
io.close(file)
if contents then
local playernames = string.split(contents, " ")
for i = 1,#playernames do
players_in_hell[playernames[i]] = true
end
end
end
end
local function save_hell_players()
local playernames,n = {},1
for name in pairs(players_in_hell) do
playernames[n] = name
n = n+1
end
local f = io.open(save_path, "w")
assert(f, "Could not open hell_players file for writing.")
f:write(table.concat(playernames, " "))
io.close(f)
end
local update_background
if hell_prisons then
function update_background(player, down)
if down then
player:set_sky({r=15, g=0, b=0}, "plain")
else
player:set_sky(nil, "regular")
end
end
else
function update_background() end
end
-- returns nodename if area is generated, else calls generation function
local function generated_or_generate(pos)
local node = minetest.get_node_or_nil(pos)
if node then
return node.name
end
minetest.get_voxel_manip():read_from_map(pos, pos)
node = minetest.get_node_or_nil(pos)
if not node then
minetest.emerge_area(vector.subtract(pos, 80), vector.add(pos, 80))
return false
end
return node.name
end
-- where the player appears after dying
local function get_player_died_target(player)
local target = vector.add(player:get_pos(),
{x=math.random(-100,100), y=0, z=math.random(-100,100)})
target.y = portal_target + math.random(4)
return target
end
-- used for obsidian portal
local function obsidian_teleport(player, pname, target)
minetest.chat_send_player(pname, S("For any reason you arrived here. Type /hell_help to find out things like craft recipes."))
players_in_hell[pname] = true
save_hell_players()
update_background(player, true)
if target then
player:set_pos(target)
else
player:set_hp(0)
end
end
-- teleports players to hell or helps it
local function player_to_hell(player, pos)
local pname = player:get_player_name()
if players_in_hell[pname] then
return
end
players_in_hell[pname] = true
save_hell_players()
update_background(player, true)
if pos then
player:set_pos(pos)
return
end
minetest.chat_send_player(pname, S("For any reason you arrived here. Type /hell_help to find out things like craft recipes."))
player:set_hp(0)
if hell_prisons then
player:set_pos(get_player_died_target(player))
end
end
local function player_from_hell(player, pos)
local pname = player:get_player_name()
if players_in_hell[pname] then
players_in_hell[pname] = nil
save_hell_players()
end
update_background(player)
player:set_pos(pos)
end
local function is_player_connected(name)
for _,player in pairs(minetest.get_connected_players()) do
if player:get_player_name() == name then
return true
end
end
return false
end
-- Chatcommands (edited) written by sss
minetest.register_chatcommand("to_hell", {
params = "[player_name]",
description = "Send someone to hell",
func = function(name, pname)
if not minetest.check_player_privs(name, {hell=true}) then
return false,
"You need the hell privilege to execute this chatcommand."
end
if not is_player_connected(pname) then
pname = name
end
local player = minetest.get_player_by_name(pname)
if not player then
return false, "Something went wrong."
end
minetest.chat_send_player(pname, "Go to hell !!!")
player_to_hell(player)
return true, pname.." is now in the hell."
end
})
minetest.register_chatcommand("from_hell", {
params = "[player_name]",
description = "Extract from hell",
func = function(name, pname)
if not minetest.check_player_privs(name, {hell=true}) then
return false,
"You need the hell priv to execute this chatcommand."
end
if not is_player_connected(pname) then
pname = name
end
local player = minetest.get_player_by_name(pname)
if not player then
return false, "Something went wrong."
end
minetest.chat_send_player(pname, "You are free now")
local pos = player:getpos()
player_from_hell(player, {x=pos.x, y=100, z=pos.z})
return true, pname.." is now out of the hell."
end
})
if hell_prisons then
-- randomly set player position when he/she dies in hell
minetest.register_on_respawnplayer(function(player)
local pname = player:get_player_name()
if not players_in_hell[pname] then
return
end
local target = get_player_died_target(player)
player:set_pos(target)
minetest.after(0, function(pname, target)
-- fixes respawn bug
local player = minetest.get_player_by_name(pname)
if player then
player:moveto(target)
end
end, pname, target)
return true
end)
-- override set_pos etc. to disallow player teleportion by e.g. travelnet
local function can_teleport(player, pos)
if not player:is_player() then
-- the same metatable is used for entities
return true
end
local pname = player:get_player_name()
local in_hell = players_in_hell[pname]
-- test if the target is valid
if pos.y < hell.start and pos.y > hell.DEPTH-510 then
if in_hell then
return true
end
elseif not in_hell then
return true
end
-- test if the current position is valid
local current_pos = player:get_pos()
local now_in_hell = current_pos.y < hell.start and current_pos.y > hell.DEPTH-510
if now_in_hell ~= in_hell then
if in_hell then
minetest.log("action", "Player \"" .. pname ..
"\" has to be in the hell, teleporting it!")
update_background(player, true)
current_pos.y = portal_target
player:set_pos(current_pos)
else
minetest.log("action", "Player \"" .. pname ..
"\" must not be in the hell, teleporting it!")
update_background(player)
current_pos.y = 20
player:set_pos(current_pos)
end
return false
end
minetest.chat_send_player(pname,
"You can not simply teleport to or from the hell!")
minetest.log("action", "Player \"" .. pname ..
"\" attempted to teleport from or to the hell, ignoring.")
return false
end
local methods = {"set_pos", "move_to", "setpos", "moveto"}
local metatable_overridden
minetest.register_on_joinplayer(function(player)
-- set the background when the player joins
local y = player:get_pos().y
if y < hell.start and y > hell.DEPTH-510 then
update_background(player, true)
end
-- overide set_pos etc. if not yet done
if metatable_overridden then
return
end
metatable_overridden = true
local mt = getmetatable(player)
for i = 1,#methods do
local methodname = methods[i]
local origfunc = mt[methodname]
mt[methodname] = function(...)
if can_teleport(...) then
origfunc(...)
end
end
end
end)
else
-- test if player is in hell when he/she joins
minetest.register_on_joinplayer(function(player)
local y = player:get_pos().y
players_in_hell[player:get_player_name()] =
y < hell.start and y > hell.DEPTH-510 or nil
end)
end
-- teleports player to hell (obsidian portal)
local function obsi_teleport_player(player, pos, target)
local pname = player:get_player_name()
if players_in_hell[pname] then
return
end
local objpos = player:get_pos()
objpos.y = objpos.y+0.1 -- Fix some glitches at -8000
if minetest.get_node(vector.round(objpos)).name ~= "hell:portal" then
return
end
local has_teleported
if obsidian_portal_kills then
obsidian_teleport(player, pname)
has_teleported = true
elseif not mclike_portal then
local target = vector.round(get_player_died_target(player))
if generated_or_generate(target) then
obsidian_teleport(player, pname, target)
has_teleported = true
end
end
if not has_teleported then
-- e.g. ungenerated area
return
end
minetest.sound_play("hell_portal_usual", {to_player=pname, gain=1})
end
-- a not filled square
vector.square = vector.square or
function(r)
local tab, n = {}, 1
for i = -r+1, r do
for j = -1, 1, 2 do
local a, b = r*j, i*j
tab[n] = {a, b}
tab[n+1] = {b, a}
n=n+2
end
end
return tab
end
local function is_hellportal(pos)
local x, y, z = pos.x, pos.y, pos.z
for _,i in pairs({-1, 3}) do
if minetest.get_node({x=x, y=y+i, z=z}).name ~= "hell:white" then
return
end
end
for _,sn in pairs(vector.square(1)) do
if minetest.get_node({x=x+sn[1], y=y-1, z=z+sn[2]}).name ~= "hell:hellrack"
or minetest.get_node({x=x+sn[1], y=y+3, z=z+sn[2]}).name ~= "hell:blood_cooked" then
return
end
end
for _,sn in pairs(vector.square(2)) do
if minetest.get_node({x=x+sn[1], y=y-1, z=z+sn[2]}).name ~= "hell:hellrack_black"
or minetest.get_node({x=x+sn[1], y=y+3, z=z+sn[2]}).name ~= "hell:wood_empty" then
return
end
end
for i = -1,1,2 do
for j = -1,1,2 do
if minetest.get_node({x=x+i, y=y+2, z=z+j}).name ~= "hell:apple" then
return
end
end
end
for i = -2,2,4 do
for j = 0,2 do
for k = -2,2,4 do
if minetest.get_node({x=x+i, y=y+j, z=z+k}).name ~= "hell:hellrack_brick_blue" then
return
end
end
end
end
for i = -1,1 do
for j = -1,1 do
if minetest.get_node({x=x+i, y=y+4, z=z+j}).name ~= "hell:wood_empty" then
return
end
end
end
return true
end
-- cache known portals
local known_portals_d = {}
local known_portals_u = {}
local function get_portal(t, z,x)
return t[z] and t[z][x]
end
local function set_portal(t, z,x, y)
t[z] = t[z] or {}
t[z][x] = y
end
-- used when a player eats hell:apple in a portal
local function hell_port(player, pos)
if not player
or not pos
or not pos.x then
minetest.log("error", "[hell] hell_port: something failed.")
return
end
if not is_hellportal(pos) then
return
end
minetest.sound_play("hell_teleporter", {pos=pos})
local meta = minetest.get_meta({x=pos.x, y=pos.y-1, z=pos.z})
if pos.y < hell.start then
set_portal(known_portals_d, pos.z,pos.x, pos.y)
local my = tonumber(meta:get_string("y"))
local y = get_portal(known_portals_u, pos.z,pos.x)
if y then
if y ~= my then
meta:set_string("y", y)
end
else
y = my or 100
end
pos.y = y - 0.3
player_from_hell(player, pos)
else
set_portal(known_portals_u, pos.z,pos.x, pos.y)
local my = tonumber(meta:get_string("y"))
local y = get_portal(known_portals_d, pos.z,pos.x)
if y then
if y ~= my then
meta:set_string("y", y)
end
else
y = my or portal_target+math.random(4)
end
pos.y = y - 0.3
player_to_hell(player, pos)
end
minetest.sound_play("hell_teleporter", {pos=pos})
return true
end
minetest.register_on_item_eat(function(_, _, itemstack, user, _)
if not user or itemstack:is_empty() then
return
end
local inv = user:get_inventory()
if not inv then
return
end
if itemstack:get_name() == "hell:apple" then
itemstack:take_item()
if hell_port(user, vector.round(user:get_pos())) then
return itemstack
end
end
end)
if hell.HELL_REALM_ENABLED then
-- Use the Portal API to add a portal type which goes to the Hell
-- See portal_api.txt for documentation
nether.register_portal("hell_gate", {
shape = nether.PortalShape_Circular,
frame_node_name = "nether:brick",
wormhole_node_color = 5, -- 5 is red
title = S("Hell Gate"),
particle_texture = {
name = "nether_particle_anim2.png",
animation = {
type = "vertical_frames",
aspect_w = 7,
aspect_h = 7,
length = 1,
},
scale = 1.5
},
book_of_portals_pagetext = S("Construction requires 16 blocks of ??. The finished frame must be in the shape of a circle and laid vertically, like a door.").."\n\n"..S("However, I never knew what material to use for building this door despite my many attempts.").."\n\n"..S("One day, however, I met an old lady who frankly looked like a witch. In the course of our discussion we came to talk about the Hell Gate. This old lady confessed to me that in her family there was a legend that one of her ancestors had managed to activate the portal. But that the poor man was instantly killed as he passed through it. The gate was destroyed and several years passed. But since a certain night, the poor widow of the deceased began to rave that her Husband had come back from the dead to take her also to hell because he said that he had made this world a wonderful place and that after several years, he would have found a way to come back and return to it as he wished without causing death. A few days later, the widow disappeared without a trace. Since then the house was destroyed in a fire with all the secrets it could hold. Only an old cauldron remained amidst the ashes.").."\n\n"..S("When I wanted to ask the old lady with what material the gate was made, she stared at me with eyes so black that I had the impression that the Nether wanted to take over me, and I did not insist any further."),
is_within_realm = function(pos) -- return true if pos is inside the Hell
return pos.y < hell.DEPTH and pos.y > hell.DEPTH-510
end,
find_realm_anchorPos = function(surface_anchorPos)
-- divide x and z by a factor of 8 to implement Hell fast-travel
local destination_pos = vector.divide(surface_anchorPos, hell.FASTTRAVEL_FACTOR)
destination_pos.x = math.floor(0.5 + destination_pos.x) -- round to int
destination_pos.z = math.floor(0.5 + destination_pos.z) -- round to int
destination_pos.y = hell.DEPTH-390 -- temp value so find_nearest_working_portal() returns hell portals
-- a y_factor of 0 makes the search ignore the altitude of the portals (as long as they are in the Hell)
local existing_portal_location, existing_portal_orientation =
nether.find_nearest_working_portal("hell_gate", destination_pos, 8, 0)
if existing_portal_location ~= nil then
return existing_portal_location, existing_portal_orientation
else
destination_pos.y = hell.DEPTH-390 + math.random(0, 30)
return destination_pos
end
end,
find_surface_anchorPos = function(realm_anchorPos)
-- A portal definition doesn't normally need to provide a find_surface_anchorPos() function,
-- since find_surface_target_y() will be used by default, but Hell portals also scale position
-- to create fast-travel.
-- Defining a custom function also means we can look for existing nearby portals.
-- Multiply x and z by a factor of 8 to implement Hell fast-travel
local destination_pos = vector.multiply(realm_anchorPos, hell.FASTTRAVEL_FACTOR)
destination_pos.x = math.min(30900, math.max(-30900, destination_pos.x)) -- clip to world boundary
destination_pos.z = math.min(30900, math.max(-30900, destination_pos.z)) -- clip to world boundary
destination_pos.y = 0 -- temp value so find_nearest_working_portal() doesn't return hell portals
-- a y_factor of 0 makes the search ignore the altitude of the portals (as long as they are outside the Hell)
local existing_portal_location, existing_portal_orientation =
nether.find_nearest_working_portal("hell_gate", destination_pos, 8 * hell.FASTTRAVEL_FACTOR, 0)
if existing_portal_location ~= nil then
return existing_portal_location, existing_portal_orientation
else
destination_pos.y = nether.find_surface_target_y(destination_pos.x, destination_pos.z, "hell_gate")
return destination_pos
end
end,
on_ignite = function(portalDef, anchorPos, orientation)
-- make some sparks fly
local p1, p2 = portalDef.shape:get_p1_and_p2_from_anchorPos(anchorPos, orientation)
local pos = vector.divide(vector.add(p1, p2), 2)
local textureName = portalDef.particle_texture
if type(textureName) == "table" then textureName = textureName.name end
minetest.add_particlespawner({
amount = 110,
time = 0.1,
minpos = {x = pos.x - 0.5, y = pos.y - 1.2, z = pos.z - 0.5},
maxpos = {x = pos.x + 0.5, y = pos.y + 1.2, z = pos.z + 0.5},
minvel = {x = -5, y = -1, z = -5},
maxvel = {x = 5, y = 1, z = 5},
minacc = {x = 0, y = 0, z = 0},
maxacc = {x = 0, y = 0, z = 0},
minexptime = 0.1,
maxexptime = 0.5,
minsize = 0.2 * portalDef.particle_texture_scale,
maxsize = 0.8 * portalDef.particle_texture_scale,
collisiondetection = false,
texture = textureName .. "^[colorize:#F00:alpha",
animation = portalDef.particle_texture_animation,
glow = 8
})
end,
on_player_teleported = function(portal_definition, player, playerPos, new_playerPos)
local pname = player:get_player_name()
if players_in_hell[pname] then
return
end
obsidian_teleport(player, pname)
end,
})
end
-- Pour éviter de pouvoir aller en enfer depuis le nether avec un portail du nether construit depuis l'enfer
if nether.NETHER_REALM_ENABLED then
nether.registered_portals["nether_portal"].on_player_teleported =
function(portal_definition, player, playerPos, new_playerPos)
local new_y = new_playerPos.y
if new_y > hell.DEPTH-510 and new_y < hell.DEPTH then
minetest.after(
0,function(player, target)
-- fixes respawn bug
if player then
player:moveto(target)
end
end, player, playerPos)
minetest.chat_send_player(player:get_player_name(),
S("You shall not pass!"))
end
end
end

BIN
sounds/hell_dig.1.ogg Normal file

Binary file not shown.

BIN
sounds/hell_dig.2.ogg Normal file

Binary file not shown.

BIN
sounds/hell_dug.1.ogg Normal file

Binary file not shown.

BIN
sounds/hell_dug.2.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
sounds/hell_footstep.1.ogg Normal file

Binary file not shown.

BIN
sounds/hell_footstep.2.ogg Normal file

Binary file not shown.

BIN
sounds/hell_footstep.3.ogg Normal file

Binary file not shown.

BIN
sounds/hell_pearl.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

BIN
textures/hell_axe_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

BIN
textures/hell_bark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

BIN
textures/hell_blood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

BIN
textures/hell_blood_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

BIN
textures/hell_dirt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

BIN
textures/hell_dirt_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

BIN
textures/hell_fim.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

BIN
textures/hell_fruit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

BIN
textures/hell_fruit_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
textures/hell_grass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

BIN
textures/hell_grass_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

BIN
textures/hell_hellrack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

BIN
textures/hell_hotbed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

BIN
textures/hell_leaves.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
textures/hell_pearl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

BIN
textures/hell_pick_wood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Some files were not shown because too many files have changed in this diff Show More