Remove creature records
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user