mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-04 12:23:00 +00:00
core: fix bugs, enable!
This commit is contained in:
parent
4306035ef2
commit
c60b5c5bad
5 changed files with 13 additions and 12 deletions
|
@ -5,15 +5,16 @@
|
||||||
-- ██ ██ ███████ ██████ ██ ███████ ██ ███████ ██ ██
|
-- ██ ██ ███████ ██████ ██ ███████ ██ ███████ ██ ██
|
||||||
|
|
||||||
-- WorldEditAdditions chat command registration
|
-- WorldEditAdditions chat command registration
|
||||||
local we_c = worldeditadditions_core
|
local modpath = minetest.get_modpath("worldeditadditions_core")
|
||||||
|
local run_command = dofile(modpath.."/core/run_command.lua")
|
||||||
local run_command = dofile(we_c.modpath.."/core/run_command.lua")
|
|
||||||
|
|
||||||
local function log_error(cmdname, error_message)
|
local function log_error(cmdname, error_message)
|
||||||
minetest.log("error", "register_command("..cmdname..") error: "..error_message)
|
minetest.log("error", "register_command("..cmdname..") error: "..error_message)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function register_command(cmdname, options)
|
local function register_command(cmdname, options)
|
||||||
|
local we_c = worldeditadditions_core
|
||||||
|
|
||||||
---
|
---
|
||||||
-- 1: Validation
|
-- 1: Validation
|
||||||
---
|
---
|
||||||
|
|
|
@ -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.
|
-- 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 modpath = minetest.get_modpath("worldeditadditions_core")
|
||||||
local human_size = dofile(we_c.modpath.."/core/lib/human_size.lua")
|
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)
|
-- TODO: Reimplement worldedit.player_notify(player_name, msg_text)
|
||||||
|
|
||||||
|
@ -15,6 +14,7 @@ local function run_command_stage2(player_name, func, parse_result)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function run_command(cmdname, options, player_name, paramtext)
|
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
|
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.")
|
worldedit.player_notify(player_name, "Error: pos1 must be selected to use this command.")
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
local worldedit_command_y, worldedit_command_n
|
local worldedit_command_y, worldedit_command_n
|
||||||
|
|
||||||
if minetest.global_exists("worldedit") then
|
if minetest.global_exists("worldedit") then
|
||||||
worldedit_command_y = minetest.registered_commands["/y"].func
|
worldedit_command_y = minetest.chatcommands["/y"].func
|
||||||
worldedit_command_n = minetest.registered_commands["/n"].func
|
worldedit_command_n = minetest.chatcommands["/n"].func
|
||||||
end
|
end
|
||||||
|
|
||||||
--- A table that holds at most 1 pending function call per player.
|
--- A table that holds at most 1 pending function call per player.
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
-- @license Mozilla Public License, 2.0
|
-- @license Mozilla Public License, 2.0
|
||||||
-- @author Starbeamrainbowlabs and VorTechnix
|
-- @author Starbeamrainbowlabs and VorTechnix
|
||||||
|
|
||||||
local temp = true
|
-- local temp = true
|
||||||
if temp then return end
|
-- if temp then return end
|
||||||
-- This mod isn't finished yet, so it will not be executed for now.
|
-- This mod isn't finished yet, so it will not be executed for now.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = worldeditadditions_core
|
name = worldeditadditions_core
|
||||||
description = worldeditadditions: core components
|
description = worldeditadditions: core components
|
||||||
optional_depends = worldedit
|
optional_depends = worldedit, worldedit_commands, worldedit_shortcommands
|
||||||
|
|
Loading…
Reference in a new issue