Disable cheats by default
This commit is contained in:
parent
a2ad88b298
commit
3c647aa44b
|
@ -53,6 +53,7 @@ object Configuration {
|
|||
"""
|
||||
|Snowy {
|
||||
| displayInitMessage = true
|
||||
| riskyCheats = false
|
||||
|}
|
||||
""".trimMargin()
|
||||
)
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
package fr.username404.snowygui.misc
|
||||
|
||||
import fr.username404.snowygui.ClickGui
|
||||
import fr.username404.snowygui.config.Configuration
|
||||
import fr.username404.snowygui.newBox
|
||||
import io.github.config4k.getValue
|
||||
import net.minecraft.client.Minecraft
|
||||
|
||||
object Storage {
|
||||
private var oldGamma = -1.0
|
||||
private const val redColor = 0x660000
|
||||
var hurtCamera: Boolean = true; private set
|
||||
|
||||
private val riskyCheats: Boolean by Configuration.obtained
|
||||
fun ClickGui.addComponents() {
|
||||
addComps(
|
||||
newBox("snowy.clickbox.misc").addButtons(
|
||||
|
@ -20,10 +24,16 @@ object Storage {
|
|||
}
|
||||
}
|
||||
),
|
||||
newBox("snowy.clickbox.risky", color = 0x660000).addButtons(
|
||||
"NoHurtCamera" to { hurtCamera = !hurtCamera },
|
||||
"NoGravity" to { Minecraft.getInstance().player?.let { it.isNoGravity = !it.isNoGravity } }
|
||||
),
|
||||
)
|
||||
if (riskyCheats) {
|
||||
addComps(
|
||||
newBox("snowy.clickbox.risky.camera", color = redColor).addButtons(
|
||||
"NoHurtCamera" to { hurtCamera = !hurtCamera }
|
||||
),
|
||||
newBox("snowy.clickbox.risky.movement", color = redColor).addButtons(
|
||||
"NoGravity" to { Minecraft.getInstance().player?.let { it.isNoGravity = !it.isNoGravity } }
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,5 +5,6 @@
|
|||
"key.snowy.opengui": "Open the snowy gui",
|
||||
"key.snowy.configkey": "Open the snowy configuration screen",
|
||||
"snowy.clickbox.misc": "Miscellaneous",
|
||||
"snowy.clickbox.risky": "Risky"
|
||||
"snowy.clickbox.risky.camera": "Camera",
|
||||
"snowy.clickbox.risky.movement": "Movement"
|
||||
}
|
|
@ -5,5 +5,6 @@
|
|||
"key.snowy.opengui": "Ouvrir l'interface de snowy",
|
||||
"key.snowy.configkey": "Ouvrir l'écran de configuration de snowy",
|
||||
"snowy.clickbox.misc": "Divers",
|
||||
"snowy.clickbox.risky": "Risqué"
|
||||
"snowy.clickbox.risky.camera": "Caméra",
|
||||
"snowy.clickbox.risky.movement": "Mouvement"
|
||||
}
|
Loading…
Reference in New Issue