Restructure all modules what could go wrong?
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user