Skip to content

Commit

Permalink
* Allow loading from subfolders for weapondef files (tdf and lua)
Browse files Browse the repository at this point in the history
-- as already implemented for unitdefs and featuredefs
  • Loading branch information
FLOZi committed Nov 1, 2010
1 parent 50c66d1 commit a10a285
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cont/base/springcontent/gamedata/weapondefs.lua
Expand Up @@ -21,6 +21,7 @@ local postProcFile = 'gamedata/weapondefs_post.lua'
local TDF = TDFparser or VFS.Include('gamedata/parse_tdf.lua')

local system = VFS.Include('gamedata/system.lua')
VFS.Include('gamedata/VFSUtils.lua')


--------------------------------------------------------------------------------
Expand All @@ -44,7 +45,7 @@ end
-- Load the TDF weapondef files
--

local tdfFiles = VFS.DirList('weapons/', '*.tdf')
local tdfFiles = RecursiveFileSearch('weapons/', '*.tdf')

for _, filename in ipairs(tdfFiles) do
local wds, err = TDF.Parse(filename)
Expand All @@ -66,7 +67,7 @@ end
-- (these will override the TDF versions)
--

local luaFiles = VFS.DirList('weapons/', '*.lua')
local luaFiles = RecursiveFileSearch('weapons/', '*.lua')

for _, filename in ipairs(luaFiles) do
local wdEnv = {}
Expand Down

0 comments on commit a10a285

Please sign in to comment.