diff options
Diffstat (limited to 'src/main')
-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) { |