Simplify item placement during generation

This commit is contained in:
jgk
2021-04-25 13:21:24 +02:00
parent 30736997c3
commit 17986651c5
13 changed files with 95 additions and 95 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ autoDoorPane (trigx,trigy) n closedPos openPos = Door
where
a = closedPos !! 0
b = closedPos !! 1
dm w | any (crNearSeg 40 trigx trigy) $ IM.filter (_crIsAnimate) $ _creatures w
dm w | any (crNearSeg 40 trigx trigy) $ IM.filter (_crIsAnimate . _crState) $ _creatures w
-- crsNearLine 40 trigL w
= flip (foldr changeZonedWall) zoneps
$ over walls (IM.adjust openDoor n) w
+3 -3
View File
@@ -12,7 +12,7 @@ import System.Random
data PSType = PutCrit Creature
| PutLS LightSource Picture
| PutButton Button
| PutFlIt FloorItem
| PutFlIt Item
| PutPressPlate PressPlate
| PutAutoDoor Point2 Point2
| PutBlock [Int] Color [Point2]
@@ -22,14 +22,14 @@ data PSType = PutCrit Creature
| PutSwitchDoor Color Point2 Float Point2 Point2
| RandPS (State StdGen PSType)
| PutNothing
| PutID Int
| CollectivePS
{ _collectiveID :: Int
, _collectiveNum :: Int
, _collectiveFunction :: [Int] -> State StdGen [PSType]
}
| LabelPS { _psLabel :: Int, _ps :: PSType}
| PutWindow { _pwPoly :: [Point2] , _pwColor :: Color
}
| PutWindow { _pwPoly :: [Point2] , _pwColor :: Color }
data PlacementSpot = PS
{ _psPos :: Point2
, _psRot :: Float