Closed ThibautSF closed 6 years ago
Stack trace :
java.lang.NullPointerException
at mod.ModList.computeConflicts(ModList.java:203)
at mod.ModList.
With 4d5b9d3c, I have this :
Hmmm... In this version there is
Mod oneMod = availableMods.get(fileName);
if (oneMod == null) {
oneMod = new Mod(fileName, false);
}
listMods.add(oneMod);
but my version have
Mod oneMod = availableMods.get(fileName);
listMods.add(oneMod);
Manip error somewhere ? :thinking:
You need to refresh with Eclipse after pulling, maybe.
I suggest to display the name of the missing mod (in addition of MOD MISSING) because if it was removed from Steam, we have no mean to know the name.
But Pull generally refresh all active views...
I was also trying smthing like this :
Mod oneMod = availableMods.get(fileName);
if (oneMod==null) {
if (remoteFileId!=null){
for (Mod mod : availableMods.values()) {
if (mod.getRemoteFileID().equals(remoteFileId)) {
oneMod = mod;
}
}
} else {
//TODO
//Generate a missing mod
oneMod = new Mod(fileName,false);
}
}
listMods.add(oneMod);
Because sometimes (generally after a list import) a mod is tagged as missing because filename isn't the same (for example if i have dev version 'modName.mod' and my friend have a workshop version 'ugc_XXX.mod')
For mod name it was supposed...
Old XML
Recent :
The constant MOD_NAME is still used.
2 options :
I have committed a version with mod name, you can revert this commit if you prefer without the mod name.
I let you add the remoteId check that you have shown.
Ok, the mod name is added only when list is modified...
I will refactor that. There is too much similar code.
We still need to generate fake Mod (with filename and remoteID) and set isMissing to true in availableMods. Conflict compute have to ignore missing mods.