Restructure all modules what could go wrong?

This commit is contained in:
desyncfy
2024-06-29 12:28:08 -07:00
parent 17cce61ac6
commit 4a15cc7274
5 changed files with 23 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
package chickenmanfy.scify package chickenmanfy.scify
import chickenmanfy.scify.modules.Hotkey import chickenmanfy.scify.modules.* // woo fancy import all modules
import net.fabricmc.api.ClientModInitializer import net.fabricmc.api.ClientModInitializer
@@ -8,5 +8,11 @@ object SciFyClient : ClientModInitializer {
override fun onInitializeClient() { override fun onInitializeClient() {
// Runs the Hotkey().hotkeys() function which contains all keybindings. // Runs the Hotkey().hotkeys() function which contains all keybindings.
Hotkey().hotkeys() Hotkey().hotkeys()
// Run the modules
AutoWelcome().autoWelcome()
FishingNotif().fishingNotif()
Bars().bars()
//LivelyMode().livelyMode()
} }
} }

View File

@@ -4,12 +4,11 @@ var autoWelcomeToggle: Boolean = false
class AutoWelcome { class AutoWelcome {
fun toggleAutoWelcome() { fun toggleAutoWelcome() {
autoWelcomeToggle = !autoWelcomeToggle autoWelcomeToggle = !autoWelcomeToggle
if (autoWelcomeToggle) {
autoWelcome()
}
} }
private fun autoWelcome() { fun autoWelcome() {
println("Auto Welcome") if (autoWelcomeToggle) {
return
}
} }
} }

View File

@@ -4,12 +4,11 @@ var barsToggle: Boolean = false
class Bars { class Bars {
fun toggleBars() { fun toggleBars() {
barsToggle = !barsToggle barsToggle = !barsToggle
if (barsToggle) {
bars()
}
} }
private fun bars() { fun bars() {
println("Bars") if (barsToggle) {
return
}
} }
} }

View File

@@ -5,16 +5,15 @@ class FishingNotif {
// Fishing Notification Toggle // Fishing Notification Toggle
fun toggleFishingNotif() { fun toggleFishingNotif() {
fishingToggle = !fishingToggle fishingToggle = !fishingToggle
if (fishingToggle) {
fishingNotif()
}
} }
// Code in Menu.kt: // Code in Menu.kt:
// toggleFishingNotif() // toggleFishingNotif()
private fun fishingNotif() { fun fishingNotif() {
if (fishingToggle) {
return return
} }
}
} }

View File

@@ -4,12 +4,11 @@ var livelyModeToggle: Boolean = false
class LivelyMode { class LivelyMode {
fun toggleLivelyMode() { fun toggleLivelyMode() {
livelyModeToggle = !livelyModeToggle livelyModeToggle = !livelyModeToggle
if (livelyModeToggle) {
livelyMode()
}
} }
private fun livelyMode() { fun livelyMode() {
println("Lively Mode") if (livelyModeToggle) {
return
}
} }
} }