diff --git a/worldeditadditions_commands/commands/meta/listentities.lua b/worldeditadditions_commands/commands/meta/listentities.lua index 538b964..46fe163 100644 --- a/worldeditadditions_commands/commands/meta/listentities.lua +++ b/worldeditadditions_commands/commands/meta/listentities.lua @@ -1,6 +1,6 @@ -- Lists all currently loaded entities. -local weac = worldeditadditions_core +local wea_c = worldeditadditions_core minetest.register_chatcommand("/listentities", { params = "", @@ -22,16 +22,16 @@ minetest.register_chatcommand("/listentities", { obj_name = "[LuaEntity:__UNKNOWN__]" end end - local pos = weac.Vector3.clone(obj:get_pos()) + local pos = wea_c.Vector3.clone(obj:get_pos()) table.insert(table_vals, { id, obj_name, tostring(pos) }) end - worldedit.player_notify(name, table.concat({ + wea_c.notify.info(name, table.concat({ "Currently loaded entities:", - weac.format.make_ascii_table(table_vals), + wea_c.format.make_ascii_table(table_vals), "", "Total "..tostring(#table_vals).." objects" }, "\n")) diff --git a/worldeditadditions_commands/commands/meta/macro.lua b/worldeditadditions_commands/commands/meta/macro.lua index 62ff894..35b4ec5 100644 --- a/worldeditadditions_commands/commands/meta/macro.lua +++ b/worldeditadditions_commands/commands/meta/macro.lua @@ -41,7 +41,7 @@ local function step(params) -- If we haven't run out of values call function again minetest.after(params.delay, step, params) -- Time is in seconds else - worldedit.player_notify(params.player_name, "The macro \"".. + wea_c.notify.ok(params.player_name, "The macro \"".. params.file.."\" was completed in " .. wea_c.format.human_time(params.time)) end diff --git a/worldeditadditions_commands/commands/meta/many.lua b/worldeditadditions_commands/commands/meta/many.lua index 53b7f30..bcc7e10 100644 --- a/worldeditadditions_commands/commands/meta/many.lua +++ b/worldeditadditions_commands/commands/meta/many.lua @@ -7,7 +7,7 @@ local function step(params) local start_time = wea_c.get_ms_time() local full_cmd = params.cmd_name.." "..params.args - worldedit.player_notify(params.name, string.format("[ many | /%s ] %d / %d (~%.2f%%) complete | last: %s, average: %s, ETA: ~%s", + wea_c.notify.info(params.name, string.format("[ many | /%s ] %d / %d (~%.2f%%) complete | last: %s, average: %s, ETA: ~%s", full_cmd, (params.i + 1), params.count, ((params.i + 1) / params.count)*100, @@ -53,7 +53,7 @@ local function step(params) table.insert(done_message, table.concat(message_parts, ", ")) end table.insert(done_message, ")") - worldedit.player_notify(params.name, table.concat(done_message, "")) + wea_c.notify.ok(params.name, table.concat(done_message, "")) end end diff --git a/worldeditadditions_commands/commands/meta/multi.lua b/worldeditadditions_commands/commands/meta/multi.lua index 8e70755..4dfbf42 100644 --- a/worldeditadditions_commands/commands/meta/multi.lua +++ b/worldeditadditions_commands/commands/meta/multi.lua @@ -29,7 +29,7 @@ minetest.register_chatcommand("/multi", { if not args then args = "" end -- print("command_name", command_name) - worldedit.player_notify(name, "#"..i..": "..command) + wea_c.notify.info(name, "#"..i..": "..command) local cmd = minetest.registered_chatcommands[command_name] if not cmd then @@ -61,6 +61,6 @@ minetest.register_chatcommand("/multi", { table.insert(done_message, table.concat(message_parts, ", ")) table.insert(done_message, ")") - worldedit.player_notify(name, table.concat(done_message, "")) + wea_c.notify.ok(name, table.concat(done_message, "")) end }) diff --git a/worldeditadditions_commands/commands/selectors/pos1-2.lua b/worldeditadditions_commands/commands/selectors/pos1-2.lua index 44c2732..d8e00e0 100644 --- a/worldeditadditions_commands/commands/selectors/pos1-2.lua +++ b/worldeditadditions_commands/commands/selectors/pos1-2.lua @@ -53,7 +53,7 @@ minetest.register_chatcommand("//pos", { func = function(name, params_text) local i = tonumber(params_text) if type(i) ~= "number" then - worldedit.player_notify(name, "Error: Invalid index number given.") + weac.notify.error(name, "Error: Invalid index number given.") return end i = math.floor(i) diff --git a/worldeditadditions_commands/commands/selectors/scloud.lua b/worldeditadditions_commands/commands/selectors/scloud.lua index 07289b1..6dc75a9 100644 --- a/worldeditadditions_commands/commands/selectors/scloud.lua +++ b/worldeditadditions_commands/commands/selectors/scloud.lua @@ -13,7 +13,7 @@ minetest.register_on_punchnode(function(pos, node, puncher) if wea.add_pos[name] > 0 then wea.selection.add_point(name, pos) wea.add_pos[name] = wea.add_pos[name] - 1 - worldedit.player_notify(name, "You have "..wea.add_pos[name].." nodes left to punch") + wea_c.notify.info(name, "You have "..wea.add_pos[name].." nodes left to punch") else wea.add_pos[name] = nil end end end) diff --git a/worldeditadditions_commands/commands/selectors/unmark.lua b/worldeditadditions_commands/commands/selectors/unmark.lua index 90ac999..0c72e3b 100644 --- a/worldeditadditions_commands/commands/selectors/unmark.lua +++ b/worldeditadditions_commands/commands/selectors/unmark.lua @@ -28,7 +28,7 @@ local function do_unmark(name, params_text) if params_text == "all" then local removed = do_unmark_all() - worldedit.player_notify(name, "Hidden "..removed.." marker entities") + weac.notify.info(name, "Hidden "..removed.." marker entities") else -- Hide the WorldEditAdditions marker weac.pos.unmark(name) diff --git a/worldeditadditions_core/core/safe_function.lua b/worldeditadditions_core/core/safe_function.lua index 150e4fb..e6aa688 100644 --- a/worldeditadditions_core/core/safe_function.lua +++ b/worldeditadditions_core/core/safe_function.lua @@ -57,7 +57,7 @@ Please add any other additional specific system information here too if you thin }, "") print("DEBUG:player_notify player_name", player_name, "msg_compiled", msg_compiled) - worldedit.player_notify(player_name, msg_compiled) + weac.notify.error(player_name, msg_compiled) end diff --git a/worldeditadditions_core/core/safe_region.lua b/worldeditadditions_core/core/safe_region.lua index e85b011..2d5bc7b 100644 --- a/worldeditadditions_core/core/safe_region.lua +++ b/worldeditadditions_core/core/safe_region.lua @@ -5,6 +5,7 @@ -- ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ -- ███████ ██ ██ ██ ███████ ██ ██ ███████ ██████ ██ ██████ ██ ████ +local weac = worldeditadditions_core --- -- @module worldeditadditions_core local worldedit_command_y, worldedit_command_n @@ -41,7 +42,7 @@ minetest.override_chatcommand("/y", { if minetest.global_exists("worldedit") and worldedit_command_y ~= nil then worldedit_command_y(player_name) else - worldedit.player_notify(player_name, "There aren't any pending operations at the moment.") + weac.notify.info(player_name, "There aren't any pending operations at the moment.") end else pending_calls[player_name].func() @@ -58,10 +59,10 @@ minetest.override_chatcommand("/n", { if minetest.global_exists("worldedit") and worldedit_command_y ~= nil then worldedit_command_n(player_name) else - worldedit.player_notify(player_name, "There aren't any operations pending, so there's nothing to abort.") + weac.notify.info(player_name, "There aren't any operations pending, so there's nothing to abort.") end else - worldedit.player_notify(player_name, "Aborting captured command /"..pending_calls[player_name].cmdname..".") + weac.notify.info(player_name, "Aborting captured command /"..pending_calls[player_name].cmdname..".") pending_calls[player_name] = nil end end