This commit is contained in:
nek0 2019-02-02 21:25:22 +01:00
parent cb923d4f21
commit 89db07cb0a
4 changed files with 5 additions and 4 deletions

View file

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

View file

@ -81,10 +81,10 @@ buildElevator fc (gen, empty) =
boxCoord x = (,) <$> [row - x .. row + x] <*> [col - x .. col + x] boxCoord x = (,) <$> [row - x .. row + x] <*> [col - x .. col + x]
buildShaft = foldl buildShaft = foldl
(\acc coord -> M.setElem (replaceTile (acc M.! coord) Hall) coord acc) (\acc coord -> M.setElem (replaceTile (acc M.! coord) Hall) coord acc)
(foldl (flip $ M.setElem Wall) empty (boxCoord 2)) (foldl (flip $ M.setElem Wall) empty (boxCoord 1))
(boxCoord 5) (boxCoord 3)
elvDoor = M.setElem Door (row + 2, col) buildShaft elvDoor = M.setElem Door (row + 1, col) buildShaft
in (gen, foldl ( flip $ M.setElem Elev) elvDoor (boxCoord 1)) in (gen, foldl ( flip $ M.setElem Elev) elvDoor (boxCoord 0))
placeHalls placeHalls
:: StdGen :: StdGen

View file

@ -26,6 +26,7 @@ data Entity f = Entity
, npcWorkplace :: Component f 'Field ReachPoint , npcWorkplace :: Component f 'Field ReachPoint
, npcActionState :: Component f 'Field NPCActionState , npcActionState :: Component f 'Field NPCActionState
, npcStats :: Component f 'Field NPCStats , npcStats :: Component f 'Field NPCStats
, npcClearanceLvl :: Component f 'Field Int
, anim :: Component f 'Field AnimState , anim :: Component f 'Field AnimState
, objAccess :: Component f 'Field ((V2 Int), Direction) , objAccess :: Component f 'Field ((V2 Int), Direction)
, objType :: Component f 'Field ObjType , objType :: Component f 'Field ObjType