1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-07-04 09:00:36 +02:00

Add initial support for Minetest schematic API

Thanks to kwolekr for the code
This commit is contained in:
Sfan5
2013-06-22 08:24:54 +02:00
parent d4187866db
commit a192d51a58
2 changed files with 126 additions and 1 deletions

View File

@ -277,4 +277,25 @@ Executes <code> as a Lua chunk in the global namespace.
Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.
//luatransform minetest.env:add_node(pos, {name="default:stone"})
//luatransform if minetest.env:get_node(pos).name == "air" then minetest.env:add_node(pos, {name="default:water_source"})
//luatransform if minetest.env:get_node(pos).name == "air" then minetest.env:add_node(pos, {name="default:water_source"})
### //mtschemcreate <file>
Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/<file>.mts".
//mtschemcreate some random filename
//mtschemcreate huge_base
### //mtschemplace <file>
Load nodes from "(world folder)/schems/<file>.mts" with position 1 of the current WorldEdit region as the origin.
//mtschemplace some random filename
//mtschemplace huge_base
### //mtschemprob start/finish/get
After using //mtschemprob start all nodes punched will bring up a text field where a probablity can be entered.
This mode can be left with //mtschemprob finish. //mtschemprob get will display the probabilities saved for the nodes.
//mtschemprob get