2018-05-20 12:52:16 +02:00
--- WorldEditAdditions-ChatCommands
-- @module worldeditadditions_commands
-- @release 0.1
-- @copyright 2018 Starbeamrainbowlabs
-- @license Mozilla Public License, 2.0
-- @author Starbeamrainbowlabs
2020-05-03 01:37:18 +02:00
worldeditadditions_commands = { }
local we_c = worldeditadditions_commands
2018-10-14 01:19:32 +02:00
2020-05-03 01:37:18 +02:00
we_c.modpath = minetest.get_modpath ( " worldeditadditions_commands " )
2018-05-20 15:46:54 +02:00
2020-06-26 22:15:13 +02:00
dofile ( we_c.modpath .. " /player_notify_suppress.lua " )
2018-06-09 14:05:09 +02:00
2020-05-11 03:02:02 +02:00
-- We no longer need our own implementation of safe_region thanks to @sfan5's
-- suggestion in issue #5 - yay!
-- we_c.safe_region, we_c.check_region, we_c.reset_pending
-- = dofile(we_c.modpath.."/safe.lua")
2018-06-09 14:05:09 +02:00
2021-03-16 04:51:23 +01:00
dofile ( we_c.modpath .. " /commands/convolve.lua " )
dofile ( we_c.modpath .. " /commands/ellipsoid.lua " )
2021-10-14 02:50:27 +02:00
dofile ( we_c.modpath .. " /commands/ellipsoid2.lua " )
2021-03-16 04:51:23 +01:00
dofile ( we_c.modpath .. " /commands/erode.lua " )
dofile ( we_c.modpath .. " /commands/fillcaves.lua " )
2020-05-03 01:37:18 +02:00
dofile ( we_c.modpath .. " /commands/floodfill.lua " )
2021-03-16 04:51:23 +01:00
dofile ( we_c.modpath .. " /commands/hollow.lua " )
2020-06-11 01:38:16 +02:00
dofile ( we_c.modpath .. " /commands/layers.lua " )
2021-01-16 19:36:17 +01:00
dofile ( we_c.modpath .. " /commands/line.lua " )
2020-05-03 01:37:18 +02:00
dofile ( we_c.modpath .. " /commands/maze.lua " )
2021-07-03 23:53:16 +02:00
dofile ( we_c.modpath .. " /commands/noise2d.lua " )
2021-03-16 04:51:23 +01:00
dofile ( we_c.modpath .. " /commands/overlay.lua " )
2020-05-14 22:37:27 +02:00
dofile ( we_c.modpath .. " /commands/replacemix.lua " )
2021-02-08 00:39:09 +01:00
dofile ( we_c.modpath .. " /commands/scale.lua " )
2021-03-16 04:51:23 +01:00
dofile ( we_c.modpath .. " /commands/torus.lua " )
dofile ( we_c.modpath .. " /commands/walls.lua " )
2021-10-31 16:11:01 +01:00
dofile ( we_c.modpath .. " /commands/spiral2.lua " )
2021-11-11 03:20:37 +01:00
dofile ( we_c.modpath .. " /commands/copy.lua " )
2021-11-13 13:36:10 +01:00
dofile ( we_c.modpath .. " /commands/move.lua " )
2022-05-15 16:27:43 +02:00
dofile ( we_c.modpath .. " /commands/dome.lua " )
2022-05-16 21:14:31 +02:00
dofile ( we_c.modpath .. " /commands/metaball.lua " )
2020-05-12 01:38:42 +02:00
dofile ( we_c.modpath .. " /commands/count.lua " )
2021-12-28 16:22:51 +01:00
dofile ( we_c.modpath .. " /commands/sculpt.lua " )
2020-05-11 22:44:18 +02:00
2021-07-19 02:27:21 +02:00
-- Meta Commands
dofile ( we_c.modpath .. " /commands/meta/init.lua " )
2020-06-26 03:13:11 +02:00
2021-06-27 23:39:36 +02:00
-- Selection Tools
dofile ( we_c.modpath .. " /commands/selectors/init.lua " )
2021-02-24 17:40:53 +01:00
2021-06-29 06:15:47 +02:00
-- Measure Tools
dofile ( we_c.modpath .. " /commands/measure/init.lua " )
2021-07-18 22:12:19 +02:00
-- Wireframe
dofile ( we_c.modpath .. " /commands/wireframe/init.lua " )
2021-02-24 17:40:53 +01:00
dofile ( we_c.modpath .. " /commands/extra/saplingaliases.lua " )
dofile ( we_c.modpath .. " /commands/extra/basename.lua " )
2021-12-27 04:11:52 +01:00
dofile ( we_c.modpath .. " /commands/extra/sculptlist.lua " )
2021-02-24 17:40:53 +01:00
2021-12-27 04:11:52 +01:00
-- Don't register the //bonemeal command if the bonemeal mod isn't present
2021-10-25 16:18:03 +02:00
if minetest.global_exists ( " bonemeal " ) then
2020-05-11 03:02:02 +02:00
dofile ( we_c.modpath .. " /commands/bonemeal.lua " )
2020-09-14 03:12:05 +02:00
dofile ( we_c.modpath .. " /commands/forest.lua " )
2020-05-11 03:02:02 +02:00
else
2020-09-14 03:12:05 +02:00
minetest.log ( " action " , " [WorldEditAdditions] bonemeal mod not detected: //bonemeal and //forest commands not registered (if you see this message and you're using an alternative mod that provides bonemeal, please get in touch by opening an issue) " )
2020-05-11 03:02:02 +02:00
end
2020-06-11 02:00:19 +02:00
2021-05-30 17:18:08 +02:00
-- Minetest doesn't allow you to read from files outside the mod
-- directory - even if you're part of a modpack you can't read from the main
-- modpack directory. Furthermore, symlinks don't help.
-- If you have a solution to this issue, please comment on this GitHub issue:
-- https://github.com/sbrl/Minetest-WorldEditAdditions/issues/55
-- NOTE TO SELF: When uncommenting this, also add "doc?" to depends.txt
-- if minetest.get_modpath("doc") then
-- dofile(we_c.modpath.."/doc/init.lua")
-- else
-- minetest.log("action", "[WorldEditAdditions] doc mod not detected: not registering doc category with extended help")
-- end
2020-06-11 02:00:19 +02:00
2022-05-16 21:33:04 +02:00
dofile ( we_c.modpath .. " /aliases.lua " )
2021-11-11 03:54:44 +01:00
--- Overrides to core WorldEdit commands
-- These are commented out for now, as they could be potentially dangerous to stability
-- Thorough testing is required of our replacement commands before these are uncommented
-- TODO: Depend on worldeditadditions_core before uncommenting this
2021-12-27 04:11:52 +01:00
-- BUG: //move+ seems to be leaving stuff behind for some strange reason --@sbrl 2021-12-26
2021-11-11 03:54:44 +01:00
-- worldeditadditions_core.alias_override("copy", "copy+")
2021-11-13 13:49:21 +01:00
-- worldeditadditions_core.alias_override("move", "move+") -- MAY have issues where it doesn't overwrite the old region properly, but haven't been able to reliably reproduce this
2021-11-11 03:54:44 +01:00
-- worldeditadditions_core.alias_override("replace", "replacemix")