Add snowy pine tree. Comment-out mkdir lines. Rename folder to schematics

This commit is contained in:
paramat 2015-04-29 19:57:56 +01:00
parent bc633c9fae
commit 56da9f8dbf
6 changed files with 496 additions and 8 deletions

View File

@ -1,4 +1,4 @@
saveschems 0.1.0 by paramat saveschems 0.1.1 by paramat
For latest Minetest 0.4.12dev For latest Minetest 0.4.12dev
Depends default Depends default
License WTFPL License WTFPL

502
init.lua
View File

@ -230,10 +230,10 @@ local apple_tree_serialized = minetest.serialize_schematic(
mts, mts,
{register_after_load = false} {register_after_load = false}
) )
local path = minetest.get_modpath("saveschems") .. "/schems" local path = minetest.get_modpath("saveschems") .. "/schematics"
local filename = path .. "/apple_tree.mts" local filename = path .. "/apple_tree.mts"
filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\") -- escape any nasty characters filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\") -- escape any nasty characters
os.execute("mkdir \"" .. path .. "\"") -- create directory if it does not already exist -- os.execute("mkdir \"" .. path .. "\"") -- create directory if it does not already exist
local file, err = io.open(filename, "wb") local file, err = io.open(filename, "wb")
if err == nil then if err == nil then
file:write(apple_tree_serialized) file:write(apple_tree_serialized)
@ -777,10 +777,10 @@ local jungle_tree_serialized = minetest.serialize_schematic(
mts, mts,
{register_after_load = false} {register_after_load = false}
) )
local path = minetest.get_modpath("saveschems") .. "/schems" local path = minetest.get_modpath("saveschems") .. "/schematics"
local filename = path .. "/jungle_tree.mts" local filename = path .. "/jungle_tree.mts"
filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\") -- escape any nasty characters filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\") -- escape any nasty characters
os.execute("mkdir \"" .. path .. "\"") -- create directory if it does not already exist -- os.execute("mkdir \"" .. path .. "\"") -- create directory if it does not already exist
local file, err = io.open(filename, "wb") local file, err = io.open(filename, "wb")
if err == nil then if err == nil then
file:write(jungle_tree_serialized) file:write(jungle_tree_serialized)
@ -789,7 +789,7 @@ if err == nil then
end end
pine_tree_data = { local pine_tree_data = {
size = {x=5, y=14, z=5}, size = {x=5, y=14, z=5},
data = {-- -2 data = {-- -2
@ -1234,10 +1234,10 @@ local pine_tree_serialized = minetest.serialize_schematic(
mts, mts,
{register_after_load = false} {register_after_load = false}
) )
local path = minetest.get_modpath("saveschems") .. "/schems" local path = minetest.get_modpath("saveschems") .. "/schematics"
local filename = path .. "/pine_tree.mts" local filename = path .. "/pine_tree.mts"
filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\") -- escape any nasty characters filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\") -- escape any nasty characters
os.execute("mkdir \"" .. path .. "\"") -- create directory if it does not already exist -- os.execute("mkdir \"" .. path .. "\"") -- create directory if it does not already exist
local file, err = io.open(filename, "wb") local file, err = io.open(filename, "wb")
if err == nil then if err == nil then
file:write(pine_tree_serialized) file:write(pine_tree_serialized)
@ -1245,3 +1245,491 @@ if err == nil then
file:close() file:close()
end end
local snowy_pine_tree_data = {
size = {x=5, y=15, z=5},
data = {-- -2
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
-- -1
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=8},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=8},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=8},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
-- 0
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pinetree", param1=127, param2=16},
{name="default:pinetree", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=12},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pinetree", param1=127, param2=16},
{name="default:pinetree", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=12},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pinetree", param1=127, param2=16},
{name="default:pinetree", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=12},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pinetree", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
-- 1
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=4},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=4},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pinetree", param1=127, param2=4},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:pine_needles", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
-- 2
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:pine_needles", param1=223, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="default:snow", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
{name="ignore", param1=255, param2=0},
},
yslice_prob = {
{ypos=0, prob=127},
{ypos=1, prob=127},
{ypos=7, prob=127},
{ypos=10, prob=127},
},
}
local snowy_pine_tree_serialized = minetest.serialize_schematic(
snowy_pine_tree_data,
mts,
{register_after_load = false}
)
local path = minetest.get_modpath("saveschems") .. "/schematics"
local filename = path .. "/snowy_pine_tree.mts"
filename = filename:gsub("\"", "\\\""):gsub("\\", "\\\\") -- escape any nasty characters
-- os.execute("mkdir \"" .. path .. "\"") -- create directory if it does not already exist
local file, err = io.open(filename, "wb")
if err == nil then
file:write(snowy_pine_tree_serialized)
file:flush()
file:close()
end

Binary file not shown.