Rethink damage data type, work on damage sensors
This commit is contained in:
@@ -33,8 +33,8 @@ import System.Random
|
||||
cenLasTur :: Room
|
||||
cenLasTur = roomNgon 8 200 & rmPmnts .~
|
||||
[ putLasTurret 0.02
|
||||
, heightWallPS (roomPosRoomBoolShift (\rp _ -> isInLnk rp) (shiftInBy 100)) 30 covershape
|
||||
, mntLightLnkCond unusedLnkToPS
|
||||
, heightWallPS (resetPLUse $ rprBoolShift (const . isInLnk) (shiftInBy 100)) 30 covershape
|
||||
, mntLightLnkCond $ rpBool isInLnk
|
||||
]
|
||||
where
|
||||
covershape = rectNSEW 10 (-10) 20 (-20)
|
||||
@@ -53,7 +53,7 @@ lasSensLightAboveDoor wth ps = extTrigLitPos
|
||||
(atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||
( \tp -> Just $ lightSensor wth (upf $ fromJust $ _plMID tp) ps )
|
||||
where
|
||||
upf trid mc w | _mcSensor mc > 900 = w & triggers . ix trid .~ const True
|
||||
upf trid mc w | _mcSensorAmount mc > 900 = w & triggers . ix trid .~ const True
|
||||
| otherwise = w
|
||||
|
||||
lightSensByDoor :: Int -> Room -> Room
|
||||
@@ -72,13 +72,13 @@ lightSensByDoor outplid rm = rm
|
||||
lasSensorTurretTest :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
lasSensorTurretTest n = do
|
||||
cenroom <- shuffleLinks $ lightSensInsideDoor n cenLasTur
|
||||
let doorroom = switchDoorRoom n
|
||||
let doorroom = triggerDoorRoom n
|
||||
return $ treeFromPost [PassDown door,PassDown cenroom,PassDown doorroom] (UseAll door)
|
||||
|
||||
lasCenSensEdge :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
lasCenSensEdge n = do
|
||||
cenroom <- shuffleLinks $ lightSensByDoor n cenLasTur
|
||||
let doorroom = switchDoorRoom n
|
||||
let doorroom = triggerDoorRoom n
|
||||
return $ treeFromTrunk [PassDown door] $ Node (PassDown cenroom)
|
||||
[ treeFromPost [PassDown doorroom] (UseAll door)
|
||||
, treeFromPost [PassDown door] (UseLabel 0 corridor)
|
||||
|
||||
Reference in New Issue
Block a user