Restructure all modules what could go wrong?
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package chickenmanfy.scify
|
||||
|
||||
import chickenmanfy.scify.modules.Hotkey
|
||||
import chickenmanfy.scify.modules.* // woo fancy import all modules
|
||||
import net.fabricmc.api.ClientModInitializer
|
||||
|
||||
|
||||
@@ -8,5 +8,11 @@ object SciFyClient : ClientModInitializer {
|
||||
override fun onInitializeClient() {
|
||||
// Runs the Hotkey().hotkeys() function which contains all keybindings.
|
||||
Hotkey().hotkeys()
|
||||
|
||||
// Run the modules
|
||||
AutoWelcome().autoWelcome()
|
||||
FishingNotif().fishingNotif()
|
||||
Bars().bars()
|
||||
//LivelyMode().livelyMode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,11 @@ var autoWelcomeToggle: Boolean = false
|
||||
class AutoWelcome {
|
||||
fun toggleAutoWelcome() {
|
||||
autoWelcomeToggle = !autoWelcomeToggle
|
||||
if (autoWelcomeToggle) {
|
||||
autoWelcome()
|
||||
}
|
||||
}
|
||||
|
||||
private fun autoWelcome() {
|
||||
println("Auto Welcome")
|
||||
fun autoWelcome() {
|
||||
if (autoWelcomeToggle) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,11 @@ var barsToggle: Boolean = false
|
||||
class Bars {
|
||||
fun toggleBars() {
|
||||
barsToggle = !barsToggle
|
||||
if (barsToggle) {
|
||||
bars()
|
||||
}
|
||||
}
|
||||
|
||||
private fun bars() {
|
||||
println("Bars")
|
||||
fun bars() {
|
||||
if (barsToggle) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,16 +5,15 @@ class FishingNotif {
|
||||
// Fishing Notification Toggle
|
||||
fun toggleFishingNotif() {
|
||||
fishingToggle = !fishingToggle
|
||||
if (fishingToggle) {
|
||||
fishingNotif()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Code in Menu.kt:
|
||||
// toggleFishingNotif()
|
||||
|
||||
private fun fishingNotif() {
|
||||
fun fishingNotif() {
|
||||
if (fishingToggle) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,11 @@ var livelyModeToggle: Boolean = false
|
||||
class LivelyMode {
|
||||
fun toggleLivelyMode() {
|
||||
livelyModeToggle = !livelyModeToggle
|
||||
if (livelyModeToggle) {
|
||||
livelyMode()
|
||||
}
|
||||
}
|
||||
|
||||
private fun livelyMode() {
|
||||
println("Lively Mode")
|
||||
fun livelyMode() {
|
||||
if (livelyModeToggle) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user