mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-22 19:45:02 +00:00
//sculpt: fix importing static brushes
This commit is contained in:
parent
dd8cd78d6b
commit
227265db72
3 changed files with 13 additions and 2 deletions
|
@ -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/make_compass.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")
|
||||
}
|
||||
|
||||
sculpt.scan_static(wea.modpath.."/lib/sculpt/brushes")
|
||||
-- scan_sculpt is called after everything is loaded in the main init file
|
||||
|
||||
return sculpt
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ return function(dirpath, overwrite_existing)
|
|||
local errors = 0
|
||||
|
||||
|
||||
for filename in pairs(files) do
|
||||
for i, filename in pairs(files) do
|
||||
if wea.str_ends(filename, ".brush.tsv") then
|
||||
local filepath = dirpath.."/"..filename
|
||||
local name = filepath:gsub(".brush.tsv", "")
|
||||
|
|
Loading…
Reference in a new issue