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
+5 -2
View File
@@ -11,6 +11,7 @@ import Control.Lens
import Control.Monad.State
import System.Random
import Data.Maybe
import qualified Data.IntMap.Strict as IM
--import Data.Bifunctor
data PSType = PutCrit {_unPutCrit :: Creature}
| PutMachine Color [Point2] Machine
@@ -119,6 +120,7 @@ assigning no bounds will allow rooms to overlap.
data Room = Room
{ _rmPolys :: [ [Point2] ]
, _rmLinks :: [(Point2,Float)]
, _rmLinkEff :: [(Point2,Float) -> Room -> Room]
, _rmPos :: [RoomPos]
, _rmPath :: [(Point2, Point2)]
, _rmPmnts :: [Placement]
@@ -132,10 +134,11 @@ data Room = Room
, _rmRandPSs :: [State StdGen (Point2,Float)]
, _rmLabel :: Maybe Int
, _rmTakeFrom :: Maybe Int
, _rmWires :: [RoomWire]
, _rmStartWires :: IM.IntMap RoomWire
, _rmEndWires :: IM.IntMap RoomWire
}
data RoomWire
= RoomWire (Point2,Float) (Point2,Float)
= RoomWire Point2 Float
data RoomPos
= OutLink Int Point2 Float
| InLink Point2 Float