Remove creature records

This commit is contained in:
2025-06-06 14:52:52 +01:00
parent 05f250f928
commit 467f241d7a
15 changed files with 37 additions and 28 deletions
+5 -4
View File
@@ -3,7 +3,7 @@
-- | Actions performed by creatures within the world
module Dodge.Creature.Action (
performActions,
setMinInvSize,
-- setMinInvSize,
dropExcept,
dropItem,
blinkActionMousePos,
@@ -140,8 +140,8 @@ performAction cr w ac = case ac of
(imps, _) -> (imps, Just $ DoReplicatePartial startac (t -1) startac)
NoAction -> ([], Nothing)
setMinInvSize :: Int -> Creature -> World -> World
setMinInvSize n cr = cWorld . lWorld . creatures . ix (_crID cr) . crInvCapacity .~ n
--setMinInvSize :: Int -> Creature -> World -> World
--setMinInvSize n cr = cWorld . lWorld . creatures . ix (_crID cr) . crInvCapacity .~ n
---- maybe this should be removed...
--stripNoItems :: Creature -> World -> World
@@ -191,7 +191,8 @@ youDropItem w = fromMaybe w $ do
curpos <-
cr ^? crManipulation . manObject . imSelectedItem
<|> fmap fst (IM.lookupMax (cr ^. crInv))
guard $ not $ _crInvLock cr
--guard $ not $ _crInvLock cr
guard $ not $ w ^. cWorld . lWorld . lInvLock
return $ case cr ^. crStance . posture of
Aiming -> throwItem w
AtEase -> dropItem cr curpos w