mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Blacklisted ui-lib (startup crash)
This commit is contained in:
parent
9a28e97774
commit
7409ff7fd8
3 changed files with 21 additions and 9 deletions
|
|
@ -139,21 +139,22 @@ mods.reloadexit = The game will now exit, to reload mods.
|
|||
mod.installed = [[Installed]
|
||||
mod.display = [gray]Mod:[orange] {0}
|
||||
mod.enabled = [lightgray]Enabled
|
||||
mod.disabled = [scarlet]Disabled
|
||||
mod.disabled = [red]Disabled
|
||||
mod.multiplayer.compatible = [gray]Multiplayer Compatible
|
||||
mod.disable = Disable
|
||||
mod.content = Content:
|
||||
mod.delete.error = Unable to delete mod. File may be in use.
|
||||
mod.requiresversion = [scarlet]Requires min game version: [accent]{0}
|
||||
mod.outdatedv7 = [scarlet]Incompatible with V7 (no minGameVersion: 136)
|
||||
mod.missingdependencies = [scarlet]Missing dependencies: {0}
|
||||
mod.erroredcontent = [scarlet]Content Errors
|
||||
mod.requiresversion = [red]Requires min game version: [accent]{0}
|
||||
mod.outdatedv7 = [red]Incompatible with V7 (no minGameVersion: 136)
|
||||
mod.blacklisted = [red]Unsupported
|
||||
mod.missingdependencies = [red]Missing dependencies: {0}
|
||||
mod.erroredcontent = [red]Content Errors
|
||||
mod.errors = Errors have occurred loading content.
|
||||
mod.noerrorplay = [scarlet]You have mods with errors.[] Either disable the affected mods or fix the errors before playing.
|
||||
mod.nowdisabled = [scarlet]Mod '{0}' is missing dependencies:[accent] {1}\n[lightgray]These mods need to be downloaded first.\nThis mod will be automatically disabled.
|
||||
mod.noerrorplay = [red]You have mods with errors.[] Either disable the affected mods or fix the errors before playing.
|
||||
mod.nowdisabled = [red]Mod '{0}' is missing dependencies:[accent] {1}\n[lightgray]These mods need to be downloaded first.\nThis mod will be automatically disabled.
|
||||
mod.enable = Enable
|
||||
mod.requiresrestart = The game will now close to apply the mod changes.
|
||||
mod.reloadrequired = [scarlet]Restart Required
|
||||
mod.reloadrequired = [red]Restart Required
|
||||
mod.import = Import Mod
|
||||
mod.import.file = Import File
|
||||
mod.import.github = Import From GitHub
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import static mindustry.Vars.*;
|
|||
|
||||
public class Mods implements Loadable{
|
||||
private static final String[] metaFiles = {"mod.json", "mod.hjson", "plugin.json", "plugin.hjson"};
|
||||
private static final ObjectSet<String> blacklistedMods = ObjectSet.with("ui-lib");
|
||||
|
||||
private Json json = new Json();
|
||||
private @Nullable Scripts scripts;
|
||||
|
|
@ -1053,11 +1054,16 @@ public class Mods implements Loadable{
|
|||
|
||||
/** @return whether this mod is supported by the game version */
|
||||
public boolean isSupported(){
|
||||
if(isOutdated()) return false;
|
||||
if(isOutdated() || isBlacklisted()) return false;
|
||||
|
||||
return Version.isAtLeast(meta.minGameVersion);
|
||||
}
|
||||
|
||||
/** Some mods are known to cause issues with the game; this detects and returns whether a mod is manually blacklisted. */
|
||||
public boolean isBlacklisted(){
|
||||
return blacklistedMods.contains(name);
|
||||
}
|
||||
|
||||
/** @return whether this mod is outdated, e.g. not compatible with v7. */
|
||||
public boolean isOutdated(){
|
||||
//must be at least 136 to indicate v7 compat
|
||||
|
|
|
|||
|
|
@ -254,9 +254,14 @@ public class ModsDialog extends BaseDialog{
|
|||
|
||||
text.row();
|
||||
|
||||
String tooltip = null;
|
||||
|
||||
if(item.isOutdated()){
|
||||
text.labelWrap("@mod.outdatedv7").growX();
|
||||
text.row();
|
||||
}else if(item.isBlacklisted()){
|
||||
text.labelWrap("@mod.blacklisted").growX();
|
||||
text.row();
|
||||
}else if(!item.isSupported()){
|
||||
text.labelWrap(Core.bundle.format("mod.requiresversion", item.meta.minGameVersion)).growX();
|
||||
text.row();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue