change message for conflicting mods as well

This commit is contained in:
Cvolton 2024-02-15 21:58:30 +01:00
parent 4c354ed460
commit 4b667cc82c
No known key found for this signature in database
4 changed files with 13 additions and 3 deletions

View file

@ -28,6 +28,7 @@ namespace geode {
Suggestion, Suggestion,
Recommendation, Recommendation,
Conflict, Conflict,
OutdatedConflict,
InvalidFile, InvalidFile,
Duplicate, Duplicate,
SetupFailed, SetupFailed,

View file

@ -586,9 +586,9 @@ void Loader::Impl::findProblems() {
switch(dep.importance) { switch(dep.importance) {
case ModMetadata::Incompatibility::Importance::Conflicting: { case ModMetadata::Incompatibility::Importance::Conflicting: {
this->addProblem({ this->addProblem({
LoadProblem::Type::Conflict, dep.version.toString()[0] == '<' ? LoadProblem::Type::OutdatedConflict : LoadProblem::Type::Conflict,
mod, mod,
fmt::format("{} {}", dep.id, dep.version.toString()) fmt::format("{}", dep.id)
}); });
log::warn("{} conflicts with {} {}", id, dep.id, dep.version); log::warn("{} conflicts with {} {}", id, dep.id, dep.version);
} break; } break;

View file

@ -54,8 +54,16 @@ bool ProblemsListCell::init(LoadProblem problem, ProblemsListPopup* list, CCSize
message = fmt::format("{} recommends {}", cause, problem.message); message = fmt::format("{} recommends {}", cause, problem.message);
break; break;
case LoadProblem::Type::Conflict: case LoadProblem::Type::Conflict:
// i copy pasted the message from incompatibility
// because as far as i can tell there's no behavorial
// difference, so it makes no sense to show the difference
// to the user
icon = "info-warning.png"_spr; icon = "info-warning.png"_spr;
message = fmt::format("{} conflicts with {}", cause, problem.message); message = fmt::format("Uninstall {} to use {}", problem.message, cause);
break;
case LoadProblem::Type::OutdatedConflict:
icon = "info-alert.png"_spr;
message = fmt::format("Update {} to use {}", problem.message, cause);
break; break;
case LoadProblem::Type::InvalidFile: case LoadProblem::Type::InvalidFile:
icon = "info-alert.png"_spr; icon = "info-alert.png"_spr;

View file

@ -54,6 +54,7 @@ CCArray* ProblemsListPopup::createCells(Mod* scrollTo, float& scrollValue) {
case geode::LoadProblem::Type::OutdatedIncompatibility: case geode::LoadProblem::Type::OutdatedIncompatibility:
case geode::LoadProblem::Type::PresentIncompatibility: case geode::LoadProblem::Type::PresentIncompatibility:
veryTop.push_back(ProblemsListCell::create(problem, this, this->getCellSize())); veryTop.push_back(ProblemsListCell::create(problem, this, this->getCellSize()));
break;
default: default:
top.push_back(ProblemsListCell::create(problem, this, this->getCellSize())); top.push_back(ProblemsListCell::create(problem, this, this->getCellSize()));
break; break;