aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/inventory
diff options
context:
space:
mode:
authorNatalia Spence <52349324+Septikai@users.noreply.github.com>2025-11-12 13:06:52 +0000
committerLinnea Gräf <nea@nea.moe>2025-11-15 14:49:14 +0100
commit890ef965202a418024ceb5fb46b51d9e27fe6918 (patch)
tree6fcdb37f53d06d4199afeb92d1d651b6322ac23e /src/main/kotlin/features/inventory
parente8c00ad48959bed4f1b4650cb79b0dae22c76b59 (diff)
downloadFirmament-890ef965202a418024ceb5fb46b51d9e27fe6918.tar.gz
Firmament-890ef965202a418024ceb5fb46b51d9e27fe6918.tar.bz2
Firmament-890ef965202a418024ceb5fb46b51d9e27fe6918.zip
fix: reset on profile switch
Diffstat (limited to 'src/main/kotlin/features/inventory')
-rw-r--r--src/main/kotlin/features/inventory/PetFeatures.kt10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/kotlin/features/inventory/PetFeatures.kt b/src/main/kotlin/features/inventory/PetFeatures.kt
index cdac6a0..646989c 100644
--- a/src/main/kotlin/features/inventory/PetFeatures.kt
+++ b/src/main/kotlin/features/inventory/PetFeatures.kt
@@ -11,6 +11,7 @@ import moe.nea.firmament.Firmament
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.events.HudRenderEvent
import moe.nea.firmament.events.ProcessChatEvent
+import moe.nea.firmament.events.ProfileSwitchEvent
import moe.nea.firmament.events.SlotClickEvent
import moe.nea.firmament.events.SlotRenderEvents
import moe.nea.firmament.jarvis.JarvisIntegration
@@ -74,6 +75,14 @@ object PetFeatures {
private var tempChatPet: ParsedPet? = null
@Subscribe
+ fun onProfileSwitch(event: ProfileSwitchEvent) {
+ petMap.clear()
+ currentPetUUID = ""
+ tempTabPet = null
+ tempChatPet = null
+ }
+
+ @Subscribe
fun onSlotRender(event: SlotRenderEvents.Before) {
// Cache pets
petMenuTitle.useMatch(MC.screenName ?: return) {
@@ -120,7 +129,6 @@ object PetFeatures {
@Subscribe
fun onChatEvent(event: ProcessChatEvent) {
- println("^^^" + event.text.formattedString() + "$$$")
// Handle AutoPet
var matcher = autopetPattern.matcher(event.text.formattedString())
if (matcher.matches()) {