Fix bug in detecting which room you are in

This commit is contained in:
2021-09-03 01:22:46 +01:00
parent c69af7a5f4
commit 1bbeb926a5
14 changed files with 121 additions and 93 deletions
+6 -4
View File
@@ -8,6 +8,7 @@ module Dodge.Room.Data
, rmPS
, rmBound
, rmFloor
, rmName
) where
import Dodge.LevelGen.Data
--import Geometry
@@ -27,9 +28,10 @@ assigning no bounds will allow rooms to overlap.
data Room = Room
{ _rmPolys :: [ [Point2] ]
, _rmLinks :: [(Point2,Float)]
, _rmPath :: [(Point2, Point2)]
, _rmPS :: [Placement]
, _rmBound :: [ [Point2] ]
, _rmFloor :: [Tile]
, _rmPath :: [(Point2, Point2)]
, _rmPS :: [Placement]
, _rmBound :: [ [Point2] ]
, _rmFloor :: [Tile]
, _rmName :: String
}
makeLenses ''Room
+1
View File
@@ -48,6 +48,7 @@ twinSlowDoorRoom drID w h x = defaultRoom
(over worldState (M.insert (DoorNumOpen drID) True))
]
, _rmBound = ps
, _rmName = "twinSlowDoorRoom"
}
where
ps =