mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-04 21:13:50 +01:00
weaschem: adjust call to make testable
really annoying how the test environment & MT have different import schemes.....
This commit is contained in:
parent
6f35ff3313
commit
3b7e91b3b7
@ -1,12 +1,14 @@
|
|||||||
local weac = worldeditadditions_core
|
local weac = worldeditadditions_core
|
||||||
local Vector3
|
local Vector3
|
||||||
local parse_json
|
local parse_json, split
|
||||||
if worldeditadditions_core then
|
if worldeditadditions_core then
|
||||||
Vector3 = weac.Vector3
|
Vector3 = weac.Vector3
|
||||||
parse_json = weac.parse.json
|
parse_json = weac.parse.json
|
||||||
|
split = weac.split
|
||||||
else
|
else
|
||||||
Vector3 = require("worldeditadditions_core.utils.vector3")
|
Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||||
parse_json = require("worldeditadditions_core.utils.parse.json")
|
parse_json = require("worldeditadditions_core.utils.parse.json")
|
||||||
|
split = require("worldeditadditions_core.utils.strings.split")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -148,7 +150,7 @@ end
|
|||||||
|
|
||||||
function weaschem.parse_data_table(source)
|
function weaschem.parse_data_table(source)
|
||||||
local data_table = {}
|
local data_table = {}
|
||||||
local values = weac.split(source, ",", true)
|
local values = split(source, ",", true)
|
||||||
local i = 0
|
local i = 0
|
||||||
for _, next_val in pairs(values) do
|
for _, next_val in pairs(values) do
|
||||||
if next_val:find("x") ~= nil then
|
if next_val:find("x") ~= nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user