mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Place schematic (on vmanip): Enable use of 'place center' flags
For 'place schematic' and 'place schematic on vmanip' APIs. Fix 'place center' code to properly centre schematics. Fix some comments.
This commit is contained in:
parent
6c9df2ffa7
commit
c610643c4c
4 changed files with 40 additions and 18 deletions
|
@ -3276,7 +3276,7 @@ These functions return the leftover itemstack.
|
|||
* If slice probability list equals `nil`, no slice probabilities are applied.
|
||||
* Saves schematic in the Minetest Schematic format to filename.
|
||||
|
||||
* `minetest.place_schematic(pos, schematic, rotation, replacements, force_placement)`
|
||||
* `minetest.place_schematic(pos, schematic, rotation, replacements, force_placement, flags)`
|
||||
* Place the schematic specified by schematic (see: Schematic specifier) at `pos`.
|
||||
* `rotation` can equal `"0"`, `"90"`, `"180"`, `"270"`, or `"random"`.
|
||||
* If the `rotation` parameter is omitted, the schematic is not rotated.
|
||||
|
@ -3288,14 +3288,22 @@ These functions return the leftover itemstack.
|
|||
will always use the cached version and the replacement list defined for it,
|
||||
regardless of whether the file or the replacement list parameter have changed.
|
||||
The only way to load the file anew is to restart the server.
|
||||
* `flags` is a flag field with the available flags:
|
||||
* place_center_x
|
||||
* place_center_y
|
||||
* place_center_z
|
||||
|
||||
* `minetest.place_schematic_on_vmanip(vmanip, pos, schematic, rotation, replacement, force_placement)`:
|
||||
* `minetest.place_schematic_on_vmanip(vmanip, pos, schematic, rotation, replacement, force_placement, flags)`:
|
||||
* This function is analogous to minetest.place_schematic, but places a schematic onto the
|
||||
specified VoxelManip object `vmanip` instead of the whole map.
|
||||
* Returns false if any part of the schematic was cut-off due to the VoxelManip not
|
||||
containing the full area required, and true if the whole schematic was able to fit.
|
||||
* Returns nil if the schematic could not be loaded.
|
||||
* After execution, any external copies of the VoxelManip contents are invalidated.
|
||||
* `flags` is a flag field with the available flags:
|
||||
* place_center_x
|
||||
* place_center_y
|
||||
* place_center_z
|
||||
|
||||
* `minetest.serialize_schematic(schematic, format, options)`
|
||||
* Return the serialized schematic specified by schematic (see: Schematic specifier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue