Commit before attempting to simplify creature update

This commit is contained in:
2025-10-17 10:36:19 +01:00
parent c533e88d24
commit f969056912
4 changed files with 4 additions and 34 deletions
-27
View File
@@ -3,13 +3,11 @@
-- | Actions performed by creatures within the world
module Dodge.Creature.Action (
performActions,
-- setMinInvSize,
dropExcept,
dropItem,
blinkActionMousePos,
blinkActionFail,
unsafeBlinkAction,
-- sizeSelf,
youDropItem,
) where
@@ -25,7 +23,6 @@ import Data.Maybe
import Dodge.Base
import Dodge.Creature.Action.Blink
import Dodge.CreatureEffect
--import Dodge.Data.SelectionList
import Dodge.Data.World
import Dodge.FloatFunction
import Dodge.FloorItem
@@ -197,7 +194,6 @@ youDropItem w = fromMaybe w $ do
curpos <-
cr ^? crManipulation . manObject . imSelectedItem . unNInt
<|> fmap fst (IM.lookupMax (cr ^. crInv . unNIntMap))
--guard $ not $ _crInvLock cr
guard $ not $ w ^. cWorld . lWorld . lInvLock
return $ case cr ^. crStance . posture of
Aiming {} -> throwItem w
@@ -209,26 +205,3 @@ youDropItem w = fromMaybe w $ do
-- should throw all attached items?
throwItem :: World -> World
throwItem = id
--sizeSelf :: Float -> Creature -> World -> Maybe World
--sizeSelf x cr w
-- | not (crOnWall cr1 w) =
-- Just $
-- w
-- & soundMultiFrom [TeleSound 0, TeleSound 1] cpos teleS Nothing
-- & cWorld . lWorld . distortions .:~ distortionBulge
-- & cWorld . lWorld . creatures . ix cid
-- %~ ( (crRad .~ 10 * x)
-- . (crMvType . mvSpeed .~ yourDefaultSpeed * x)
-- . (crStance . strideLength .~ ceiling (fromIntegral yourDefaultStrideLength * x))
-- )
-- | otherwise = Nothing
-- where
-- cr1 = colCrWall w (cr{_crRad = 10 * x})
-- distR = 120
-- distortionBulge
-- | _crRad cr < 10 * x = raddist 1.9
-- | otherwise = raddist 0.1
-- raddist = RadialDistortion cpos (cpos +.+ V2 distR 0) (cpos +.+ V2 0 distR)
-- cid = _crID cr
-- cpos = _crPos cr