Skip to content

Commit

Permalink
categorize config
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-dencep committed Jan 24, 2024
1 parent ad692f3 commit 1298a0b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
Expand Up @@ -10,7 +10,7 @@

package com.github.dimadencep.mods.rrls.config;

public enum HideType {
public enum HideType { // TODO dehardcode
ALL,
LOADING,
RELOADING,
Expand Down
6 changes: 5 additions & 1 deletion common/src/main/resources/assets/rrls/lang/en_us.json
@@ -1,5 +1,9 @@
{
"text.autoconfig.rrls.title": "Remove Reloading Screen",
"text.autoconfig.rrls.category.global": "Global",
"text.autoconfig.rrls.category.splash": "Splash overlay",
"text.autoconfig.rrls.category.other": "Other",
"text.autoconfig.rrls.category.platform": "Platform-specific",
"text.autoconfig.rrls.option.hideType": "Overlays that will be hidden",
"text.autoconfig.rrls.option.rgbProgress": "Colorful",
"text.autoconfig.rrls.option.rgbProgress.@Tooltip": "§cMAY CAUSE EPILEPSY",
Expand All @@ -18,7 +22,7 @@
"text.autoconfig.rrls.option.earlyPackStatusSend.@Tooltip[1]": "Example: You were underground while reloading resources",
"text.autoconfig.rrls.option.animationSpeed": "Splash animation speed",
"text.autoconfig.rrls.option.animationSpeed.@Tooltip": "In milliseconds",
"text.autoconfig.rrls.option.forceClose": "Hide the loading overlay, even if there is nothing behind it",
"text.autoconfig.rrls.option.forceClose": "Hide the overlay, even if there is nothing behind it",
"text.autoconfig.rrls.option.forceClose.@Tooltip": "Actually now there is, I've been planning a workaround for a long time, but now there is one in minecraft :)",
"text.autoconfig.rrls.option.skipForgeOverlay": "Replaces the (Neo)Forge loading overlay with vanilla"
}
5 changes: 4 additions & 1 deletion common/src/main/resources/assets/rrls/lang/ru_ru.json
@@ -1,5 +1,8 @@
{
"text.autoconfig.rrls.title": "Удалить экран перезагрузки (Remove Reloading Screen)",
"text.autoconfig.rrls.category.global": "Глобальные",
"text.autoconfig.rrls.category.splash": "Экран (пере)загрузки",
"text.autoconfig.rrls.category.other": "Прочее",
"text.autoconfig.rrls.option.hideType": "Оверлеи, которые будут скрыты",
"text.autoconfig.rrls.option.rgbProgress": "Разноцветность",
"text.autoconfig.rrls.option.rgbProgress.@Tooltip": "§cМОЖЕТ ВЫЗВАТЬ ЭПИЛЕПСИЮ",
Expand All @@ -18,7 +21,7 @@
"text.autoconfig.rrls.option.earlyPackStatusSend.@Tooltip[1]": "Например: Вы оказались под землей во время перезагрузки ресурсов",
"text.autoconfig.rrls.option.animationSpeed": "Скорость анимации сплеша",
"text.autoconfig.rrls.option.animationSpeed.@Tooltip": "В милисекундах",
"text.autoconfig.rrls.option.forceClose": "Убирать загрузочный экран, даже если за ним ничего нет",
"text.autoconfig.rrls.option.forceClose": "Убирать оверлей, даже если за ним ничего нет",
"text.autoconfig.rrls.option.forceClose.@Tooltip": "На самом деле теперь есть, я давно планировал обходной путь, но теперь он есть в minecraft :)",
"text.autoconfig.rrls.option.skipForgeOverlay": "Заменяет оверлей загрузки (Neo)Forge на ванильный"
}
Expand Up @@ -21,36 +21,48 @@
@SuppressWarnings("unused")
@Config(name = Rrls.MOD_ID)
public class ConfigExpectPlatformImpl implements ConfigData {
@ConfigEntry.Category("global")
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
public HideType hideType = HideType.RELOADING;

@ConfigEntry.Category("splash")
@ConfigEntry.Gui.Tooltip
public boolean rgbProgress = false;

@ConfigEntry.Category("global")
@ConfigEntry.Gui.Tooltip
public boolean forceClose = false;

@ConfigEntry.Category("global")
public boolean miniRender = true;

@ConfigEntry.Category("splash")
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
public Type type = Type.PROGRESS;

@ConfigEntry.Category("splash")
public String reloadText = "Edit in config!";

@ConfigEntry.Category("other")
public boolean resetResources = false;

@ConfigEntry.Category("splash")
@ConfigEntry.Gui.Tooltip
public boolean reInitScreen = true;

@ConfigEntry.Category("splash")
@ConfigEntry.Gui.Tooltip
public boolean removeOverlayAtEnd = true;

@ConfigEntry.Category("other")
@ConfigEntry.Gui.Tooltip(count = 2)
public boolean earlyPackStatusSend = true;

@ConfigEntry.Category("other")
@ConfigEntry.Gui.Tooltip
public float animationSpeed = 1000.0F;

@ConfigEntry.Category("splash")
@ConfigEntry.Gui.Excluded
public AprilFool aprilFool = AprilFool.ON_APRIL;

Expand Down
Expand Up @@ -23,7 +23,7 @@
import org.apache.commons.lang3.tuple.Pair;

@SuppressWarnings("unused")
public class ConfigExpectPlatformImpl {
public class ConfigExpectPlatformImpl { // TODO categorize
public static final Pair<ConfigExpectPlatformImpl, ModConfigSpec> CONFIG_SPEC_PAIR = new ModConfigSpec.Builder()
.configure(ConfigExpectPlatformImpl::new);
public final ModConfigSpec.EnumValue<HideType> hideType;
Expand Down

0 comments on commit 1298a0b

Please sign in to comment.