added new mapgen structure + fixed crafting guide

This commit is contained in:
cale 2016-12-23 12:17:44 +01:00
parent c1792f2330
commit bebe09cadc
6 changed files with 51 additions and 5 deletions

View File

@ -20,20 +20,29 @@ function crafting_guide.get_formspec(crafts,back_button)
local x = 1
local y = 1
local j = 1
for i=1,9 do
local w = crafts[1].width
if w == 0 or w == nil then
w = 3
end
local h = 3
for i=1,w*h do
if (string.find((crafts[1].items[j] or ""),"group:") or 0) == 1 then
if crafts[1].items[j] then
if crafts[1].items[j] and crafts[1].items[j] ~= "" then
str = str .. ("button["..(x-1)..","..(y-1)..";1,1;group_"..i..";"..string.sub(crafts[1].items[j], 7).."]")
else
str = str .. ("button["..(x-1)..","..(y-1)..";1,1;;]")
--str = str .. ("button["..(x-1)..","..(y-1)..";1,1;;]")
end
else
elseif crafts[1].items[j] and crafts[1].items[j] ~= "" then
str = str .. ("item_image_button["..(x-1)..","..(y-1)..";1,1;"..(crafts[1].items[j] or "")..";"..(crafts[1].items[j] or "")..";]")
end
j = j + 1
x = x+1
if x > 3 then
if x > w then
x = 1
y = y+1
end

View File

@ -91,28 +91,45 @@ function doors.register_door(name, def)
end
end,
})
minetest.register_craft({
output = name .. " 8",
recipe = {
{def.material, def.material},
{def.material, def.material},
{def.material, def.material}
}
})
end
doors.register_door("doors:wood", {
description = "Wooden Door",
tiles = {"default_wooden_planks.png"},
groups = {choppy = 3},
material = "default:wooden_planks"
})
doors.register_door("doors:jungle_wood", {
description = "Jungle Wood Door",
tiles = {"default_wooden_planks_jungle.png"},
groups = {choppy = 3},
material = "default:wooden_planks_jungle"
})
doors.register_door("doors:glass", {
description = "Glass Door",
tiles = {"default_glass.png"},
groups = {snappy = 3},
material = "default:glass"
})
doors.register_door("doors:stonebrick", {
description = "Stonebrick Door",
tiles = {"default_stonebrick.png"},
groups = {cracky = 3},
material = "default:stonebrick"
})

View File

@ -142,6 +142,11 @@ furnace.register_recipe({
output = "default:glass",
})
furnace.register_recipe({
input = "default:cobble",
output = "default:stone",
})
-- items
minetest.register_craftitem("furnace:iron_rod", {

View File

@ -141,6 +141,7 @@ stairs.register_stair_and_slab("stairs:cobble", "default:cobble")
stairs.register_stair_and_slab("stairs:brick", "default:brick")
stairs.register_stair_and_slab("stairs:wood", "default:wood")
stairs.register_stair_and_slab("stairs:wooden_planks", "default:wooden_planks")
stairs.register_stair_and_slab("stairs:wooden_planks_jungle", "default:wooden_planks_jungle")
stairs.register_stair_and_slab("stairs:grass", "default:grass")
stairs.register_stair_and_slab("stairs:dirt", "default:dirt")

View File

@ -12,3 +12,17 @@ minetest.register_decoration({
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dry_grass"},
fill_ratio = 0.0005,
biomes = {
"savanna"
},
y_min = 6,
y_max = 20,
schematic = minetest.get_modpath("village").."/schematics/house2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})

Binary file not shown.