This commit is contained in:
2025-10-24 13:08:44 +01:00
parent 27569ed8f3
commit 7b622c8e31
8 changed files with 6 additions and 28 deletions
-3
View File
@@ -24,17 +24,14 @@ import RandomHelp
import Shape
makeDoorDebris :: Door -> World -> World
--makeDoorDebris dr w = w & makeDebris mt col p
makeDoorDebris dr w = w & makeDebris mt p
where
p2a = lerpP2A (dr ^. drZeroPos) (dr ^. drOnePos) (dr ^. drLerp)
p = centroid . fmap fst $ (dr ^. drFootPrint) & each . each %~ shiftPointBy p2a
--(mt, col) = fromMaybe (Stone, greyN 0.5) $ do
mt = fromMaybe Stone $ do
wlids <- w ^? cWorld . lWorld . doors . ix (_drID dr) . drFootPrint
((wlid,_),_) <- IM.minViewWithKey wlids
wl <- w ^? cWorld . lWorld . walls . ix wlid
--return (_wlMaterial wl, _wlColor wl)
return $ wl ^. wlMaterial
makeBlockDebris :: Block -> World -> World