utils: rename folder tables → table to match API

This commit is contained in:
Starbeamrainbowlabs 2022-09-24 13:41:44 +01:00
parent bc5dc6b2b4
commit 38a72468d9
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
15 changed files with 28 additions and 28 deletions

View File

@ -44,7 +44,7 @@ wea_c.terrain = dofile(wea_c.modpath.."/utils/terrain/init.lua")
dofile(wea_c.modpath.."/utils/strings/init.lua")
dofile(wea_c.modpath.."/utils/format/init.lua")
dofile(wea_c.modpath.."/utils/parse/init.lua")
dofile(wea_c.modpath.."/utils/tables/init.lua")
dofile(wea_c.modpath.."/utils/table/init.lua")
dofile(wea_c.modpath.."/utils/numbers.lua")
dofile(wea_c.modpath.."/utils/nodes.lua")

View File

@ -1,6 +1,6 @@
-- worldeditadditions_core = { modpath="/home/sbrl/.minetest/worlds/Mod-Sandbox/worldmods/WorldEditAdditions/worldeditadditions_core/" }
local wea_c = worldeditadditions_core
local table_map = dofile(wea_c.modpath.."/utils/tables/table_map.lua")
local table_map = dofile(wea_c.modpath.."/utils/table/table_map.lua")
local function is_whitespace(char)
return char:match("%s")

View File

@ -0,0 +1,25 @@
-- ████████ █████ ██████ ██ ███████ ███████
-- ██ ██ ██ ██ ██ ██ ██ ██
-- ██ ███████ ██████ ██ █████ ███████
-- ██ ██ ██ ██ ██ ██ ██ ██
-- ██ ██ ██ ██████ ███████ ███████ ███████
-- Functions that operate on tables.
-- Lua doesn't exactly come with batteries included, so this is quite an
-- extensive collection of functions :P
local wea_c = worldeditadditions_core
wea_c.table = {
apply = dofile(wea_c.modpath.."/utils/table/table_apply.lua"),
contains = dofile(wea_c.modpath.."/utils/table/table_contains.lua"),
deepcopy = dofile(wea_c.modpath.."/utils/table/deepcopy.lua"),
filter = dofile(wea_c.modpath.."/utils/table/table_filter.lua"),
get_last = dofile(wea_c.modpath.."/utils/table/table_get_last.lua"),
makeset = dofile(wea_c.modpath.."/utils/table/makeset.lua"),
map = dofile(wea_c.modpath.."/utils/table/table_map.lua"),
shallowcopy = dofile(wea_c.modpath.."/utils/table/shallowcopy.lua"),
tostring = dofile(wea_c.modpath.."/utils/table/table_tostring.lua"),
unique = dofile(wea_c.modpath.."/utils/table/table_unique.lua"),
unpack = dofile(wea_c.modpath.."/utils/table/table_unpack.lua"),
}

View File

@ -1,6 +1,6 @@
local wea_c = worldeditadditions_core
local table_unpack = dofile(wea_c.modpath.."/utils/tables/table_unpack.lua")
local table_unpack = dofile(wea_c.modpath.."/utils/table/table_unpack.lua")
--- Returns only the last count items in a given numerical table-based list.

View File

@ -1,25 +0,0 @@
-- ████████ █████ ██████ ██ ███████ ███████
-- ██ ██ ██ ██ ██ ██ ██ ██
-- ██ ███████ ██████ ██ █████ ███████
-- ██ ██ ██ ██ ██ ██ ██ ██
-- ██ ██ ██ ██████ ███████ ███████ ███████
-- Functions that operate on tables.
-- Lua doesn't exactly come with batteries included, so this is quite an
-- extensive collection of functions :P
local wea_c = worldeditadditions_core
wea_c.table = {
apply = dofile(wea_c.modpath.."/utils/tables/table_apply.lua"),
contains = dofile(wea_c.modpath.."/utils/tables/table_contains.lua"),
deepcopy = dofile(wea_c.modpath.."/utils/tables/deepcopy.lua"),
filter = dofile(wea_c.modpath.."/utils/tables/table_filter.lua"),
get_last = dofile(wea_c.modpath.."/utils/tables/table_get_last.lua"),
makeset = dofile(wea_c.modpath.."/utils/tables/makeset.lua"),
map = dofile(wea_c.modpath.."/utils/tables/table_map.lua"),
shallowcopy = dofile(wea_c.modpath.."/utils/tables/shallowcopy.lua"),
tostring = dofile(wea_c.modpath.."/utils/tables/table_tostring.lua"),
unique = dofile(wea_c.modpath.."/utils/tables/table_unique.lua"),
unpack = dofile(wea_c.modpath.."/utils/tables/table_unpack.lua"),
}