Implement randomised markings on sensors
This commit is contained in:
@@ -11,7 +11,7 @@ import Dodge.Data
|
||||
import Dodge.Path
|
||||
import Dodge.Placement.PlaceSpot.Block
|
||||
import Dodge.Placement.PlaceSpot.TriggerDoor
|
||||
import Dodge.LevelGen.Data
|
||||
--import Dodge.LevelGen.Data
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.ShiftPoint
|
||||
--import Dodge.RandomHelp
|
||||
@@ -39,6 +39,8 @@ placeSpot (w,rm) plmnt = case plmnt of
|
||||
PlacementUsingPos p subpl -> placeSpot (w,rm) (subpl (shiftPoint3By shift p))
|
||||
RandomPlacement rplmnt -> placeRandomPlacement rplmnt w rm
|
||||
PickOnePlacement i pl -> ((placePickOne i pl rm w, rm), [])
|
||||
PlacementGenUpdate f pl -> let (gp,pl') = f (_gParams w) pl
|
||||
in placeSpot (w & gParams .~ gp,rm) pl'
|
||||
where
|
||||
shift = _rmShift rm
|
||||
|
||||
@@ -109,6 +111,8 @@ placeSpotID ps pt w = case pt of
|
||||
PutNothing -> (0,w)
|
||||
PutID i -> (i, w)
|
||||
PutWorldUpdate f -> (0,w & gWorld %~ f ps)
|
||||
PutUsingGenParams f -> let (w',pt') = f w
|
||||
in placeSpotID ps pt' w'
|
||||
where
|
||||
p@(V2 px py) = _psPos ps
|
||||
p' = V3 px py 0
|
||||
|
||||
Reference in New Issue
Block a user