Skip to content

Commit 3a68578

Browse files
better printing for base, core, unrecognized
1 parent 9e24b0f commit 3a68578

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

control.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ local function stop()
4242
runningtestname = nil
4343
callAll("stop")
4444
end
45+
local nopathmods = {level=true,base=true,core=true}
4546
local function report()
4647
if runningtestname then stop() end
4748
local moddumps = callAll("dump")
@@ -68,11 +69,15 @@ local function report()
6869
filename = levelpath.basepath .. filename
6970
end
7071
end
71-
if modname == "level" then
72+
if nopathmods[modname] then
7273
-- we *still* can't identify level properly, so just give up...
73-
outlines[#outlines+1] = string.format("SF:__level__/%s\n",filename)
74+
-- also, we can't create proper paths for core/base anyway
75+
outlines[#outlines+1] = string.format("SF:__%s__/%s\n",modname,filename)
76+
elseif modname == nil then
77+
--something totally unrecognized?
78+
outlines[#outlines+1] = string.format("SF:%s\n",file)
7479
else
75-
-- we found it! This will be a correct path relative to the `mods` directory for anything but base/core.
80+
-- we found it! This will be a path relative to the `mods` directory.
7681
local modver = game.active_mods[modname]
7782
outlines[#outlines+1] = string.format("SF:./%s_%s/%s\n",modname,modver,filename)
7883
end

0 commit comments

Comments
 (0)