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
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()
}
}

View File

@@ -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
}
}
}

View File

@@ -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
}
}
}

View File

@@ -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
}
}
}

View File

@@ -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
}
}
}