Add forges and libraries
This commit is contained in:
parent
40ddf85592
commit
65d3bba3a6
@ -414,6 +414,8 @@ buildings = {
|
||||
{sizex=13, sizez= 6, yoff= 1, ysize= 7, scm=house_w_garden, orients={2}},
|
||||
{sizex=16, sizez=17, yoff= 1, ysize=12, scm="church", orients={3}, pervillage=1},
|
||||
{sizex= 6, sizez= 5, yoff= 1, ysize=15, scm="tower", orients={0}, weight=1/7},
|
||||
{sizex= 9, sizez= 9, yoff= 1, ysize= 6, scm="forge", orients={0}},
|
||||
{sizex=11, sizez=13, yoff= 1, ysize= 6, scm="library", orients={1}, pervillage=2},
|
||||
}
|
||||
|
||||
local gravel = minetest.get_content_id("default:gravel")
|
||||
|
10
we.lua
10
we.lua
@ -1,3 +1,11 @@
|
||||
local function numk(tbl)
|
||||
local i = 0
|
||||
for a, b in pairs(tbl) do
|
||||
i = i + 1
|
||||
end
|
||||
return o
|
||||
end
|
||||
|
||||
function import_scm(scm)
|
||||
local f, err = io.open(minetest.get_modpath("mg").."/schems/"..scm..".we", "r")
|
||||
if not f then
|
||||
@ -48,7 +56,7 @@ function import_scm(scm)
|
||||
ent.meta = {fields={}, inventory={}}
|
||||
end
|
||||
local paramtype2 = minetest.registered_nodes[ent.name].paramtype2
|
||||
if paramtype2 ~= "facedir" and paramtype2 ~= "wallmounted" and #ent.meta.fields == 0 and #ent.meta.inventory == 0 then
|
||||
if paramtype2 ~= "facedir" and paramtype2 ~= "wallmounted" and numk(ent.meta.fields) == 0 and numk(ent.meta.inventory) == 0 then
|
||||
scm[ent.y][ent.x][ent.z] = minetest.get_content_id(ent.name)
|
||||
else
|
||||
if paramtype2 ~= "facedir" and paramtype2 ~= "wallmounted" then
|
||||
|
Loading…
x
Reference in New Issue
Block a user