Add files

This commit is contained in:
2025-11-02 22:07:15 +00:00
parent cf6cd3cd83
commit 8d79e96798
4 changed files with 156 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
module Dodge.Wall.Pathing (getWallPathing) where
import qualified Data.Set as S
import Dodge.Data.Wall
import Control.Lens
getWallPathing :: Wall -> S.Set WallFlag
getWallPathing wl = f . g . h $ mempty
where
h = case wl ^. wlStructure of
StandaloneWall -> S.insert WallNotDestrucable
_ | wl ^. wlMaterial == Crystal -> S.insert WallNotDestrucable
_ -> id
g = case wl ^? wlStructure . wsIsAutoDoor of
Just True -> id
_ -> S.insert WallNotAutoOpen
f = case wl ^. wlOpacity of
Opaque {} -> S.insert WallBlockVisibility
_ -> id