LeMagnesium 4b8a13c4a4 Moves sources, adds schematics and fixes map code
- The .py files are moved in a folder called 'src'
 - Schematics: Adds schematics. They are compatible with minetest's mts format. A Schematic object can import a mts file, read binary data, export its data into a BytesIO stream, and write its binary data to a file readable by minetest
 - Map: MapInterfaces can now be requested to copy a part of a map delimited by two positions in space into a Schematic object, later usable and savable. Mapblocks' nodes now show their correct position in the world. Mapblocks also store their mapblock position and the integer representing that position in the mapblock grid. MapVessels' methods' naming convention is also unified
 - Test: The picture building function is removed. Messages are added to the test functions, and a new one is implemented, removing all unknown items once provided with a map.sqlite file and another file containing all known nodes' itemstrings (dumped from the minetest server)
 - Tools: A mod was developed to be used in minetest in order to dump the known nodes list. Copy the mod and use /dumpnodes for this
2016-02-18 23:37:55 +01:00

17 lines
429 B
Lua

minetest.register_chatcommand("dumpnodes", {
privs = {server = true},
description = "Dumps all known nodes in a file",
func = function()
local f = io.open(minetest.get_modpath("devel") .. "/knownnodes.txt", "w")
for node in pairs(minetest.registered_nodes) do
f:write(node)
f:write('\n')
end
f:flush()
f:close()
return true, "Nodes dumped in " .. minetest.get_modpath("devel") .. "/knownnodes.txt"
end
})