Small cleanup

This commit is contained in:
2025-09-23 17:17:27 +01:00
parent 60fdd138e3
commit 4074c40083
5 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -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
-1
View File
@@ -16,7 +16,6 @@ defaultRoom =
, _rmPath = mempty
, _rmPmnts = mempty
, _rmInPmnt = mempty
-- , _rmOutPmnt = mempty
, _rmBound = mempty
, _rmFloor = InheritFloor
, _rmName = "defaultRoom"
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)