Implement terminals

This commit is contained in:
2022-03-14 20:39:23 +00:00
parent 1b6f11709c
commit f16f32d9d3
30 changed files with 313 additions and 119 deletions
+6 -2
View File
@@ -20,7 +20,7 @@ import qualified Data.IntMap.Strict as IM
data PSType = PutCrit {_unPutCrit :: Creature}
| PutMachine { _putMachineColor :: Color, _putMachinePoly :: [Point2], _unPutMachine :: Machine }
| PutLS LightSource
| PutButton Button
| PutButton {_pstPutButton :: Button}
| PutProp Prop
| PutFlIt Item
| PutPPlate PressPlate
@@ -52,6 +52,7 @@ data PlacementSpot
{ _psRoomRandPointNum :: Int
, _psRandShift :: (Point2,Float) -> PlacementSpot
}
-- TODO attempt to unify/simplify this union type
data Placement
= Placement
{ _plSpot :: PlacementSpot
@@ -59,7 +60,10 @@ data Placement
, _plMID :: Maybe Int
, _plIDCont :: Placement -> Maybe Placement
}
| PlacementGenUpdate (GenParams -> Placement -> (GenParams, Placement)) Placement
| PlacementGenUpdate
{_plGenUpdate :: (GenParams -> Placement -> (GenParams, Placement))
,_plGenPL :: Placement
}
| PlacementUsingPos Point3 (Point3 -> Placement) -- allows a placement to use a shifted position
| RandomPlacement {_unRandomPlacement :: State StdGen Placement}
| PickOnePlacement Int Placement