diff options
author | alexia <me@alexia.lol> | 2024-01-23 16:39:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 16:39:53 +0100 |
commit | d025d93bb69c7aa43dfe1ab8b2a2e11e331b4df7 (patch) | |
tree | 2897ffff0b443b10966aa31c01029547bb0e691d /src/main/java | |
parent | 963da98e2f20f142bbb4395a57e8cfbd40c91a8a (diff) | |
download | skyhanni-d025d93bb69c7aa43dfe1ab8b2a2e11e331b4df7.tar.gz skyhanni-d025d93bb69c7aa43dfe1ab8b2a2e11e331b4df7.tar.bz2 skyhanni-d025d93bb69c7aa43dfe1ab8b2a2e11e331b4df7.zip |
Warn to open visitor inventory again after partially serving Spaceman (#905)
Warn to open visitor inventory again after partially serving Spaceman. #905
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index dc375174f..273ae48ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -52,6 +52,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils import at.hannibal2.skyhanni.utils.getLorenzVec import at.hannibal2.skyhanni.utils.renderables.Renderable +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import com.google.gson.JsonArray import com.google.gson.JsonPrimitive import net.minecraft.client.Minecraft @@ -74,6 +75,7 @@ class GardenVisitorFeatures { private val copperPattern = " §8\\+§c(?<amount>.*) Copper".toPattern() private val gardenExperiencePattern = " §8\\+§2(?<amount>.*) §7Garden Experience".toPattern() private val visitorChatMessagePattern = "§e\\[NPC] (§.)?(?<name>.*)§f: §r.*".toPattern() + private val partialAcceptedPattern by RepoPattern.pattern("garden.visitor.partialaccepted", "§aYou gave some of the required items!") private val logger = LorenzLogger("garden/visitors") private var lastFullPrice = 0.0 @@ -116,12 +118,11 @@ class GardenVisitorFeatures { if (alreadyReady) { VisitorAPI.changeStatus(visitor, VisitorAPI.VisitorStatus.READY, "inSacks") visitor.inSacks = true - update() } else { VisitorAPI.changeStatus(visitor, VisitorAPI.VisitorStatus.WAITING, "firstContact") } - update() } + update() } private fun updateDisplay() { @@ -458,6 +459,10 @@ class GardenVisitorFeatures { if (GardenAPI.inGarden() && config.hideChat && hideVisitorMessage(event.message)) { event.blockedReason = "garden_visitor_message" } + + partialAcceptedPattern.matchMatcher(event.message) { + if (config.shoppingList.display) LorenzUtils.chat("Talk to the visitor again to update the number of items needed!") + } } private fun hideVisitorMessage(message: String) = visitorChatMessagePattern.matchMatcher(message) { |