mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 17:43:53 +01:00
//sculpt: fix importing static brushes
This commit is contained in:
parent
dd8cd78d6b
commit
227265db72
@ -81,3 +81,14 @@ dofile(wea.modpath.."/lib/selection/init.lua") -- Helpers for selections
|
|||||||
dofile(wea.modpath.."/lib/wireframe/corner_set.lua")
|
dofile(wea.modpath.."/lib/wireframe/corner_set.lua")
|
||||||
dofile(wea.modpath.."/lib/wireframe/make_compass.lua")
|
dofile(wea.modpath.."/lib/wireframe/make_compass.lua")
|
||||||
dofile(wea.modpath.."/lib/wireframe/wire_box.lua")
|
dofile(wea.modpath.."/lib/wireframe/wire_box.lua")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Post-setup tasks
|
||||||
|
---
|
||||||
|
|
||||||
|
--- 1: Scan for an import static brushes
|
||||||
|
-- Static brushes live in lib/sculpt/brushes (relative to this file), and have
|
||||||
|
-- the file extension ".brush.tsv" (without quotes, of course).
|
||||||
|
wea.sculpt.scan_static(wea.modpath.."/lib/sculpt/brushes")
|
||||||
|
@ -20,7 +20,7 @@ local sculpt = {
|
|||||||
parse_static = dofile(wea.modpath.."/lib/sculpt/parse_static.lua")
|
parse_static = dofile(wea.modpath.."/lib/sculpt/parse_static.lua")
|
||||||
}
|
}
|
||||||
|
|
||||||
sculpt.scan_static(wea.modpath.."/lib/sculpt/brushes")
|
-- scan_sculpt is called after everything is loaded in the main init file
|
||||||
|
|
||||||
return sculpt
|
return sculpt
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ return function(dirpath, overwrite_existing)
|
|||||||
local errors = 0
|
local errors = 0
|
||||||
|
|
||||||
|
|
||||||
for filename in pairs(files) do
|
for i, filename in pairs(files) do
|
||||||
if wea.str_ends(filename, ".brush.tsv") then
|
if wea.str_ends(filename, ".brush.tsv") then
|
||||||
local filepath = dirpath.."/"..filename
|
local filepath = dirpath.."/"..filename
|
||||||
local name = filepath:gsub(".brush.tsv", "")
|
local name = filepath:gsub(".brush.tsv", "")
|
||||||
|
Loading…
Reference in New Issue
Block a user