Correctly update root status of item in _ilIsRoot

This commit is contained in:
2024-11-05 18:25:30 +00:00
parent 38ab6a35da
commit 9b3518e4eb
16 changed files with 40 additions and 25 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ invSideEff cr = alaf Endo foldMap f (_crInv cr) . updateHeldRootItem cr
updateHeldRootItem :: Creature -> World -> World
updateHeldRootItem cr = fromMaybe id $ do
invid <- cr ^? crManipulation . manObject . imRootItem
invid <- cr ^? crManipulation . manObject . imRootSelectedItem
itmtree <- invRootTrees (_crInv cr) ^? ix invid
return $ updateAttachedItems itmtree cr