Allow arbitrary changes to a room when using a link slot

This commit is contained in:
2021-11-14 01:47:33 +00:00
parent 4a089ff0cc
commit 52946f33a7
10 changed files with 55 additions and 18 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
--{-# LANGUAGE TupleSections #-}
module Dodge.Room.Foreground
where
module Dodge.Room.Foreground where
import Picture
import Geometry
import Geometry.Vector3D
+3
View File
@@ -16,6 +16,7 @@ import Data.Tree
import Control.Monad.State
import Control.Lens
import System.Random
import qualified Data.IntMap.Strict as IM
rezBox :: Room
rezBox = shiftRoomBy (V2 (-20) (-10),0) $ roomRect 40 20 1 1
@@ -39,4 +40,6 @@ startRoom = do
<$> randomiseOutLinks
(shiftRoomBy (V2 (-20) (-20),0)
$ roomRectAutoLinks w h & rmPmnts %~ (plmnts ++)
& rmStartWires .~ IM.fromList [(0,RoomWire (V2 0 0) 0)]
& rmEndWires .~ IM.fromList [(0,RoomWire (V2 (500) 500) 0)]
)