core: fix bugs, enable!

This commit is contained in:
Starbeamrainbowlabs 2022-05-19 01:45:36 +01:00
parent 4306035ef2
commit c60b5c5bad
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
5 changed files with 13 additions and 12 deletions

View file

@ -5,15 +5,16 @@
-- ██ ██ ███████ ██████ ██ ███████ ██ ███████ ██ ██
-- WorldEditAdditions chat command registration
local we_c = worldeditadditions_core
local run_command = dofile(we_c.modpath.."/core/run_command.lua")
local modpath = minetest.get_modpath("worldeditadditions_core")
local run_command = dofile(modpath.."/core/run_command.lua")
local function log_error(cmdname, error_message)
minetest.log("error", "register_command("..cmdname..") error: "..error_message)
end
local function register_command(cmdname, options)
local we_c = worldeditadditions_core
---
-- 1: Validation
---

View file

@ -1,8 +1,7 @@
local we_c = worldeditadditions_core
-- WARNING: safe_region MUST NOT be imported more than once, as it defines chat commands. If you want to import it again elsewhere, check first that multiple dofile() calls don't execute a file more than once.
local safe_region = dofile(we_c.modpath.."/core/safe_region.lua")
local human_size = dofile(we_c.modpath.."/core/lib/human_size.lua")
local modpath = minetest.get_modpath("worldeditadditions_core")
local safe_region = dofile(modpath.."/core/safe_region.lua")
local human_size = dofile(modpath.."/core/lib/human_size.lua")
-- TODO: Reimplement worldedit.player_notify(player_name, msg_text)
@ -15,6 +14,7 @@ local function run_command_stage2(player_name, func, parse_result)
end
local function run_command(cmdname, options, player_name, paramtext)
local we_c = worldeditadditions_core
if options.require_pos > 0 and not worldedit.pos1[player_name] then
worldedit.player_notify(player_name, "Error: pos1 must be selected to use this command.")
return false

View file

@ -8,8 +8,8 @@
local worldedit_command_y, worldedit_command_n
if minetest.global_exists("worldedit") then
worldedit_command_y = minetest.registered_commands["/y"].func
worldedit_command_n = minetest.registered_commands["/n"].func
worldedit_command_y = minetest.chatcommands["/y"].func
worldedit_command_n = minetest.chatcommands["/n"].func
end
--- A table that holds at most 1 pending function call per player.

View file

@ -5,8 +5,8 @@
-- @license Mozilla Public License, 2.0
-- @author Starbeamrainbowlabs and VorTechnix
local temp = true
if temp then return end
-- local temp = true
-- if temp then return end
-- This mod isn't finished yet, so it will not be executed for now.

View file

@ -1,3 +1,3 @@
name = worldeditadditions_core
description = worldeditadditions: core components
optional_depends = worldedit
optional_depends = worldedit, worldedit_commands, worldedit_shortcommands