From 89613009e6dd7dc329fe505f3f79a64e5f321dff Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 21 Apr 2026 04:48:27 -0500 Subject: [PATCH] Fixed captures not clearing on section clear - Also added section property to allow captures to persist after clear --- EmoTracker.Data/LocationDatabase.cs | 1 + EmoTracker.Data/Locations/Section.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/EmoTracker.Data/LocationDatabase.cs b/EmoTracker.Data/LocationDatabase.cs index 292e118..4067a19 100644 --- a/EmoTracker.Data/LocationDatabase.cs +++ b/EmoTracker.Data/LocationDatabase.cs @@ -442,6 +442,7 @@ Location LoadLocation(IGamePackage package, Location parent, JObject data) } } section.ClearOnCapture = sectionData.GetValue("clear_on_capture", false); + section.CapturePersist = sectionData.GetValue("capture_persist", false); section.ShowGateItem = sectionData.GetValue("show_gate_item", true); JArray sectionRules = sectionData.GetValue("access_rules"); diff --git a/EmoTracker.Data/Locations/Section.cs b/EmoTracker.Data/Locations/Section.cs index 776a5b4..c346e51 100644 --- a/EmoTracker.Data/Locations/Section.cs +++ b/EmoTracker.Data/Locations/Section.cs @@ -37,6 +37,7 @@ private static AccessibilityLevel Max(AccessibilityLevel a, AccessibilityLevel b private double mCaptureBadgeOffsetX = 0; private double mCaptureBadgeOffsetY = 0; private bool mbClearOnCapture = false; + private bool mbCapturePersist = false; private bool mSuppressCaptureClearing = false; private bool mbShowGateItem = true; @@ -199,7 +200,7 @@ public uint AvailableChestCount { using (TransactionProcessor.Current.OpenTransaction()) { - if (value == 0 && CapturedItem != null && !mbCaptureBadge && !mSuppressCaptureClearing) + if (value == 0 && CapturedItem != null && !mSuppressCaptureClearing && !mbCapturePersist) { CapturedItem.AdvanceToCode(); CapturedItem = null; @@ -269,6 +270,12 @@ public bool ClearOnCapture set { SetProperty(ref mbClearOnCapture, value); } } + public bool CapturePersist + { + get { return mbCapturePersist; } + set { SetProperty(ref mbCapturePersist, value); } + } + public bool ShowGateItem { get { return mbShowGateItem; }