mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-08 12:35:01 +00:00
Stop hardcoding some translations (#2049)
This commit is contained in:
1 parent
2f64fef6a6
commit
e6bbd155da
10 files changed
+37
-53
No files matched your search
@@ -29,7 +29,7 @@ public class Zoom {
|
||||
private static long zoomLerpLastNano = 0L;
|
||||
|
||||
@Getter
|
||||
private static final KeyBinding zoomKey = new KeyBinding("Zoom", 0, "key.categories.misc");
|
||||
private static final KeyBinding zoomKey = new KeyBinding("angelica.keybind.zoom", 0, "key.categories.misc");
|
||||
|
||||
private static boolean zoomEnabled = false;
|
||||
|
||||
|
||||
@@ -12,9 +12,7 @@ public class NotFineConfig {
|
||||
private static final String CATEGORY_TOGGLE = "toggle";
|
||||
private static final String CATEGORY_UNFINISHED = "unfinished";
|
||||
|
||||
public static boolean allowAdvancedOpenGL;
|
||||
public static boolean allowToggle3DAnaglyph;
|
||||
public static boolean allowToggleFBO;
|
||||
|
||||
public static boolean betterBlockFaceCulling;
|
||||
public static boolean renderPass;
|
||||
@@ -23,12 +21,7 @@ public class NotFineConfig {
|
||||
File configFile = new File(Launch.minecraftHome + File.separator + "config" + File.separator + NotFine.MODID + File.separator + "notfine.cfg");
|
||||
Configuration config = new Configuration(configFile);
|
||||
|
||||
allowAdvancedOpenGL = config.getBoolean("allowAdvancedOpenGL", CATEGORY_GENERAL, false,
|
||||
"Allow Advanced OpenGL to be enabled when it might be supported.");
|
||||
allowToggle3DAnaglyph = config.getBoolean("allowToggle3DAnaglyph", CATEGORY_GENERAL, true,
|
||||
"Allow 3D Anaglyph to be enabled.");
|
||||
allowToggleFBO = config.getBoolean("allowToggleFBO", CATEGORY_GENERAL, false,
|
||||
"Allow FBOs to be disabled.");
|
||||
allowToggle3DAnaglyph = config.getBoolean("allowToggle3DAnaglyph", CATEGORY_GENERAL, true, "Allow 3D Anaglyph to be enabled.");
|
||||
|
||||
config.setCategoryComment(CATEGORY_TOGGLE, "Toggle mod features.");
|
||||
betterBlockFaceCulling = config.getBoolean("betterBlockFaceCulling", CATEGORY_TOGGLE, true,
|
||||
@@ -43,10 +36,7 @@ public class NotFineConfig {
|
||||
config.save();
|
||||
}
|
||||
|
||||
//These will probably break hard with Angelica.
|
||||
//AdvancedOpenGL even breaks hard on its own.
|
||||
allowAdvancedOpenGL = false;
|
||||
allowToggleFBO = false;
|
||||
//This will probably break hard with Angelica.
|
||||
renderPass = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -243,21 +243,6 @@ public class NotFineGameOptionPages {
|
||||
List<OptionGroup> groups = new ArrayList<>();
|
||||
|
||||
groups.add(OptionGroup.createBuilder()
|
||||
.add(OptionImpl.createBuilder(boolean.class, vanillaOpts)
|
||||
.setName(I18n.format("options.advancedOpengl"))
|
||||
.setTooltip(I18n.format("sodium.options.advanced_opengl.tooltip"))
|
||||
.setControl(TickBoxControl::new)
|
||||
.setBinding((opts, value) -> opts.advancedOpengl = value, opts -> opts.advancedOpengl)
|
||||
.setImpact(OptionImpact.VARIES)
|
||||
.setEnabled(NotFineConfig.allowAdvancedOpenGL)
|
||||
.build())
|
||||
.add(OptionImpl.createBuilder(boolean.class, vanillaOpts)
|
||||
.setName(I18n.format("options.fboEnable"))
|
||||
.setTooltip(I18n.format("sodium.options.fbo.tooltip"))
|
||||
.setControl(TickBoxControl::new)
|
||||
.setBinding((opts, value) -> opts.fboEnable = value, opts -> opts.fboEnable)
|
||||
.setEnabled(NotFineConfig.allowToggleFBO)
|
||||
.build())
|
||||
.add(OptionImpl.createBuilder(boolean.class, vanillaOpts)
|
||||
.setName(I18n.format("options.anaglyph"))
|
||||
.setTooltip(I18n.format("sodium.options.anaglyph.tooltip"))
|
||||
|
||||
@@ -18,15 +18,9 @@ public class ClientProxy extends CommonProxy {
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
if(!NotFineConfig.allowAdvancedOpenGL) {
|
||||
Minecraft.getMinecraft().gameSettings.advancedOpengl = false;
|
||||
}
|
||||
if(!NotFineConfig.allowToggle3DAnaglyph) {
|
||||
Minecraft.getMinecraft().gameSettings.anaglyph = false;
|
||||
}
|
||||
if(!NotFineConfig.allowToggleFBO) {
|
||||
Minecraft.getMinecraft().gameSettings.fboEnable = true;
|
||||
}
|
||||
|
||||
for(Settings setting : Settings.values()) {
|
||||
setting.ready();
|
||||
|
||||
+3
-3
@@ -105,9 +105,9 @@ public class ReeseSodiumVideoOptionsScreen extends SodiumOptionsGUI {
|
||||
final Dim2i applyButtonDim = new Dim2i(tabFrameDim.getLimitX() - 134, tabFrameDim.getLimitY() + 5, 65, 20);
|
||||
final Dim2i closeButtonDim = new Dim2i(tabFrameDim.getLimitX() - 65, tabFrameDim.getLimitY() + 5, 65, 20);
|
||||
|
||||
this.undoButton = new FlatButtonWidget(undoButtonDim, "Undo", this::undoChanges);
|
||||
this.applyButton = new FlatButtonWidget(applyButtonDim, "Apply", this::applyChanges);
|
||||
this.closeButton = new FlatButtonWidget(closeButtonDim, "Close", this::onClose);
|
||||
this.undoButton = new FlatButtonWidget(undoButtonDim, I18n.format("sodium.options.buttons.undo"), this::undoChanges);
|
||||
this.applyButton = new FlatButtonWidget(applyButtonDim, I18n.format("sodium.options.buttons.apply"), this::applyChanges);
|
||||
this.closeButton = new FlatButtonWidget(closeButtonDim, I18n.format("gui.done"), this::onClose);
|
||||
|
||||
// Pre-compute button text and widths to avoid duplicate calculations
|
||||
final String irisText = Iris.enabled ? I18n.format(IrisApi.getInstance().getMainScreenLanguageKey()) : null;
|
||||
|
||||
+1
-5
@@ -93,11 +93,7 @@ public class SearchTextFieldComponent extends AbstractWidget {
|
||||
return;
|
||||
}
|
||||
if (!this.isFocused() && this.text.isEmpty()) {
|
||||
final String key = "rso.search_bar_empty";
|
||||
String text = I18n.format(key);
|
||||
if (text.equals(key))
|
||||
text = "Search options...";
|
||||
this.textRenderer.drawString(text, this.dim.getOriginX() + 6, this.dim.getOriginY() + 6, 0xFFAAAAAA);
|
||||
this.textRenderer.drawString(I18n.format("rso.search_bar_empty"), this.dim.getOriginX() + 6, this.dim.getOriginY() + 6, 0xFFAAAAAA);
|
||||
}
|
||||
|
||||
drawRect(this.dim.getOriginX(), this.dim.getOriginY(), this.dim.getLimitX(), this.dim.getLimitY(), this.isFocused() ? 0xE0000000 : 0x90000000);
|
||||
|
||||
@@ -303,9 +303,10 @@ public class SodiumGameOptionPages {
|
||||
.add(OptionImpl.createBuilder(StreamingUploader.UploadStrategy.class, sodiumOpts)
|
||||
.setName(I18n.format("sodium.options.upload_method.name"))
|
||||
.setTooltip(I18n.format("sodium.options.upload_method.tooltip"))
|
||||
.setControl(o ->
|
||||
new CyclingControl<>(o, StreamingUploader.UploadStrategy.class, StreamingUploader.UploadStrategy.values())
|
||||
)
|
||||
.setControl(o -> new CyclingControl<>(o, StreamingUploader.UploadStrategy.class, new String[]{
|
||||
I18n.format("sodium.options.upload_method.buffer_data"),
|
||||
I18n.format("sodium.options.upload_method.buffer_subdata"),
|
||||
I18n.format("sodium.options.upload_method.map_buffer") }))
|
||||
.setBinding((opts, value) -> opts.advanced.streamingUploadStrategy = value, opts -> opts.advanced.streamingUploadStrategy)
|
||||
.setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD)
|
||||
.setImpact(OptionImpact.VARIES)
|
||||
@@ -409,7 +410,10 @@ public class SodiumGameOptionPages {
|
||||
.add(OptionImpl.createBuilder(AsyncOcclusionMode.class, sodiumOpts)
|
||||
.setName(I18n.format("sodium.options.async_occlusion_mode.name"))
|
||||
.setTooltip(I18n.format("sodium.options.async_occlusion_mode.tooltip"))
|
||||
.setControl(o -> new CyclingControl<>(o, AsyncOcclusionMode.class, new String[]{"None", "Only Shadow", "Everything"}))
|
||||
.setControl(o -> new CyclingControl<>(o, AsyncOcclusionMode.class, new String[]{
|
||||
I18n.format("sodium.options.async_occlusion_mode.none"),
|
||||
I18n.format("sodium.options.async_occlusion_mode.only_shadow"),
|
||||
I18n.format("sodium.options.async_occlusion_mode.everything") }))
|
||||
.setImpact(OptionImpact.MEDIUM)
|
||||
.setBinding((opts, value) -> opts.performance.asyncOcclusionMode = value, opts -> opts.performance.asyncOcclusionMode)
|
||||
.setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD)
|
||||
|
||||
@@ -343,11 +343,11 @@ public class Iris {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
try {
|
||||
reload();
|
||||
if (mc.thePlayer != null) mc.thePlayer.addChatMessage(new ChatComponentText("Shaders Reloaded!"));
|
||||
if (mc.thePlayer != null) mc.thePlayer.addChatMessage(new ChatComponentText(I18n.format("iris.shaders.reloaded")));
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while reloading Shaders for Iris!", e);
|
||||
if (mc.thePlayer != null) mc.thePlayer.addChatMessage(new ChatComponentText( "Failed tgo reload shaders! Reason: " + Throwables.getRootCause(e).getMessage()));
|
||||
if (mc.thePlayer != null) mc.thePlayer.addChatMessage(new ChatComponentText(I18n.format("iris.shaders.reloaded.failure", Throwables.getRootCause(e).getMessage())));
|
||||
}
|
||||
} else if (toggleShadersKeybind.isPressed()) {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
@@ -356,7 +356,7 @@ public class Iris {
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while toggling shaders!", e);
|
||||
|
||||
if (mc.thePlayer != null) mc.thePlayer.addChatMessage(new ChatComponentText( "Failed tgo toggle shaders! Reason: " + Throwables.getRootCause(e).getMessage()));
|
||||
if (mc.thePlayer != null) mc.thePlayer.addChatMessage(new ChatComponentText(I18n.format("iris.shaders.toggled.failure", Throwables.getRootCause(e).getMessage())));
|
||||
setShadersDisabled();
|
||||
fallback = true;
|
||||
}
|
||||
@@ -974,9 +974,9 @@ public class Iris {
|
||||
|
||||
public void fmlInitEvent() {
|
||||
IRIS_VERSION = Tags.VERSION;
|
||||
reloadKeybind = new KeyBinding("Reload Shaders", 0, "Iris Keybinds");
|
||||
toggleShadersKeybind = new KeyBinding("Toggle Shaders", 0, "Iris Keybinds");
|
||||
shaderpackScreenKeybind = new KeyBinding("Shaderpack Selection Screen", 0, "Iris Keybinds");
|
||||
reloadKeybind = new KeyBinding("iris.keybind.reload", 0, "key.category.iris.keybinds");
|
||||
toggleShadersKeybind = new KeyBinding("iris.keybind.toggleShaders", 0, "key.category.iris.keybinds");
|
||||
shaderpackScreenKeybind = new KeyBinding("iris.keybind.shaderPackSelection", 0, "key.category.iris.keybinds");
|
||||
|
||||
ClientRegistry.registerKeyBinding(reloadKeybind);
|
||||
ClientRegistry.registerKeyBinding(toggleShadersKeybind);
|
||||
|
||||
@@ -101,13 +101,18 @@ sodium.options.use_no_error_context.name=No Error Context
|
||||
sodium.options.use_no_error_context.tooltip=If enabled, the OpenGL context will be created with error checking disabled. This may slightly improve performance, but it also increases the risk that the game will crash instead of gracefully handling OpenGL errors. You should disable this option if you are experiencing sudden unexplained crashes.
|
||||
sodium.options.async_occlusion_mode.name=Async Occlusion
|
||||
sodium.options.async_occlusion_mode.tooltip=Controls which render passes use asynchronous occlusion culling. ONLY_SHADOW (default) runs async occlusion only for the shadow pass, keeping the main render list synchronous. EVERYTHING runs all passes async, which may cause 1-frame visibility lag during fast camera movement. NONE disables async occlusion entirely.
|
||||
sodium.options.async_occlusion_mode.none=None
|
||||
sodium.options.async_occlusion_mode.only_shadow=Only Shadow
|
||||
sodium.options.async_occlusion_mode.everything=Everything
|
||||
sodium.options.use_occlusion_culling.name=Occlusion Culling
|
||||
sodium.options.use_occlusion_culling.tooltip=If enabled, chunks that are hidden behind other chunks will not be rendered. Disabling this will significantly reduce performance but can be useful for debugging.
|
||||
sodium.options.threads.value=%s thread(s)
|
||||
sodium.options.default=Default
|
||||
sodium.options.buttons.undo=Undo
|
||||
sodium.options.buttons.apply=Apply
|
||||
sodium.options.buttons.donate=Buy coffee for JellySquid!
|
||||
sodium.options.anaglyph.tooltip=If enabled, the world will be rendered twice with red/cyan color masks.
|
||||
sodium.options.show_cape.tooltip=If enabled, your cape will be shown.
|
||||
rso.search_bar_empty=Search options...
|
||||
|
||||
options.dynamic_fov=Dynamic FOV
|
||||
options.dynamic_fov.tooltip=If enabled, the game's field of view will change based on the player's speed.
|
||||
@@ -115,6 +120,15 @@ options.framerate=%s FPS
|
||||
|
||||
iris.shaders.toggled=Toggled shaders to %s!
|
||||
iris.shaders.disabled=Shaders disabled!
|
||||
iris.shaders.reloaded=Shaders Reloaded!
|
||||
iris.shaders.reloaded.failure=Failed to reload shaders! Reason: %s
|
||||
iris.shaders.toggled.failure=Failed to toggle shaders! Reason: %s
|
||||
|
||||
key.category.iris.keybinds=Iris Keybinds
|
||||
iris.keybind.reload=Reload Shaders
|
||||
iris.keybind.toggleShaders=Toggle Shaders
|
||||
iris.keybind.shaderPackSelection=Shaderpack Selection Screen
|
||||
angelica.keybind.zoom=Zoom
|
||||
|
||||
options.iris.apply=Apply
|
||||
options.iris.refresh=Refresh
|
||||
|
||||
@@ -77,6 +77,7 @@ options.total_stars.tooltip=Star Density
|
||||
options.void_fog=Void Fog
|
||||
options.void_fog.tooltip=Void Fog
|
||||
options.hurt_shake=Hurt Screen Shake
|
||||
options.hurt_shake.tooltip=How strongly the camera tilts when you take damage.
|
||||
options.background.random=Random
|
||||
options.zoom_smooth=Smooth Zoom
|
||||
options.zoom_smooth.tooltip=Smoothly interpolates the camera toward the zoom level instead of snapping instantly.
|
||||
|
||||
Reference in new issue
Block a user