From d84baa97636e76b287e3cf8d81f293f987200649 Mon Sep 17 00:00:00 2001 From: Benedict Etzel Date: Mon, 22 Apr 2024 22:27:31 +0200 Subject: [PATCH] fix(BattlegroundsLogFilter): whitelist COPIED_FROM_ENTITY_ID --- hslog/filter.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hslog/filter.py b/hslog/filter.py index a35bb48..9123693 100644 --- a/hslog/filter.py +++ b/hslog/filter.py @@ -8,7 +8,7 @@ from hslog.utils import parse_tag -# List of TAG_CHANGE tags to discard +# List of TAG_CHANGE tags to discard/keep BLACKLISTED_TAGS = [ "EXHAUSTED", @@ -20,6 +20,10 @@ "TECH_LEVEL", ] +WHITELISTED_TAGS = [ + "COPIED_FROM_ENTITY_ID", +] + # List of FULL_ENTITY tags to discard BLACKLISTED_FULL_ENTITY_TAGS = [ @@ -403,7 +407,8 @@ def _handle_tag_change(self, msg: str, line: str): tag in BLACKLISTED_TAGS or ( self._current_buffer is not None and - hasattr(self._current_buffer, "skip_tag_changes") + hasattr(self._current_buffer, "skip_tag_changes") and + not tag in WHITELISTED_TAGS ) ): self._start_new_buffer("TAG_CHANGE", "")