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