Small cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -16,7 +16,6 @@ defaultRoom =
|
||||
, _rmPath = mempty
|
||||
, _rmPmnts = mempty
|
||||
, _rmInPmnt = mempty
|
||||
-- , _rmOutPmnt = mempty
|
||||
, _rmBound = mempty
|
||||
, _rmFloor = InheritFloor
|
||||
, _rmName = "defaultRoom"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user