From e5535d9b720a661310be4b39d1c5e6e74cf604c2 Mon Sep 17 00:00:00 2001 From: Moritz Zwerger Date: Thu, 23 Nov 2023 08:12:17 +0100 Subject: [PATCH] remove name from some profile delegates --- .../minosoft/config/profile/delegate/SimpleDelegate.kt | 4 ++++ .../config/profile/delegate/primitive/BooleanDelegate.kt | 1 - .../config/profile/delegate/primitive/DoubleDelegate.kt | 1 - .../config/profile/delegate/primitive/FloatDelegate.kt | 1 - .../config/profile/profiles/audio/AudioProfile.kt | 4 ++-- .../minosoft/config/profile/profiles/audio/gui/GuiC.kt | 6 +++--- .../config/profile/profiles/audio/types/TypesC.kt | 4 ++-- .../config/profile/profiles/audio/volume/VolumeC.kt | 4 ++-- .../config/profile/profiles/block/outline/OutlineC.kt | 6 +++--- .../config/profile/profiles/block/rendering/RenderingC.kt | 4 ++-- .../config/profile/profiles/controls/mouse/MouseC.kt | 6 +++--- .../profile/profiles/eros/server/entries/ErosServer.kt | 2 +- .../minosoft/config/profile/profiles/gui/GUIProfile.kt | 2 +- .../profile/profiles/rendering/advanced/AdvancedC.kt | 2 +- .../profile/profiles/rendering/animations/AnimationsC.kt | 4 ++-- .../config/profile/profiles/rendering/camera/CameraC.kt | 4 ++-- .../profile/profiles/rendering/camera/shaking/ShakingC.kt | 2 +- .../profiles/rendering/chunkborder/ChunkBorderC.kt | 4 ++-- .../profiles/rendering/experimental/ExperimentalC.kt | 4 ++-- .../config/profile/profiles/rendering/fog/FogC.kt | 4 ++-- .../config/profile/profiles/rendering/light/LightC.kt | 6 +++--- .../profile/profiles/rendering/movement/MovementC.kt | 4 ++-- .../config/profile/profiles/rendering/overlay/OverlayC.kt | 8 ++++---- .../profile/profiles/rendering/overlay/fire/FireC.kt | 8 ++++---- .../profiles/rendering/overlay/weather/WeatherC.kt | 6 +++--- .../profiles/rendering/performance/PerformanceC.kt | 8 ++++---- .../config/profile/profiles/rendering/sky/SkyC.kt | 2 +- .../config/profile/profiles/rendering/sky/cloud/CloudC.kt | 8 ++++---- 28 files changed, 60 insertions(+), 59 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/config/profile/delegate/SimpleDelegate.kt b/src/main/java/de/bixilon/minosoft/config/profile/delegate/SimpleDelegate.kt index 25fbad3f8..2d24a7e47 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/delegate/SimpleDelegate.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/delegate/SimpleDelegate.kt @@ -23,6 +23,10 @@ open class SimpleDelegate( private val verify: ((T) -> Unit)? = null, ) : DataObserver(default), AbstractProfileDelegate { + init { + + } + override fun set(value: T): T { validate(value) return super.set(value) diff --git a/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/BooleanDelegate.kt b/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/BooleanDelegate.kt index b470aa3ce..5d67f94f9 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/BooleanDelegate.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/BooleanDelegate.kt @@ -19,7 +19,6 @@ import de.bixilon.minosoft.config.profile.profiles.Profile open class BooleanDelegate( override val profile: Profile, default: Boolean, - name: String = "", ) : SimpleDelegate(profile, default) { override fun validate(value: Boolean) = Unit diff --git a/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/DoubleDelegate.kt b/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/DoubleDelegate.kt index 67ea1e45c..93864f1ce 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/DoubleDelegate.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/DoubleDelegate.kt @@ -19,7 +19,6 @@ import de.bixilon.minosoft.config.profile.profiles.Profile open class DoubleDelegate( override val profile: Profile, default: Double, - name: String, private val ranges: Array>? = null, ) : SimpleDelegate(profile, default) { diff --git a/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/FloatDelegate.kt b/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/FloatDelegate.kt index 6bc2f92f3..faab24b14 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/FloatDelegate.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/delegate/primitive/FloatDelegate.kt @@ -19,7 +19,6 @@ import de.bixilon.minosoft.config.profile.profiles.Profile open class FloatDelegate( override val profile: Profile, default: Float, - name: String, private val ranges: Array>? = null, ) : SimpleDelegate(profile, default) { diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/AudioProfile.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/AudioProfile.kt index 4133c5d71..149ebdbf6 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/AudioProfile.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/AudioProfile.kt @@ -37,13 +37,13 @@ class AudioProfile( * Skips the loading od the AudioPlayer * Requires reloading of the whole audio subsystem to be applied */ - var skipLoading by BooleanDelegate(this, false, "profile.audio.loading.skip") + var skipLoading by BooleanDelegate(this, false) /** * Enabled or disables all audio playing * Does not skip loading of audio */ - var enabled by BooleanDelegate(this, false, "profile.audio.enabled") + var enabled by BooleanDelegate(this, false) val types = TypesC(this) val volume = VolumeC(this) diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/gui/GuiC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/gui/GuiC.kt index 6dd398ad1..ab3f70dd1 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/gui/GuiC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/gui/GuiC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -21,10 +21,10 @@ class GuiC(profile: AudioProfile) { /** * Enables all gui sounds */ - var enabled by BooleanDelegate(profile, true, "profile.audio.gui.enabled") + var enabled by BooleanDelegate(profile, true) /** * Enables all sounds related to button (currently only clicking */ - var button by BooleanDelegate(profile, true, "profile.audio.gui.button") + var button by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/types/TypesC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/types/TypesC.kt index 0d3dcafc8..098cad1e3 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/types/TypesC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/types/TypesC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -21,5 +21,5 @@ class TypesC(profile: AudioProfile) { /** * Play (custom) sounds from the server */ - var packet by BooleanDelegate(profile, true, "profile.audio.types.packet") + var packet by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/volume/VolumeC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/volume/VolumeC.kt index afc6beb73..2775bcd12 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/volume/VolumeC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/audio/volume/VolumeC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -17,5 +17,5 @@ import de.bixilon.minosoft.config.profile.delegate.primitive.FloatDelegate import de.bixilon.minosoft.config.profile.profiles.audio.AudioProfile class VolumeC(profile: AudioProfile) { - var master by FloatDelegate(profile, 1.0f, "profile.audio.volume.master", arrayOf(0.0f..1.0f)) + var master by FloatDelegate(profile, 1.0f, arrayOf(0.0f..1.0f)) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/outline/OutlineC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/outline/OutlineC.kt index 85c0bc840..f7f89ef1e 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/outline/OutlineC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/outline/OutlineC.kt @@ -23,14 +23,14 @@ class OutlineC(profile: BlockProfile) { /** * Highlights the current selected block */ - var enabled by BooleanDelegate(profile, true, "profile.block.outline.enabled") + var enabled by BooleanDelegate(profile, true) /** * Disables the z-buffer of the block outline * Makes the whole outline visible and ignores the walls */ - var showThroughWalls by BooleanDelegate(profile, false, "profile.block.outline.through_walls") + var showThroughWalls by BooleanDelegate(profile, false) /** * The color of the block that is currently selected @@ -42,7 +42,7 @@ class OutlineC(profile: BlockProfile) { /** * Shows the collision box of the selected block */ - var collisions by BooleanDelegate(profile, false, "profile.block.outline.collisions.enabled") + var collisions by BooleanDelegate(profile, false) /** * The color of the block collision box that is currently selected diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/rendering/RenderingC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/rendering/RenderingC.kt index 9266086ea..816f869f9 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/rendering/RenderingC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/block/rendering/RenderingC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -23,7 +23,7 @@ class RenderingC(profile: BlockProfile) { * This option tries to do its best to fix any occurring [Moiré Patterns](https://en.wikipedia.org/wiki/Moir%C3%A9_pattern) * If set position based random block models are disabled */ - var antiMoirePattern by BooleanDelegate(profile, true, "profile.block.rendering.anti_moire_pattern") + var antiMoirePattern by BooleanDelegate(profile, true) val entities = EntitiesC(profile) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/controls/mouse/MouseC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/controls/mouse/MouseC.kt index 71d5d3d93..54c3deb03 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/controls/mouse/MouseC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/controls/mouse/MouseC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -23,11 +23,11 @@ class MouseC(profile: ControlsProfile) { * Controls how fast the mouse rotates the player around * Must be non-negative */ - var sensitivity by FloatDelegate(profile, 1.0f, "", arrayOf(0.01f..10.0f)) + var sensitivity by FloatDelegate(profile, 1.0f, arrayOf(0.01f..10.0f)) /** * Controls how fast you scroll (e.g. in the hotbar) * Must be non-negative */ - var scrollSensitivity by FloatDelegate(profile, 1.0f, "", arrayOf(0.01f..10.0f)) + var scrollSensitivity by FloatDelegate(profile, 1.0f, arrayOf(0.01f..10.0f)) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/entries/ErosServer.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/entries/ErosServer.kt index a963461be..6e976284c 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/entries/ErosServer.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/entries/ErosServer.kt @@ -55,7 +55,7 @@ class ErosServer( /** * Sends version -1 in the handshake to query the servers version */ - override var queryVersion by BooleanDelegate(profile, queryVersion, "") + override var queryVersion by BooleanDelegate(profile, queryVersion) /** * Profiles to use for the connection to the server. diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/gui/GUIProfile.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/gui/GUIProfile.kt index 7c6277dbd..1da184d09 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/gui/GUIProfile.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/gui/GUIProfile.kt @@ -38,7 +38,7 @@ class GUIProfile( * The scale of the hud * Must be non-negative */ - var scale by FloatDelegate(this, 2.0f, "", arrayOf(1.0f..10.0f)) + var scale by FloatDelegate(this, 2.0f, arrayOf(1.0f..10.0f)) val chat = ChatC(this) val hud = HudC(this) diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/advanced/AdvancedC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/advanced/AdvancedC.kt index 4ed938295..d14686dd0 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/advanced/AdvancedC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/advanced/AdvancedC.kt @@ -36,5 +36,5 @@ class AdvancedC(profile: RenderingProfile) { * Violates the opengl specification. * Requires rendering restart to apply */ - var preferQuads by BooleanDelegate(profile, false, "profile.rendering.advanced.prefer_quads") + var preferQuads by BooleanDelegate(profile, false) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/animations/AnimationsC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/animations/AnimationsC.kt index 95cd9529c..3479d1729 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/animations/AnimationsC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/animations/AnimationsC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -21,5 +21,5 @@ class AnimationsC(profile: RenderingProfile) { /** * Enables or disables sprite animations. */ - var sprites by BooleanDelegate(profile, true, "profile.rendering.animations.sprite") + var sprites by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/CameraC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/CameraC.kt index 70f7540e2..0b4f538f3 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/CameraC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/CameraC.kt @@ -25,10 +25,10 @@ class CameraC(profile: RenderingProfile) { * Field of view * Value must be greater than 0 and smaller than 180 */ - var fov by FloatDelegate(profile, 70.0f, "profile.rendering.camera.fov", arrayOf(10.0f..179.0f)) + var fov by FloatDelegate(profile, 70.0f, arrayOf(10.0f..179.0f)) /** * Changes the fov to create a speed or slowness illusion */ - var dynamicFOV by BooleanDelegate(profile, true, "profile.rendering.camera.fov.dynamic") + var dynamicFOV by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/shaking/ShakingC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/shaking/ShakingC.kt index 9240c52df..8538b9638 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/shaking/ShakingC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/camera/shaking/ShakingC.kt @@ -23,7 +23,7 @@ class ShakingC(profile: RenderingProfile) { */ var enabled by BooleanDelegate(profile, true) - var amplifier by FloatDelegate(profile, 1.0f, "", ranges = arrayOf(0.1f..2.0f)) + var amplifier by FloatDelegate(profile, 1.0f, ranges = arrayOf(0.1f..2.0f)) /** * Shake the camera while walking diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/chunkborder/ChunkBorderC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/chunkborder/ChunkBorderC.kt index 380cfad5d..0827a72f5 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/chunkborder/ChunkBorderC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/chunkborder/ChunkBorderC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -21,5 +21,5 @@ class ChunkBorderC(profile: RenderingProfile) { /** * Enables or disables chunk border lines */ - var enabled by BooleanDelegate(profile, false, "profile.rendering.chunk_border.enabled") + var enabled by BooleanDelegate(profile, false) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/experimental/ExperimentalC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/experimental/ExperimentalC.kt index ab2748ac6..9e12a1361 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/experimental/ExperimentalC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/experimental/ExperimentalC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -23,5 +23,5 @@ class ExperimentalC(profile: RenderingProfile) { * Recommended way to disable vsync */ // For further information take a look into the code at ExperimentalRenderStats - var fps by BooleanDelegate(profile, false, "profile.rendering.experimental.fps") + var fps by BooleanDelegate(profile, false) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/fog/FogC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/fog/FogC.kt index cb9531c67..8376b4a18 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/fog/FogC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/fog/FogC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -21,5 +21,5 @@ class FogC(profile: RenderingProfile) { /** * Enables or disables fog */ - var enabled by BooleanDelegate(profile, true, "profile.rendering.fog.enabled") + var enabled by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/light/LightC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/light/LightC.kt index 0e8ae49a5..2d3ef4204 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/light/LightC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/light/LightC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -24,10 +24,10 @@ class LightC(profile: RenderingProfile) { * In original minecraft this setting is called brightness * Must be non-negative and may not exceed 1 */ - var gamma by FloatDelegate(profile, 0.0f, "profile.rendering.light.gamma", arrayOf(0.0f..1.0f)) + var gamma by FloatDelegate(profile, 0.0f, arrayOf(0.0f..1.0f)) /** * Makes everything bright */ - var fullbright by BooleanDelegate(profile, false, "profile.rendering.light.fullbright") + var fullbright by BooleanDelegate(profile, false) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/movement/MovementC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/movement/MovementC.kt index 44799e59a..abd2bdb05 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/movement/MovementC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/movement/MovementC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -22,5 +22,5 @@ class MovementC(profile: RenderingProfile) { * Disable all packets that update the position on the server * Does not disable position/teleport confirmation */ - var packetSending by BooleanDelegate(profile, true, "profile.rendering.movement.packet_sending") + var packetSending by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/OverlayC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/OverlayC.kt index 5d3b1c308..efa9a2c55 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/OverlayC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/OverlayC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -23,17 +23,17 @@ class OverlayC(profile: RenderingProfile) { /** * Enables the powder snow 2d overlay if the player is frozen */ - var powderSnow by BooleanDelegate(profile, true, "") + var powderSnow by BooleanDelegate(profile, true) /** * Enabled the pumpkin blur overlay if the player is waring a carved pumpkin */ - var pumpkin by BooleanDelegate(profile, true, "") + var pumpkin by BooleanDelegate(profile, true) /** * Enables the world boreder overlay */ - var worldBorder by BooleanDelegate(profile, true, "") + var worldBorder by BooleanDelegate(profile, true) val fire = FireC(profile) val weather = WeatherC(profile) diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/fire/FireC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/fire/FireC.kt index ed62d1f43..e82206d2a 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/fire/FireC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/fire/FireC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -21,15 +21,15 @@ class FireC(profile: RenderingProfile) { /** * Enables the fire/burning overlay */ - var enabled by BooleanDelegate(profile, true, "") + var enabled by BooleanDelegate(profile, true) /** * Enables the overlay if in creative */ - var creative by BooleanDelegate(profile, true, "") + var creative by BooleanDelegate(profile, true) /** * Enables the fire overlay if in lava */ - var lava by BooleanDelegate(profile, true, "") + var lava by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/weather/WeatherC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/weather/WeatherC.kt index e15ec621b..c915bdc9c 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/weather/WeatherC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/overlay/weather/WeatherC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -21,10 +21,10 @@ class WeatherC(profile: RenderingProfile) { /** * Enables rain overlay */ - var rain by BooleanDelegate(profile, true, "") + var rain by BooleanDelegate(profile, true) /** * Enables snow overlay */ - var snow by BooleanDelegate(profile, true, "") + var snow by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/performance/PerformanceC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/performance/PerformanceC.kt index f88bcaf58..b83429198 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/performance/PerformanceC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/performance/PerformanceC.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2022 Moritz Zwerger + * Copyright (C) 2020-2023 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -22,7 +22,7 @@ class PerformanceC(profile: RenderingProfile) { * Does not render the bottom bedrock face when at minimum y. * Kind of xray when falling out of the world. */ - var fastBedrock by BooleanDelegate(profile, true, "") + var fastBedrock by BooleanDelegate(profile, true) /** * Disables the voronoi noise for biome cache building. @@ -31,10 +31,10 @@ class PerformanceC(profile: RenderingProfile) { * Only affects 19w36+ (~1.14.4) * ToDo: Requires rejoin to apply */ - var fastBiomeNoise by BooleanDelegate(profile, true, "") + var fastBiomeNoise by BooleanDelegate(profile, true) /** * Sleeps 100 ms if the rendering window is not in focus anymore */ - var slowRendering by BooleanDelegate(profile, true, "") + var slowRendering by BooleanDelegate(profile, true) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/SkyC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/SkyC.kt index 7b1730e3f..cc5748f76 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/SkyC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/SkyC.kt @@ -28,7 +28,7 @@ class SkyC(profile: RenderingProfile) { /** * Enables or disables the (ugly?) sun scatter */ - var sunScatter by BooleanDelegate(profile, true, "") + var sunScatter by BooleanDelegate(profile, true) val clouds = CloudC(profile) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/cloud/CloudC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/cloud/CloudC.kt index 64162196b..c013d57c6 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/cloud/CloudC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/rendering/sky/cloud/CloudC.kt @@ -23,22 +23,22 @@ class CloudC(profile: RenderingProfile) { /** * Renders clouds */ - var enabled by BooleanDelegate(profile, true, "") + var enabled by BooleanDelegate(profile, true) /** * Renders clouds flat and not 3d */ - var flat by BooleanDelegate(profile, false, "") + var flat by BooleanDelegate(profile, false) /** * Moves clouds from time to time */ - var movement by BooleanDelegate(profile, true, "") + var movement by BooleanDelegate(profile, true) /** * Max y axis distance to clouds */ - var maxDistance by FloatDelegate(profile, 60.0f, "") + var maxDistance by FloatDelegate(profile, 60.0f) /**