Add indexed world modifications, example use in flicker lights

This commit is contained in:
2021-11-17 11:24:40 +00:00
parent 559d7e3a23
commit 9db091597d
10 changed files with 110 additions and 32 deletions
+3 -2
View File
@@ -22,6 +22,7 @@ data PSType = PutCrit {_unPutCrit :: Creature}
| PutPressPlate PressPlate
| PutBlock [Int] Color [Point2]
| PutCoordinate Point2
| PutMod Modification
| PutTrigger (World -> Bool)
| PutLineBlock Wall Float Float Point2 Point2
| PutWall { _pwPoly :: [Point2] , _pwWall :: Wall }
@@ -104,8 +105,8 @@ spNoID ps pst = Placement ps pst Nothing (const Nothing)
pContID :: PlacementSpot -> PSType -> (Int -> Maybe Placement) -> Placement
pContID ps pt = Placement ps pt Nothing . intPlPlPl
plCont :: PlacementSpot -> PSType -> (Placement -> Maybe Placement) -> Placement
plCont ps pt = Placement ps pt Nothing
psPtCont :: PlacementSpot -> PSType -> (Placement -> Maybe Placement) -> Placement
psPtCont ps pt = Placement ps pt Nothing
sPS :: Point2 -> Float -> PSType -> Placement
sPS p a pt = Placement (PS p a) pt Nothing (const Nothing)