Option to disable ModInfo-Screen

This commit is contained in:
Frank 2021-08-25 15:12:45 +02:00
parent 4692831007
commit 11926ac63c
2 changed files with 8 additions and 1 deletions

View file

@ -380,7 +380,7 @@ public class HelloClient extends DataHandler.FromServer {
if ((filesToRequest.size() > 0 || filesToRemove.size() > 0) && ( Configs.CLIENT_CONFIG.isAcceptingMods() || Configs.CLIENT_CONFIG.isAcceptingConfigs() || Configs.CLIENT_CONFIG.isAcceptingFiles())) {
showSyncFilesScreen(client, filesToRequest, filesToRemove);
return;
} else if (serverPublishedModInfo && mismatchingMods.size()>0) {
} else if (serverPublishedModInfo && mismatchingMods.size()>0 && Configs.CLIENT_CONFIG.isShowingModInfo()) {
client.setScreen(new ModListScreen(client.screen, new TranslatableComponent("title.bclib.modmissmatch"), new TranslatableComponent("message.bclib.modmissmatch"), ModUtil.getMods(), modVersion));
return;
}

View file

@ -11,6 +11,9 @@ public class ClientConfig extends NamedPathConfig {
public static final DependendConfigToken<Boolean> ACCEPT_FILES = DependendConfigToken.Boolean(true, "acceptFiles", AutoSync.SYNC_CATEGORY, (config) -> config.get(ENABLED));
@ConfigUI(leftPadding = 8)
public static final DependendConfigToken<Boolean> ACCEPT_MODS = DependendConfigToken.Boolean(false, "acceptMods", AutoSync.SYNC_CATEGORY, (config) -> config.get(ENABLED));
@ConfigUI(leftPadding = 8)
public static final DependendConfigToken<Boolean> DISPLAY_MOD_INFO = DependendConfigToken.Boolean(true, "displayModInfo", AutoSync.SYNC_CATEGORY, (config) -> config.get(ENABLED));
@ConfigUI(topPadding = 12)
public static final ConfigToken<Boolean> DEBUG_HASHES = ConfigToken.Boolean(false, "debugHashes", AutoSync.SYNC_CATEGORY);
@ -38,4 +41,8 @@ public class ClientConfig extends NamedPathConfig {
public boolean isAcceptingFiles() {
return get(ACCEPT_FILES) /*&& isAllowingAutoSync()*/;
}
public boolean isShowingModInfo() {
return get(DISPLAY_MOD_INFO) /*&& isAllowingAutoSync()*/;
}
}