Commit Graph

58 Commits

Author SHA1 Message Date
sfan5 acb3ecefe4 Split up some files in worldedit mod 2024-04-22 00:01:31 +02:00
fluxionary f75700ed76
Make //clearobjects remove unknown objects (#244) 2024-03-30 00:17:51 +01:00
sfan5 8f60e6f729 Fix clear_objects not working 2023-10-08 18:21:15 +02:00
nauta-turbidus b4202ea779
Trim trailing content when obtaining dedicated_server_step
This change trims anything starting with the first space from dedicated_server_step, including single-line comments following the configured value specifically, before using it for calculations. It fixes compatibility-breaking crashes with some mods/games, which change the mentioned value by adding a comment after it. Such a comment is, as far as I know, syntactically valid, and is accepted by the engine it seems.
2023-08-06 14:05:34 +02:00
HybridDog 689ff90a78
Remove unused variables and assignments 2023-06-19 18:24:31 +02:00
sfan5 7f7e928dd9 Switch bare vectors to vector.new() 2023-06-09 14:49:58 +02:00
sfan5 4378750498 Use minetest.get_objects_in_area when possible 2021-04-30 19:33:27 +02:00
sfan5 8feaf8a21d Fix area clearing step of negative //move's
fixes #187
2019-11-13 20:49:25 +01:00
sfan5 b4826aa821 Use faster vmanip copying for //move too 2019-09-17 18:42:11 +02:00
sfan5 a0181ea897 Delete old metadata when moving regions
This matches the behaviour before introduction of the vmanip code.
2019-09-17 18:03:19 +02:00
sfan5 2a4aaae8a2 Always use faster vmanip copying code
Since the code has two arrays of the area before and after,
the copy order is totally irrelevant.
Of course, this doesn't apply to metadata and we still need
to do that backwards.
2019-09-17 01:28:53 +02:00
sfan5 cc897150f2 Fix performance of //stack, //stack2 2019-09-08 22:14:07 +02:00
sfan5 f39a8e264d Faster moving using vmanips (in some cases) 2019-09-08 22:14:07 +02:00
sfan5 da5abec273 Faster copying using vmanips 2019-09-08 22:14:07 +02:00
Panquesito7 3ffecdd9c4 Replace deprecated functions with newer ones
These commits create compatibility with MT/MTG 5.0.0+.
However, these commits may/will break with the 0.4-series.
2019-07-17 01:23:40 +02:00
Pedro Gimeno 0aeee79af6 Implement full facedir and color* in //orient
Thanks to entuland for the Rhotator facedir to matrix and matrix to facedir code, which helped creating the tables.
2019-04-05 00:12:02 +02:00
sfan5 415000e797 Fix a few assignments to undeclared globals 2017-11-07 14:19:57 +01:00
Wuzzy 3c61759bae Allow to bulk-set param2 of regions (#144) 2017-09-05 14:40:46 +02:00
sfan5 92fe95fab7 Make //fixlight work again
The dig-air-nodes method seems to have stopped working a few Minetest version ago
2017-01-02 19:03:21 +01:00
sfan5 e0a2661700 Fix //stack2 not working (closes #94) 2016-01-05 13:57:48 +01:00
sfan5 ab47385f7b Fix crash (worldedit/manipulations.lua:526: attempt to call global 'set_node' (a nil value)) 2015-05-04 18:48:27 +02:00
ShadowNinja bb8456b711 Cleanup and fixup
Non-stylistic changes:
  * Add LuaDoc/LDoc support.
  * Fix `clear_objects` area size calculation.
  * Fix `clear_objects` removing player objects.
  * Fix shadowing of marker entity name with player name.
  * Make visualization functions use `swap_node`.
  * Make hidden nodes unwalkable.
  * Prevent `hide` from hiding air.
  * Make deprecated functions log to deprecated stream when called.
  * Fixed `replaceinverse` not using normalized node names.
  * Added .gitignore.
  * Bump version to 1.1.

Stylistic changes:
  * Change `x = function` to `function x`.
  * Change comment format.
  * Make  missing VoxelManip error less obnoxious.
  * Move `sort_pos` into `common.lua`, which is a required module.
  * Remove local copies of `minetest`.
  * Remove `worldedit = worldedit or {}` from modules.
  * Replace replaceinverse with an inverse argument to `replace`.
  * Added `error()`s on on invalid axes.
  * Change `wip` to `TODO`.
  * Rename `clearobjects` to `clear_objects`.
  * Remove `hollow_{sphere,dome,cylinder}` and replace them with a hollow parameter to each function.
  * Add helpers to reduce code duplication.
  * Renamed `Chat Commands.md` to `ChatCommands.md`.
2015-02-01 15:56:16 -05:00
KodexKy 5b03c83f6b Fix stack2 param
Fix stack2 amount count
Fix stack2 sign recognition for y & z
2014-12-16 02:14:22 -04:30
ShadowNinja e383e8ce00 Fix runtime error checking with lua* commands 2014-07-23 18:21:21 -04:00
Uberi d8aa7e72a7 Oops, fix //set. 2014-07-14 00:11:33 -04:00
Uberi 58d7a7134e Coding style updates. 2014-07-12 16:35:59 -04:00
Cy f5b67c5bc2 CPS-ifying stack
Continuation Passing Style lets me use minetest.after, so the server
gets a chance to not hang in between every stack iteration. Could even
set minetest.after(1000,nextone) if you want to see it extend once every
second.
2014-07-09 23:50:41 -07:00
Cy 6084db9335 Slight optimization to //set
Just noticed I box the one type version in a list, to avoid testing
whether it's the one type version, but have to test for that to decide
whether to box it or not. Should shave like a whole 3ms from each //set
command.
2014-07-09 23:34:27 -07:00
Uberi b70fd16da4 Oops, fix `//set`. 2014-07-07 14:06:33 -04:00
Uberi 9616c7d944 Update `stack2` API documentation. 2014-07-06 19:59:56 -04:00
Uberi 175ac211ca Documentation for `//stack2`, code style fixes, add author section to README. 2014-07-06 19:42:02 -04:00
Cy c22b556511 Improved stacking
This stack / copy uses a direction vector, so it's not limited to only
along the X/Y/Z axis, and can go diagonally. This enables things like
building staircases.
2014-06-30 16:14:14 -07:00
Cy 174416b010 Randomized set
Can /set node node2 node3 and it will randomly choose between those
three.
2014-06-30 16:13:44 -07:00
Uberi 674d6473e4 Improve node inspector to show player axis, replace //scale with //stretch, which supports per-axis stretching (full backwards compatibility retained), and secure schematic file loading functions. 2013-12-20 18:41:13 -05:00
Uberi 272541c9da Changes to support the latest schematic probability specification. 2013-08-16 16:57:35 -04:00
Anthony Zhang 8bd5db51b2 Final changes and version number bump. 2013-08-01 23:53:38 -04:00
Anthony Zhang b0bf52e9b6 Rewrite spirals from scratch and fix upside-down pyramids. Use voxelmanip for markers to ensure area is emerged. 2013-07-31 22:15:08 -04:00
Anthony Zhang 3c51ec8c4a //pyramid works along any axis and backwards. Working //clearobjects and //cylinder command, begin implementing super marker. Remove EnvRef usages and the block queue (the block queue does not work with VoxelManips). More block emergers. 2013-07-31 00:02:37 -04:00
Anthony Zhang 49b683f27f Support negative values to make upside-down domes and pyramids (slight changes to worldedit.pyramid interface for coming changes). Add experimental //clearobjects, make node inspector work per-player. 2013-07-29 12:43:24 -04:00
Anthony Zhang 8ebf9d3c2a Super duper VoxelManipulator speedups to nearly every API function, and plus support for unloaded areas. Still in progress. Also, fix //allocate for very large schematics. 2013-07-21 16:54:25 -04:00
Anthony Zhang ac5e801834 Even bigger speed gains by using LuaVoxelManipulator in a few choice places! Faster //set, //cylinder, etc., but plenty of room for improvements still. 2013-07-12 14:22:30 -04:00
Anthony Zhang 9db6192eba Avoid using slower and deprecated EnvRef, fix schematic data MapNodes, huge speed boost to worldedit.hollow_cylinder, fix some bugs. 2013-06-23 12:46:59 -04:00
Anthony Zhang 1e5f623cbb Super-speed a few primitives and visualization functions, including hollowsphere, sphere, hollowdome, dome, and suppress. 2013-06-22 23:08:51 -04:00
Anthony Zhang 7070f81c59 Significant but highly experimental speed-ups for worldedit.set, replace, and scale, plus preparation for more. 2013-06-22 20:59:23 -04:00
Anthony Zhang d4187866db Add `//scale <factor>` command (suggested by Jordach), fix transposition description in docs. 2013-06-18 15:05:49 -04:00
Anthony Zhang f952ee4740 Block queue doesn't lag anymore on slow operations like digging and placing nodes, better and more efficient //fixlight. 2013-05-30 19:13:21 -04:00
Sfan5 5e5c1dc6c3 Add Block Queue 2013-04-28 19:08:09 +02:00
Anthony Zhang 7eb102181b Fixed bug where unmodified axis used pos1 coords instead of pos2 coords. 2013-02-17 14:11:55 -05:00
Anthony Zhang 7cf84045d4 Replace //homogenize with //replaceinverse (//homogenize x is equivalent to //replaceinverse air x), add documentation for it. 2013-01-12 18:29:57 -05:00
Anthony Zhang c27ab877f1 New command: //orient, that rotates oriented nodes such as furnaces around the Y-axis by a specified angle. 2013-01-12 16:46:40 -05:00