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]
buildShaft = foldl
(\acc coord -> M.setElem (replaceTile (acc M.! coord) Hall) coord acc)
(foldl (flip $ M.setElem Wall) empty (boxCoord 2))
(boxCoord 5)
elvDoor = M.setElem Door (row + 2, col) buildShaft
in (gen, foldl ( flip $ M.setElem Elev) elvDoor (boxCoord 1))
(foldl (flip $ M.setElem Wall) empty (boxCoord 1))
(boxCoord 3)
elvDoor = M.setElem Door (row + 1, col) buildShaft
in (gen, foldl ( flip $ M.setElem Elev) elvDoor (boxCoord 0))
placeHalls
:: StdGen

View File

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