Add support for group placements

This commit is contained in:
jgk
2021-05-14 19:46:52 +02:00
parent 0b26761be5
commit 2b09bf2072
18 changed files with 307 additions and 266 deletions
+4 -2
View File
@@ -9,7 +9,7 @@ import Control.Lens
import Control.Monad.State
import System.Random
data PSType = PutCrit Creature
data PSType = PutCrit {_unPutCrit :: Creature}
| PutLS LightSource Picture
| PutButton Button
| PutFlIt Item
@@ -34,10 +34,12 @@ data Placement
= SinglePlacement {_placementSpot :: PlacementSpot }
| GroupedPlacement
{_groupPlacementID :: Int
,_groupPlacementFunc :: [PlacementSpot] -> PlacementSpot -> PlacementSpot
,_groupPlacementFunc :: [PSType] -> PSType -> World -> World
,_placementSpot :: PlacementSpot
}
sPS p a = SinglePlacement . PS p a
makeLenses ''PSType
makeLenses ''PlacementSpot
makeLenses ''Placement