mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-23 12:05:01 +00: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 changed files with 4 additions and 2 deletions
|
@ -1,12 +1,14 @@
|
|||
local weac = worldeditadditions_core
|
||||
local Vector3
|
||||
local parse_json
|
||||
local parse_json, split
|
||||
if worldeditadditions_core then
|
||||
Vector3 = weac.Vector3
|
||||
parse_json = weac.parse.json
|
||||
split = weac.split
|
||||
else
|
||||
Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
parse_json = require("worldeditadditions_core.utils.parse.json")
|
||||
split = require("worldeditadditions_core.utils.strings.split")
|
||||
end
|
||||
|
||||
|
||||
|
@ -148,7 +150,7 @@ end
|
|||
|
||||
function weaschem.parse_data_table(source)
|
||||
local data_table = {}
|
||||
local values = weac.split(source, ",", true)
|
||||
local values = split(source, ",", true)
|
||||
local i = 0
|
||||
for _, next_val in pairs(values) do
|
||||
if next_val:find("x") ~= nil then
|
||||
|
|
Loading…
Reference in a new issue