minor cleanup

Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
This commit is contained in:
kumquat-ir 2023-02-16 12:57:35 -05:00
parent 9c2a3231c5
commit 256fc322a8

View File

@ -434,17 +434,12 @@ bool processZIP(Mod& mod, ProcessingLevel level)
QStringList foundNilMetas; QStringList foundNilMetas;
for (auto& fname : zip.getFileNameList()) { for (auto& fname : zip.getFileNameList()) {
if (fname.endsWith(".nilmod.css")) { // nilmods can shade nilloader to be able to run as a standalone agent - which includes nilloader's own meta file
if (fname.endsWith(".nilmod.css") && fname != "nilloader.nilmod.css") {
foundNilMetas.append(fname); foundNilMetas.append(fname);
} }
} }
if (foundNilMetas.size() > 1 && foundNilMetas.at(0) == "nilloader.nilmod.css") {
// nilmods can shade nilloader to be able to run as a standalone agent - which includes nilloader's own meta file
// so if there is more than one meta file, ignore nilloader's meta, since it's not the actual mod
foundNilMetas.removeFirst();
}
if (zip.setCurrentFile(foundNilMetas.at(0))) { if (zip.setCurrentFile(foundNilMetas.at(0))) {
if (!file.open(QIODevice::ReadOnly)) { if (!file.open(QIODevice::ReadOnly)) {
zip.close(); zip.close();