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