Prevent DreamWorld debug warp option stealing a lit lantern

This commit is contained in:
Nick 2022-10-05 19:33:44 -04:00
parent a05a628959
commit 3d4f12997c

View File

@ -167,7 +167,8 @@ public class DebugActions : MonoBehaviour, IAddComponentOnStart
{
var dreamLanternItem = QSBWorldSync.GetWorldObjects<QSBDreamLanternItem>().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);
}