| 524 |
|
} |
| 525 |
|
} |
| 526 |
|
if (depsLocalString.length() == 0) |
| 527 |
< |
depsLocalString = bundle.getString("installDependencies.none"); |
| 527 |
> |
depsLocalString = bundle |
| 528 |
> |
.getString("installDependencies.none"); |
| 529 |
|
if (depsDownloadString.length() == 0) |
| 530 |
< |
depsDownloadString = bundle.getString("installDependencies.none"); |
| 530 |
> |
depsDownloadString = bundle |
| 531 |
> |
.getString("installDependencies.none"); |
| 532 |
|
|
| 533 |
|
int res = JOptionPane.showConfirmDialog(this, String.format( |
| 534 |
|
bundle.getString("installDependencies.text"), |
| 542 |
|
break; |
| 543 |
|
} |
| 544 |
|
} else { |
| 545 |
< |
HashMap<Mod, HashSet<Mod>> conflicts = ModManager.getInstance() |
| 545 |
> |
HashMap<Mod, HashSet<Mod>> incompatibilities = ModManager.getInstance() |
| 546 |
|
.checkIncompabitilites(mods); |
| 547 |
< |
if (conflicts.size() > 0) { |
| 547 |
> |
if (incompatibilities.size() > 0) { |
| 548 |
|
installState = EInstallState.INCOMPATIBLE; |
| 549 |
< |
System.err.println("Incompatible mods: " |
| 550 |
< |
+ conflicts.toString()); |
| 551 |
< |
// TODO: Message window with incompatibilities |
| 549 |
> |
|
| 550 |
> |
String incompatString = ""; |
| 551 |
> |
for (Mod m : incompatibilities.keySet()) { |
| 552 |
> |
if (incompatString.length() > 0) |
| 553 |
> |
incompatString += "\n"; |
| 554 |
> |
incompatString += m.getName() + ": "; |
| 555 |
> |
String confMods = ""; |
| 556 |
> |
for (Mod mConf : incompatibilities.get(m)) { |
| 557 |
> |
if (confMods.length() > 0) |
| 558 |
> |
confMods += ", "; |
| 559 |
> |
confMods += mConf.getName(); |
| 560 |
> |
} |
| 561 |
> |
incompatString += confMods; |
| 562 |
> |
} |
| 563 |
> |
|
| 564 |
> |
JOptionPane.showMessageDialog(this, String.format( |
| 565 |
> |
bundle.getString("installIncompatibilities.text"), |
| 566 |
> |
incompatString), bundle |
| 567 |
> |
.getString("installIncompatibilities.title"), |
| 568 |
> |
JOptionPane.ERROR_MESSAGE); |
| 569 |
|
break; |
| 570 |
|
} else { |
| 571 |
|
installState = EInstallState.READY; |