2018-05-20 11:52:16 +01:00
--- WorldEditAdditions-ChatCommands
-- @module worldeditadditions_commands
-- @release 0.1
-- @copyright 2018 Starbeamrainbowlabs
-- @license Mozilla Public License, 2.0
-- @author Starbeamrainbowlabs
2020-05-03 00:37:18 +01:00
worldeditadditions_commands = { }
local we_c = worldeditadditions_commands
2018-10-14 00:19:32 +01:00
2020-05-03 00:37:18 +01:00
we_c.modpath = minetest.get_modpath ( " worldeditadditions_commands " )
2018-05-20 14:46:54 +01:00
2020-06-26 21:15:13 +01:00
dofile ( we_c.modpath .. " /player_notify_suppress.lua " )
2018-06-09 13:05:09 +01:00
2020-05-11 02:02:02 +01: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 13:05:09 +01:00
2021-03-15 20:51:23 -07:00
dofile ( we_c.modpath .. " /commands/convolve.lua " )
dofile ( we_c.modpath .. " /commands/ellipsoid.lua " )
dofile ( we_c.modpath .. " /commands/erode.lua " )
dofile ( we_c.modpath .. " /commands/fillcaves.lua " )
2020-05-03 00:37:18 +01:00
dofile ( we_c.modpath .. " /commands/floodfill.lua " )
2021-03-15 20:51:23 -07:00
dofile ( we_c.modpath .. " /commands/hollow.lua " )
2020-06-11 00:38:16 +01:00
dofile ( we_c.modpath .. " /commands/layers.lua " )
2021-01-16 18:36:17 +00:00
dofile ( we_c.modpath .. " /commands/line.lua " )
2020-05-03 00:37:18 +01:00
dofile ( we_c.modpath .. " /commands/maze.lua " )
2021-07-03 22:53:16 +01:00
dofile ( we_c.modpath .. " /commands/noise2d.lua " )
2021-03-15 20:51:23 -07:00
dofile ( we_c.modpath .. " /commands/overlay.lua " )
2020-05-14 21:37:27 +01:00
dofile ( we_c.modpath .. " /commands/replacemix.lua " )
2021-02-07 23:39:09 +00:00
dofile ( we_c.modpath .. " /commands/scale.lua " )
2021-03-15 20:51:23 -07:00
dofile ( we_c.modpath .. " /commands/torus.lua " )
dofile ( we_c.modpath .. " /commands/walls.lua " )
2020-05-11 02:02:02 +01:00
2020-05-12 00:38:42 +01:00
dofile ( we_c.modpath .. " /commands/count.lua " )
2020-05-11 21:44:18 +01:00
2021-07-18 17:27:21 -07:00
-- Meta Commands
dofile ( we_c.modpath .. " /commands/meta/init.lua " )
2020-06-26 02:13:11 +01:00
2021-06-27 14:39:36 -07:00
-- Selection Tools
dofile ( we_c.modpath .. " /commands/selectors/init.lua " )
2021-02-24 08:40:53 -08:00
2021-06-28 21:15:47 -07:00
-- Measure Tools
dofile ( we_c.modpath .. " /commands/measure/init.lua " )
2021-07-18 13:12:19 -07:00
-- Wireframe
dofile ( we_c.modpath .. " /commands/wireframe/init.lua " )
2021-02-24 08:40:53 -08:00
dofile ( we_c.modpath .. " /commands/extra/saplingaliases.lua " )
dofile ( we_c.modpath .. " /commands/extra/basename.lua " )
2020-05-11 02:02:02 +01:00
-- Don't registry the //bonemeal command if the bonemeal mod isn't present
if minetest.get_modpath ( " bonemeal " ) then
dofile ( we_c.modpath .. " /commands/bonemeal.lua " )
2020-09-14 02:12:05 +01:00
dofile ( we_c.modpath .. " /commands/forest.lua " )
2020-05-11 02:02:02 +01:00
else
2020-09-14 02:12:05 +01: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 02:02:02 +01:00
end
2020-06-11 01:00:19 +01:00
2021-05-30 16:18:08 +01: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 01:00:19 +01:00
worldedit.alias_command ( " smoothadv " , " convolve " )
worldedit.alias_command ( " conv " , " convolve " )
worldedit.alias_command ( " naturalise " , " layers " )
worldedit.alias_command ( " naturalize " , " layers " )
worldedit.alias_command ( " flora " , " bonemeal " )
2021-03-15 20:51:23 -07:00
2021-06-28 21:15:47 -07:00
-- Measure Tools
worldedit.alias_command ( " mcount " , " count " )
worldedit.alias_command ( " mfacing " , " mface " )