Skip to content

Commit

Permalink
Removed diana warp data on world switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Nov 1, 2023
1 parent e3b0c5d commit 1d4e3a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class ConfigGuiForgeInterop : IModGuiFactory {

override fun getHandlerFor(element: RuntimeOptionCategoryElement): RuntimeOptionGuiHandler? = null

class WrappedSkyHanniConfig(private val parent: GuiScreen) : GuiScreenElementWrapper(ConfigGuiManager.getEditorInstance()) {
class WrappedSkyHanniConfig(private val parent: GuiScreen) :
GuiScreenElementWrapper(ConfigGuiManager.getEditorInstance()) {
@Throws(IOException::class)
override fun handleKeyboardInput() {
if (Keyboard.getEventKeyState() && Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.event.diana
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzKeyPressEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.sorted
Expand Down Expand Up @@ -53,6 +54,12 @@ class BurrowWarpHelper {
}
}

@SubscribeEvent
fun onWorldChange(event: LorenzWorldChangeEvent) {
lastWarp = null
currentWarp = null
}

companion object {
private val config get() = SkyHanniMod.feature.event.diana
var currentWarp: WarpPoint? = null
Expand Down

0 comments on commit 1d4e3a5

Please sign in to comment.