diff --git a/src/Dodge/Data/GenWorld.hs b/src/Dodge/Data/GenWorld.hs index c367fc6dc..76e79cba5 100644 --- a/src/Dodge/Data/GenWorld.hs +++ b/src/Dodge/Data/GenWorld.hs @@ -23,7 +23,7 @@ import System.Random data GenWorld = GenWorld { _gwWorld :: World , _genRooms :: IM.IntMap Room - , _genPmnt :: IM.IntMap [Placement] + , _genPmnt :: IM.IntMap Placement } ---- ROOM DATATYPES diff --git a/src/Dodge/Default/Room.hs b/src/Dodge/Default/Room.hs index 53125f833..71402713b 100644 --- a/src/Dodge/Default/Room.hs +++ b/src/Dodge/Default/Room.hs @@ -16,7 +16,6 @@ defaultRoom = , _rmPath = mempty , _rmPmnts = mempty , _rmInPmnt = mempty --- , _rmOutPmnt = mempty , _rmBound = mempty , _rmFloor = InheritFloor , _rmName = "defaultRoom" diff --git a/src/Dodge/Placement/PlaceSpot.hs b/src/Dodge/Placement/PlaceSpot.hs index e323ab814..e4c477c5c 100644 --- a/src/Dodge/Placement/PlaceSpot.hs +++ b/src/Dodge/Placement/PlaceSpot.hs @@ -48,7 +48,7 @@ placePlainPSSpot w rm plmnt shift = where f x gw = fromMaybe gw $ do j <- x ^. plExternalID - return $ gw & genPmnt . at j ?~ [x] + return $ gw & genPmnt . at j ?~ x recrPlace newplmnt w' pl = let (wr, newplmnts) = placeSpot (w', rm & rmPmnts .:~ newplmnt) pl in (wr, newplmnt : newplmnts) diff --git a/src/Dodge/Room/Airlock.hs b/src/Dodge/Room/Airlock.hs index ae28954ee..aa7646e1e 100644 --- a/src/Dodge/Room/Airlock.hs +++ b/src/Dodge/Room/Airlock.hs @@ -47,7 +47,7 @@ decontamRoom i = & rmBound .~ [rectNSWE 75 15 0 40, switchcut] where f gw = fromMaybe (error "tried to put a door using an empty placement list") $ do - pmnt <- gw ^? genPmnt . ix i . _head + pmnt <- gw ^? genPmnt . ix i return $ putDoubleDoor DoorObstacle (switchWallCol red) (cond pmnt) (V2 (-10) 35) (V2 (-10) 65) diff --git a/src/Dodge/Room/Door.hs b/src/Dodge/Room/Door.hs index 033c83031..4673ccfd9 100644 --- a/src/Dodge/Room/Door.hs +++ b/src/Dodge/Room/Door.hs @@ -41,7 +41,7 @@ triggerDoorRoom i = } where f gw = fromMaybe (error "tried to put a door using an empty placement list") $ do - pmnt <- gw ^? genPmnt . ix i . _head + pmnt <- gw ^? genPmnt . ix i return $ putDoubleDoor DoorObstacle (switchWallCol red) (cond pmnt) (V2 0 20) (V2 40 20) 2 cond pmnt = WdTrig $ fromJust (_plMID pmnt)