From 3d4f12997c4cfdfddf6c179c7fe8cd48dd46997b Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 5 Oct 2022 19:33:44 -0400 Subject: [PATCH] Prevent DreamWorld debug warp option stealing a lit lantern --- QSB/Utility/DebugActions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QSB/Utility/DebugActions.cs b/QSB/Utility/DebugActions.cs index 06c14888..11100811 100644 --- a/QSB/Utility/DebugActions.cs +++ b/QSB/Utility/DebugActions.cs @@ -167,7 +167,8 @@ public class DebugActions : MonoBehaviour, IAddComponentOnStart { var dreamLanternItem = QSBWorldSync.GetWorldObjects().First(x => x.AttachedObject._lanternType == DreamLanternType.Functioning && - QSBPlayerManager.PlayerList.All(y => y.HeldItem != x) + QSBPlayerManager.PlayerList.All(y => y.HeldItem != x) && + (!x.AttachedObject.GetLanternController()?.IsLit() ?? false) ).AttachedObject; Locator.GetToolModeSwapper().GetItemCarryTool().PickUpItemInstantly(dreamLanternItem); }