1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Move MFF-only craft recipes, craftitems, mapgen to [mff_classic]

Also fixes aliasing...
This commit is contained in:
Dorian Wouters 2016-08-21 13:26:16 +02:00
parent 32ae8aca19
commit dcc1873cbe
No known key found for this signature in database
GPG Key ID: 6E9DA8063322434B
9 changed files with 492 additions and 463 deletions

View File

@ -7,13 +7,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:cherry_plank 6',
recipe = {
{'default:cherry_log'},
}
})
minetest.register_craft({
output = 'default:junglewood 4',
recipe = {
@ -111,24 +104,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:pick_silver',
recipe = {
{'default:silver_ingot', 'default:silver_ingot', 'default:silver_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:pick_gold',
recipe = {
{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:pick_mese',
recipe = {
@ -138,15 +113,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:pick_mithril',
recipe = {
{'default:mithril_ingot', 'default:mithril_ingot', 'default:mithril_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:pick_diamond',
recipe = {
@ -156,15 +122,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:pick_nyan',
recipe = {
{'default:nyancat', 'default:nyancat', 'default:nyancat'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:shovel_wood',
recipe = {
@ -201,24 +158,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:shovel_silver',
recipe = {
{'default:silver_ingot'},
{'group:stick'},
{'group:stick'},
}
})
minetest.register_craft({
output = 'default:shovel_gold',
recipe = {
{'default:gold_ingot'},
{'group:stick'},
{'group:stick'},
}
})
minetest.register_craft({
output = 'default:shovel_mese',
recipe = {
@ -228,15 +167,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:shovel_mithril',
recipe = {
{'default:mithril_ingot'},
{'group:stick'},
{'group:stick'},
}
})
minetest.register_craft({
output = 'default:shovel_diamond',
recipe = {
@ -246,15 +176,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:shovel_nyan",
recipe = {
{"default:nyancat"},
{"group:stick"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_wood',
recipe = {
@ -291,24 +212,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:axe_silver',
recipe = {
{'default:silver_ingot', 'default:silver_ingot'},
{'default:silver_ingot', 'group:stick'},
{'', 'group:stick'},
}
})
minetest.register_craft({
output = "default:axe_gold",
recipe = {
{"default:gold_ingot", "default:gold_ingot"},
{"default:gold_ingot", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_mese',
recipe = {
@ -318,15 +221,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:axe_mithril',
recipe = {
{'default:mithril_ingot', 'default:mithril_ingot'},
{'default:mithril_ingot', 'group:stick'},
{'', 'group:stick'},
}
})
minetest.register_craft({
output = 'default:axe_diamond',
recipe = {
@ -336,15 +230,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:axe_nyan",
recipe = {
{"default:nyancat", "default:nyancat"},
{"default:nyancat", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_wood',
recipe = {
@ -381,24 +266,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:axe_silver',
recipe = {
{'default:silver_ingot', 'default:silver_ingot'},
{'group:stick', 'default:silver_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:axe_gold',
recipe = {
{'default:gold_ingot', 'default:gold_ingot'},
{'group:stick', 'default:gold_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:axe_mese',
recipe = {
@ -408,15 +275,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:axe_mithril',
recipe = {
{'default:mithril_ingot', 'default:mithril_ingot'},
{'group:stick', 'default:mithril_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:axe_diamond',
recipe = {
@ -426,15 +284,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:axe_nyan',
recipe = {
{'default:nyancat', 'default:nyancat'},
{'group:stick', 'default:nyancat'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:sword_wood',
recipe = {
@ -471,24 +320,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:sword_silver',
recipe = {
{'default:silver_ingot'},
{'default:silver_ingot'},
{'group:stick'},
}
})
minetest.register_craft({
output = "default:sword_gold",
recipe = {
{"default:gold_ingot"},
{"default:gold_ingot"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:sword_mese',
recipe = {
@ -498,15 +329,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:sword_mithril',
recipe = {
{'default:mithril_ingot'},
{'default:mithril_ingot'},
{'group:stick'},
}
})
minetest.register_craft({
output = 'default:sword_diamond',
recipe = {
@ -516,25 +338,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:sword_nyan",
recipe = {
{"default:nyancat"},
{"default:nyancat"},
{"group:stick"},
}
})
minetest.register_craft({ -- Ultimate Warrior weapon
output = 'default:dungeon_master_s_blood_sword',
recipe = {
{"mobs:dungeon_master_blood", "nether:white", "mobs:dungeon_master_blood"},
{"mobs:dungeon_master_blood", "mobs:dungeon_master_diamond", "mobs:dungeon_master_blood"},
{"default:mithrilblock", "mobs:zombie_tibia", "default:mithril_block"},
}
})
minetest.register_craft({
output = 'default:rail 24',
recipe = {
@ -577,37 +380,12 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:furnace_locked",
recipe = {
{"group:stone", "group:stone", "group:stone"},
{"group:stone", "group:ingot", "group:stone"},
{"group:stone", "group:stone", "group:stone"},
},
})
minetest.register_craft({
type = "shapeless",
output = "default:furnace_locked",
recipe = {"default:furnace", "group:ingot"},
})
minetest.register_craft({
type = "shapeless",
output = "default:bronze_ingot",
recipe = {"default:steel_ingot", "default:copper_ingot"},
})
minetest.register_craft({
type = "shapeless",
output = "default:bronze_ingot 3",
recipe = {
"default:tin_ingot",
"default:copper_ingot",
"default:copper_ingot",
}
})
minetest.register_craft({
output = 'default:coalblock',
recipe = {
@ -656,23 +434,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:tinblock',
recipe = {
{'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'},
{'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'},
{'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'},
}
})
minetest.register_craft({
output = 'default:tin_ingot 9',
recipe = {
{'default:tinblock'},
}
})
minetest.register_craft({
output = 'default:bronzeblock',
recipe = {
@ -689,22 +450,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:silverblock',
recipe = {
{'default:silver_ingot', 'default:silver_ingot', 'default:silver_ingot'},
{'default:silver_ingot', 'default:silver_ingot', 'default:silver_ingot'},
{'default:silver_ingot', 'default:silver_ingot', 'default:silver_ingot'},
}
})
minetest.register_craft({
output = 'default:silver_ingot 9',
recipe = {
{'default:silverblock'},
}
})
minetest.register_craft({
output = 'default:goldblock',
recipe = {
@ -714,22 +459,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:mithrilblock',
recipe = {
{'default:mithril_ingot', 'default:mithril_ingot', 'default:mithril_ingot'},
{'default:mithril_ingot', 'default:mithril_ingot', 'default:mithril_ingot'},
{'default:mithril_ingot', 'default:mithril_ingot', 'default:mithril_ingot'},
}
})
minetest.register_craft({
output = 'default:mithril_ingot 9',
recipe = {
{'default:mithrilblock'},
}
})
minetest.register_craft({
output = 'default:gold_ingot 9',
recipe = {
@ -776,7 +505,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:desert_sand",
recipe = {
@ -887,28 +615,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:dirt 4",
type = "shapeless",
recipe = {"default:gravel", "default:gravel", "default:gravel", "default:gravel"}
})
minetest.register_craft({
output = "default:gravel",
recipe = {
{"default:cobble"},
}
})
minetest.register_craft({
output = "default:desert_stone 2",
recipe = {
{"default:desert_sand", "default:desert_sand"},
{"default:desert_sand", "default:desert_sand"},
}
})
minetest.register_craft({
output = 'default:meselamp 1',
recipe = {
@ -1000,12 +706,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "maptools:superapple",
type = "shapeless",
recipe = {"default:apple", "default:mese", "default:mese"},
})
--
-- Crafting (tool repair)
--
@ -1060,30 +760,12 @@ minetest.register_craft({
recipe = "default:copper_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:tin_ingot",
recipe = "default:tin_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:silver_ingot",
recipe = "default:silver_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:gold_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:mithril_ingot",
recipe = "default:mithril_lump",
})
minetest.register_craft({
type = "cooking",
cooktime = 2, -- //MFF(Mg|07/24/15)
@ -1091,12 +773,6 @@ minetest.register_craft({
recipe = "default:clay_lump",
})
minetest.register_craft({
type = "cooking",
output = "default:clay_burned",
recipe = "default:clay",
})
--
-- Fuels
--
@ -1107,12 +783,6 @@ minetest.register_craft({
burntime = 40,
})
minetest.register_craft({
type = "fuel",
recipe = "group:stick",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "default:junglegrass",
@ -1262,4 +932,3 @@ minetest.register_craft({
recipe = "default:dry_grass_1",
burntime = 2,
})

View File

@ -188,16 +188,6 @@ minetest.register_craftitem("default:copper_lump", {
inventory_image = "default_copper_lump.png",
})
minetest.register_craftitem("default:tin_lump", {
description = "Tin Lump",
inventory_image = "default_tin_lump.png",
})
minetest.register_craftitem("default:silver_lump", {
description = "Silver Lump",
inventory_image = "default_silver_lump.png",
})
minetest.register_craftitem("default:mese_crystal", {
description = "Mese Crystal",
inventory_image = "default_mese_crystal.png",
@ -208,11 +198,6 @@ minetest.register_craftitem("default:gold_lump", {
inventory_image = "default_gold_lump.png",
})
minetest.register_craftitem("default:mithril_lump", {
description = "Mithril Lump",
inventory_image = "default_mithril_lump.png",
})
minetest.register_craftitem("default:diamond", {
description = "Diamond",
inventory_image = "default_diamond.png",
@ -236,24 +221,12 @@ minetest.register_craftitem("default:copper_ingot", {
groups = {ingot = 1},
})
minetest.register_craftitem("default:tin_ingot", {
description = "Tin Ingot",
inventory_image = "default_tin_ingot.png",
groups = {ingot = 1},
})
minetest.register_craftitem("default:bronze_ingot", {
description = "Bronze Ingot",
inventory_image = "default_bronze_ingot.png",
groups = {ingot = 1},
})
minetest.register_craftitem("default:silver_ingot", {
description = "Silver Ingot",
inventory_image = "default_silver_ingot.png",
groups = {ingot = 1},
})
minetest.register_craftitem("default:gold_ingot", {
description = "Gold Ingot",
groups = {ingot = 1},
@ -265,22 +238,11 @@ minetest.register_craftitem("default:mese_crystal_fragment", {
inventory_image = "default_mese_crystal_fragment.png",
})
minetest.register_craftitem("default:mithril_ingot", {
description = "Mithril Ingot",
groups = {ingot = 1},
inventory_image = "default_mithril_ingot.png",
})
minetest.register_craftitem("default:clay_brick", {
description = "Clay Brick",
inventory_image = "default_clay_brick.png",
})
minetest.register_craftitem("default:scorched_stuff", {
description = "Scorched Stuff",
inventory_image = "default_scorched_stuff.png",
})
minetest.register_craftitem("default:obsidian_shard", {
description = "Obsidian Shard",
inventory_image = "default_obsidian_shard.png",

View File

@ -1230,23 +1230,6 @@ function default.register_mgv6_decorations()
y_max = 30,
decoration = "default:dry_shrub",
})
-- Cherry tree
minetest.register_decoration({
deco_type = "simple",
place_on = "default:dirt_with_grass",
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.005,
spread = {x=100, y=100, z=100},
seed = 278,
octaves = 2,
persist = 0.7
},
decoration = "default:mg_cherry_sapling",
height = 1,
})
end
-- All mapgens except mgv6 and singlenode
@ -1666,73 +1649,16 @@ function default.register_decorations()
end
--
-- Generate nyan cats
--
-- All mapgens except singlenode
function default.make_nyancat(pos, facedir, length)
local tailvec = {x = 0, y = 0, z = 0}
if facedir == 0 then
tailvec.z = 1
elseif facedir == 1 then
tailvec.x = 1
elseif facedir == 2 then
tailvec.z = -1
elseif facedir == 3 then
tailvec.x = -1
else
facedir = 0
tailvec.z = 1
end
local p = {x = pos.x, y = pos.y, z = pos.z}
minetest.set_node(p, {name = "default:nyancat", param2 = facedir})
for i = 1, length do
p.x = p.x + tailvec.x
p.z = p.z + tailvec.z
minetest.set_node(p, {name = "default:nyancat_rainbow", param2 = facedir})
end
end
function default.generate_nyancats(minp, maxp, seed)
local height_min = -19600
local height_max = 30000
if maxp.y < height_min or minp.y > height_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local volume = (maxp.x - minp.x + 1) * (y_max - y_min + 1) * (maxp.z - minp.z + 1)
local pr = PseudoRandom(seed + 9324342)
local max_num_nyancats = math.floor(volume / (16 * 16 * 16))
for i = 1, max_num_nyancats do
if pr:next(0, 1000) == 0 then
local x0 = pr:next(minp.x, maxp.x)
local y0 = pr:next(minp.y, maxp.y)
local z0 = pr:next(minp.z, maxp.z)
local p0 = {x = x0, y = y0, z = z0}
default.make_nyancat(p0, pr:next(0, 3), pr:next(10, 15))
end
end
end
--
-- Detect mapgen to select functions
--
-- Mods using singlenode mapgen can call these functions to enable
-- the use of minetest.generate_ores or minetest.generate_decorations
local mg_params = minetest.get_mapgen_params()
if mg_params.mgname == "v6" then
local mg_name = minetest.get_mapgen_params().name
if mg_name == "v6" then
default.register_ores()
default.register_mgv6_decorations()
minetest.register_on_generated(default.generate_nyancats)
elseif mg_params.mgname ~= "singlenode" then
else
default.register_biomes()
default.register_ores()
default.register_decorations()
minetest.register_on_generated(default.generate_nyancats)
end

View File

@ -429,6 +429,7 @@ function default.grow_new_aspen_tree(pos)
path, "0", nil, false)
end
--
-- Sapling 'on place' function to check protection of node and resulting tree volume
--

View File

@ -1,5 +1,15 @@
local modname = minetest.get_current_modname()
local alias
if minetest.setting_get(modname .. '.output_alias_list') == 'true' then
alias = function(from, to)
minetest.log('action', "[" .. modname .. "] " .. from .. " -> " .. to)
minetest.register_alias(from, to)
end
else
alias = minetest.register_alias
end
do -- default
local aliases = {
'mg_cherry_sapling', 'acid_source', 'acid_flowing', 'sand_source', 'sand_flowing',
@ -9,12 +19,12 @@ do -- default
'desert_stone_with_silver', 'silverblock', 'meze', 'stone_with_mithril', 'mithrilblock',
'stone_with_coin', 'ladder_obsidian', 'fence_cobble', 'fence_desert_cobble',
'fence_steelblock', 'fence_brick', 'nyancat', 'nyancat_rainbow', 'obsidian_cooled',
'cobble_cooled'
'cobble_cooled', 'scorched_stuff'
}
for node in pairs(aliases) do
minetest.register_alias('default:' .. node, modname .. ':' .. node)
for _, node in pairs(aliases) do
alias('default:' .. node, modname .. ':' .. node)
end
minetest.register_alias('default:meze_block', modname .. ':meze')
alias('default:meze_block', modname .. ':meze')
end
do -- moreores
@ -23,18 +33,19 @@ do -- moreores
'sword_silver', 'sword_mithril', 'mithril_ingot', 'silver_ingot', 'tin_ingot', 'mithril_lump',
'silver_lump', 'tin_lump'
}
for node in pairs(aliases) do
minetest.register_alias('moreores:' .. node, modname .. ':' .. node)
for _, node in pairs(aliases) do
alias('moreores:' .. node, modname .. ':' .. node)
alias('default:' .. node, modname .. ':' .. node)
end
minetest.register_alias('mineral_silver', modname .. ':stone_with_silver')
minetest.register_alias('mineral_tin', modname .. ':stone_with_tin')
minetest.register_alias('mineral_mithril', modname .. ':stone_with_mithril')
minetest.register_alias('mithril_block', modname .. ':mithrilblock')
minetest.register_alias('silver_block', modname .. ':silverblock')
minetest.register_alias('tin_block', modname .. ':tinblock')
alias('mineral_silver', modname .. ':stone_with_silver')
alias('mineral_tin', modname .. ':stone_with_tin')
alias('mineral_mithril', modname .. ':stone_with_mithril')
alias('mithril_block', modname .. ':mithrilblock')
alias('silver_block', modname .. ':silverblock')
alias('tin_block', modname .. ':tinblock')
end
minetest.register_alias('bucket_acid', modname .. ':bucket_acid')
minetest.register_alias('bucket:bucket_acid', modname .. ':bucket_acid')
minetest.register_alias('bucket_sand', modname .. ':bucket_sand')
minetest.register_alias('bucket:bucket_sand', modname .. ':bucket_sand')
alias('bucket_acid', modname .. ':bucket_acid')
alias('bucket:bucket_acid', modname .. ':bucket_acid')
alias('bucket_sand', modname .. ':bucket_sand')
alias('bucket:bucket_sand', modname .. ':bucket_sand')

View File

@ -0,0 +1,316 @@
local modname = minetest.get_current_modname()
minetest.register_craft({
type = 'cooking',
output = modname .. ':mithril_ingot',
recipe = modname .. ':mithril_lump',
})
minetest.register_craft({
type = 'cooking',
output = modname .. ':clay_burned',
recipe = 'default:clay',
})
minetest.register_craft({
type = 'fuel',
recipe = 'group:stick',
burntime = 1,
})
minetest.register_craft({
type = 'cooking',
output = modname .. ':tin_ingot',
recipe = modname .. ':tin_lump',
})
minetest.register_craft({
type = 'cooking',
output = modname .. ':silver_ingot',
recipe = modname .. ':silver_lump',
})
minetest.register_craft({
output = modname .. ':pick_silver',
recipe = {
{modname .. ':silver_ingot', modname .. ':silver_ingot', modname .. ':silver_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = modname .. ':pick_gold',
recipe = {
{modname .. ':gold_ingot', modname .. ':gold_ingot', modname .. ':gold_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = 'maptools:superapple',
type = 'shapeless',
recipe = {'default:apple', 'default:mese', 'default:mese'},
})
minetest.register_craft({
output = modname .. ':cherry_plank 6',
recipe = {
{modname .. ':cherry_log'},
}
})
minetest.register_craft({
output = modname .. ':pick_mithril',
recipe = {
{modname .. ':mithril_ingot', modname .. ':mithril_ingot', modname .. ':mithril_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = modname .. ':pick_nyan',
recipe = {
{modname .. ':nyancat', modname .. ':nyancat', modname .. ':nyancat'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
})
minetest.register_craft({
output = modname .. ':shovel_silver',
recipe = {
{modname .. ':silver_ingot'},
{'group:stick'},
{'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':shovel_gold',
recipe = {
{'default:gold_ingot'},
{'group:stick'},
{'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':shovel_mithril',
recipe = {
{modname .. ':mithril_ingot'},
{'group:stick'},
{'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':shovel_nyan',
recipe = {
{modname .. ':nyancat'},
{'group:stick'},
{'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':axe_silver',
recipe = {
{modname .. ':silver_ingot', modname .. ':silver_ingot'},
{modname .. ':silver_ingot', 'group:stick'},
{'', 'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':axe_gold',
recipe = {
{modname .. ':gold_ingot', modname .. ':gold_ingot'},
{modname .. ':gold_ingot', 'group:stick'},
{'', 'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':axe_mithril',
recipe = {
{modname .. ':mithril_ingot', modname .. ':mithril_ingot'},
{modname .. ':mithril_ingot', 'group:stick'},
{'', 'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':axe_nyan',
recipe = {
{modname .. ':nyancat', modname .. ':nyancat'},
{modname .. ':nyancat', 'group:stick'},
{'', 'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':axe_silver',
recipe = {
{modname .. ':silver_ingot', modname .. ':silver_ingot'},
{'group:stick', modname .. ':silver_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = modname .. ':axe_gold',
recipe = {
{'default:gold_ingot', 'default:gold_ingot'},
{'group:stick', 'default:gold_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = modname .. ':axe_mithril',
recipe = {
{modname .. ':mithril_ingot', modname .. ':mithril_ingot'},
{'group:stick', modname .. ':mithril_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = modname .. ':axe_nyan',
recipe = {
{modname .. ':nyancat', modname .. ':nyancat'},
{'group:stick', modname .. ':nyancat'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = modname .. ':sword_silver',
recipe = {
{modname .. ':silver_ingot'},
{modname .. ':silver_ingot'},
{'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':sword_gold',
recipe = {
{'default:gold_ingot'},
{'default:gold_ingot'},
{'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':sword_mithril',
recipe = {
{modname .. ':mithril_ingot'},
{modname .. ':mithril_ingot'},
{'group:stick'},
}
})
minetest.register_craft({
output = modname .. ':sword_nyan',
recipe = {
{modname .. ':nyancat'},
{modname .. ':nyancat'},
{'group:stick'},
}
})
minetest.register_craft({ -- Ultimate Warrior weapon
output = modname .. ':dungeon_master_s_blood_sword',
recipe = {
{'mobs:dungeon_master_blood', 'nether:white', 'mobs:dungeon_master_blood'},
{'mobs:dungeon_master_blood', 'mobs:dungeon_master_diamond', 'mobs:dungeon_master_blood'},
{modname .. ':mithrilblock', 'mobs:zombie_tibia', modname .. ':mithril_block'},
}
})
minetest.register_craft({
type = 'shapeless',
output = 'default:bronze_ingot 3',
recipe = {
modname .. ':tin_ingot',
'default:copper_ingot',
'default:copper_ingot',
}
})
minetest.register_craft({
output = modname .. ':tinblock',
recipe = {
{modname .. ':tin_ingot', modname .. ':tin_ingot', modname .. ':tin_ingot'},
{modname .. ':tin_ingot', modname .. ':tin_ingot', modname .. ':tin_ingot'},
{modname .. ':tin_ingot', modname .. ':tin_ingot', modname .. ':tin_ingot'},
}
})
minetest.register_craft({
output = modname .. ':tin_ingot 9',
recipe = {
{modname .. ':tinblock'},
}
})
minetest.register_craft({
output = modname .. ':silverblock',
recipe = {
{modname .. ':silver_ingot', modname .. ':silver_ingot', modname .. ':silver_ingot'},
{modname .. ':silver_ingot', modname .. ':silver_ingot', modname .. ':silver_ingot'},
{modname .. ':silver_ingot', modname .. ':silver_ingot', modname .. ':silver_ingot'},
}
})
minetest.register_craft({
output = modname .. ':silver_ingot 9',
recipe = {
{modname .. ':silverblock'},
}
})
minetest.register_craft({
output = modname .. ':mithrilblock',
recipe = {
{modname .. ':mithril_ingot', modname .. ':mithril_ingot', modname .. ':mithril_ingot'},
{modname .. ':mithril_ingot', modname .. ':mithril_ingot', modname .. ':mithril_ingot'},
{modname .. ':mithril_ingot', modname .. ':mithril_ingot', modname .. ':mithril_ingot'},
}
})
minetest.register_craft({
output = modname .. ':mithril_ingot 9',
recipe = {
{modname .. ':mithrilblock'},
}
})
-- Utility crafts
minetest.register_craft({
output = 'default:dirt 4',
type = 'shapeless',
recipe = {'default:gravel', 'default:gravel', 'default:gravel', 'default:gravel'}
})
minetest.register_craft({
output = 'default:gravel',
recipe = {
{'default:cobble'},
}
})
minetest.register_craft({
output = 'default:desert_stone 2',
recipe = {
{'default:desert_sand', 'default:desert_sand'},
{'default:desert_sand', 'default:desert_sand'},
}
})

View File

@ -0,0 +1,39 @@
local modname = minetest.get_current_modname()
minetest.register_craftitem(modname .. ':tin_lump', {
description = "Tin Lump",
inventory_image = 'default_tin_lump.png',
})
minetest.register_craftitem(modname .. ':silver_lump', {
description = "Silver Lump",
inventory_image = 'default_silver_lump.png',
})
minetest.register_craftitem(modname .. ':mithril_lump', {
description = "Mithril Lump",
inventory_image = 'default_mithril_lump.png',
})
minetest.register_craftitem(modname .. ':tin_ingot', {
description = "Tin Ingot",
inventory_image = 'default_tin_ingot.png',
groups = {ingot = 1},
})
minetest.register_craftitem(modname .. ':silver_ingot', {
description = "Silver Ingot",
inventory_image = 'default_silver_ingot.png',
groups = {ingot = 1},
})
minetest.register_craftitem(modname .. ':mithril_ingot', {
description = "Mithril Ingot",
groups = {ingot = 1},
inventory_image = 'default_mithril_ingot.png',
})
minetest.register_craftitem(modname .. ':scorched_stuff', {
description = "Scorched Stuff",
inventory_image = 'default_scorched_stuff.png',
})

View File

@ -4,11 +4,18 @@ local modpath = minetest.get_modpath(modname)
local thismod = {}
_G[modname] = thismod
local start = os.time()
minetest.log('action', "[" .. modname .. "] Loading")
dofile(modpath .. '/aliases.lua')
dofile(modpath .. '/abms.lua')
dofile(modpath .. '/biomes.lua')
dofile(modpath .. '/mapgen.lua')
dofile(modpath .. '/nodes.lua')
dofile(modpath .. '/trees.lua')
dofile(modpath .. '/craftitems.lua')
dofile(modpath .. '/registers.lua')
dofile(modpath .. '/crafting.lua')
dofile(modpath .. '/mapgen.lua')
minetest.log('action', "[" .. modname .. "] Loaded in " .. (os.time() - start) .. " seconds")

View File

@ -1,4 +1,5 @@
local modname = minetest.get_current_modname()
local thismod = _G[modname]
-- Beware of Meze
@ -134,3 +135,100 @@ minetest.register_ore({
y_max = 0,
flags = 'absheight',
})
-- Cherry tree
minetest.register_decoration({
deco_type = 'simple',
place_on = 'default:dirt_with_grass"',
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.005,
spread = {x=100, y=100, z=100},
seed = 278,
octaves = 2,
persist = 0.7
},
decoration = modname .. ':mg_cherry_sapling',
height = 1,
})
-- More ores, MORE ORES!!!
minetest.register_ore({
ore_type = 'scatter',
ore = 'default:stone_with_coal',
wherein = 'default:stone',
clust_scarcity = 32 * 32 * 32,
clust_num_ores = 40,
clust_size = 4,
y_max = 64,
y_min = -30000,
})
minetest.register_ore({
ore_type = 'scatter',
ore = 'default:stone_with_iron',
wherein = 'default:stone',
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 3,
clust_size = 2,
y_min = -15,
y_max = 2,
})
--
-- Generate nyan cats
--
-- All mapgens except singlenode
function thismod.make_nyancat(pos, facedir, length)
local tailvec = {x = 0, y = 0, z = 0}
if facedir == 0 then
tailvec.z = 1
elseif facedir == 1 then
tailvec.x = 1
elseif facedir == 2 then
tailvec.z = -1
elseif facedir == 3 then
tailvec.x = -1
else
facedir = 0
tailvec.z = 1
end
local p = {x = pos.x, y = pos.y, z = pos.z}
minetest.set_node(p, {name = modname .. ':nyancat', param2 = facedir})
for i = 1, length do
p.x = p.x + tailvec.x
p.z = p.z + tailvec.z
minetest.set_node(p, {name = modname .. ':nyancat_rainbow', param2 = facedir})
end
end
function thismod.generate_nyancats(minp, maxp, seed)
local height_min = -19600
local height_max = 30000
if maxp.y < height_min or minp.y > height_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local volume = (maxp.x - minp.x + 1) * (y_max - y_min + 1) * (maxp.z - minp.z + 1)
local pr = PseudoRandom(seed + 9324342)
local max_num_nyancats = math.floor(volume / (16 * 16 * 16))
for i = 1, max_num_nyancats do
if pr:next(0, 1000) == 0 then
local x0 = pr:next(minp.x, maxp.x)
local y0 = pr:next(minp.y, maxp.y)
local z0 = pr:next(minp.z, maxp.z)
local p0 = {x = x0, y = y0, z = z0}
default.make_nyancat(p0, pr:next(0, 3), pr:next(10, 15))
end
end
end
if minetest.setting_get(modname .. '.disable_nyancat_mapgen') ~= 'true' then
minetest.register_on_generated(thismod.generate_nyancats)
end