Skip to content

Commit da0e48b

Browse files
committed
1 parent 59643b0 commit da0e48b

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

src/Export/Classes/GGPKData.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ local GGPKClass = newClass("GGPKData", function(self, path, datPath, reExport)
3636
self.oozPath = datPath:match("\\$") and datPath or (datPath .. "\\")
3737
else
3838
self.path = path
39-
self.oozPath = io.popen("cd"):read('*l'):gsub('\r?', '') .. "\\ggpk\\"
39+
self.oozPath = GetWorkDir() .. "\\ggpk\\"
4040
self:CleanDir(reExport)
4141
self:ExtractFiles(reExport)
4242
end
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff a/src/Export/Classes/GGPKData.lua b/src/Export/Classes/GGPKData.lua (rejected hunks)
2+
@@ -126,14 +126,13 @@ function GGPKClass:ExtractList(listToExtract, cache, useRegex)
3+
end
4+
5+
function GGPKClass:AddDat64Files()
6+
- local datFiles = scanDir(self.oozPath .. "Data\\Balance\\", '%w+%.datc64$')
7+
- for _, f in ipairs(datFiles) do
8+
+ local datFiles = self:GetNeededFiles()
9+
+ for _, fname in ipairs(datFiles) do
10+
local record = { }
11+
- record.name = f
12+
- local rawFile = io.open(self.oozPath .. "Data\\Balance\\" .. f, 'rb')
13+
+ record.name = fname:match("([^/\\]+)$") .. "c64"
14+
+ local rawFile = io.open(self.oozPath .. fname:gsub("/", "\\") .. "c64", 'rb')
15+
record.data = rawFile:read("*all")
16+
rawFile:close()
17+
- --ConPrintf("FILENAME: %s", fname)
18+
t_insert(self.dat, record)
19+
end
20+
end
21+
@@ -163,6 +162,8 @@ function GGPKClass:GetNeededFiles()
22+
"Data/Balance/ModFamily.dat",
23+
"Data/Balance/ModSellPriceTypes.dat",
24+
"Data/Balance/ModEffectStats.dat",
25+
+ "Data/Balance/ModDomains.dat",
26+
+ "Data/Balance/ModGenerationTypes.dat",
27+
"Data/Balance/ActiveSkills.dat",
28+
"Data/Balance/ActiveSkillType.dat",
29+
"Data/Balance/AlternateSkillTargetingBehaviours.dat",

0 commit comments

Comments
 (0)