Cleanup enough to make haddock work

This commit is contained in:
2021-04-04 16:39:58 +02:00
parent 3b417c4966
commit 654479da36
4 changed files with 17 additions and 17 deletions
+13 -13
View File
@@ -415,8 +415,8 @@ chaseAI w (f,g') cr =
---- $ mvForward 2.5 cid $ randomTurn $ turnTowardSpeed 0.05 p cid w ---- $ mvForward 2.5 cid $ randomTurn $ turnTowardSpeed 0.05 p cid w
---- | dist p cpos < 10 -> replaceAction [] w ---- | dist p cpos < 10 -> replaceAction [] w
---- | x == 0 -> replaceAction [] w ---- | x == 0 -> replaceAction [] w
---- -- | not (canSeePoint cid p w) -> replaceAction [PathTo p] w ---- -- | not (canSeePoint cid p w) -> replaceAction [PathTo p] w
---- -- | not (canSeePoint cid p w) -> replaceAction [] w ---- -- | not (canSeePoint cid p w) -> replaceAction [] w
---- | angleVV (unitVectorAtAngle (_crDir cr)) (p -.- cpos) > pi/4 ---- | angleVV (unitVectorAtAngle (_crDir cr)) (p -.- cpos) > pi/4
---- -> replaceAction [MoveToFor p (max 0 (x-1))] $ turnTowardSpeed 0.05 p cid w ---- -> replaceAction [MoveToFor p (max 0 (x-1))] $ turnTowardSpeed 0.05 p cid w
---- | otherwise -> replaceAction [MoveToFor p (max 0 (x-1))] ---- | otherwise -> replaceAction [MoveToFor p (max 0 (x-1))]
@@ -526,7 +526,7 @@ miniAI w (f,g) cr =
-> ( (f , g) -> ( (f , g)
, Just $ turnCloseSlow ypos cr , Just $ turnCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr)
| otherwise | otherwise
@@ -646,7 +646,7 @@ strafeOrChargeAI inRange outRange w (f,g) cr =
-> ( (f , g) -> ( (f , g)
, Just $ strafeCloseSlow ypos cr , Just $ strafeCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr)
| otherwise | otherwise
@@ -825,8 +825,8 @@ launcherAI inRange outRange w (f,g) cr =
| otherwise = 0 | otherwise = 0
curveLeftProb = 20 curveLeftProb = 20
curveRightProb = 20 curveRightProb = 20
-- | dist cpos ypos < 200 = 1 -- | dist cpos ypos < 200 = 1
-- | otherwise = 0 -- | otherwise = 0
fireActions = -- TurnToward ypos : fireActions = -- TurnToward ypos :
(evalState (takeOneWeighted (evalState (takeOneWeighted
[curveLeftProb,curveRightProb [curveLeftProb,curveRightProb
@@ -921,7 +921,7 @@ launcherAI inRange outRange w (f,g) cr =
-> ( (f , g') -> ( (f , g')
, Just $ cr , Just $ cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g') , Just cr) | otherwise -> ( (f , g') , Just cr)
(Guard p p':_) | dist ypos cpos < 900 && canSeeFireVisionAny cid (_yourID w) w (Guard p p':_) | dist ypos cpos < 900 && canSeeFireVisionAny cid (_yourID w) w
-> ( ( f , g') -> ( ( f , g')
@@ -1161,7 +1161,7 @@ circleClockwiseAI inRange outRange w (f,g) cr =
-> ( (f , g) -> ( (f , g)
, Just $ strafeCloseSlow ypos cr , Just $ strafeCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr)
| otherwise | otherwise
@@ -1269,7 +1269,7 @@ twitchMissAI inRange outRange w (f,g) cr =
-> ( (f , g') -> ( (f , g')
, Just $ strafeCloseSlow ypos cr , Just $ strafeCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Guard p p':_) | dist ypos cpos < 900 && canSeeFireVisionAny cid (_yourID w) w (Guard p p':_) | dist ypos cpos < 900 && canSeeFireVisionAny cid (_yourID w) w
-> ( ( f , g') -> ( ( f , g')
@@ -1377,7 +1377,7 @@ closeToRangeAI inRange outRange w (f,g) cr =
-> ( (f , g) -> ( (f , g)
, Just $ strafeCloseSlow ypos cr , Just $ strafeCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr)
| otherwise | otherwise
@@ -1483,7 +1483,7 @@ suppressShooterAI w (f,g) cr =
-> ( (f , g) -> ( (f , g)
, Just $ turnCloseSlow ypos cr , Just $ turnCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr)
| otherwise | otherwise
@@ -1587,7 +1587,7 @@ basicShooterAI w (f,g) cr =
-> ( (f , g) -> ( (f , g)
, Just $ turnCloseSlow ypos cr , Just $ turnCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- -$ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr)
| otherwise | otherwise
@@ -1689,7 +1689,7 @@ sniperAI w (f,g) cr =
-> ( (f , g) -> ( (f , g)
, Just $ turnCloseSlow ypos cr , Just $ turnCloseSlow ypos cr
) -- no longer chase if see you when reloading ) -- no longer chase if see you when reloading
-- $ replaceAction [] w -- $ replaceAction [] w
| otherwise -> ( (f , g) , Just cr) | otherwise -> ( (f , g) , Just cr)
(Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr)
| otherwise | otherwise
+1 -1
View File
@@ -298,7 +298,7 @@ basicCrPict col cr = pictures [ onLayer CrLayer naked , drawEquipment cr]
where naked | pdam > 200 = color red $ circleSolid $ _crRad cr where naked | pdam > 200 = color red $ circleSolid $ _crRad cr
| pdam > 100 = color white $ circleSolid $ _crRad cr | pdam > 100 = color white $ circleSolid $ _crRad cr
| mod pdam 2 == 1 = color white $ circleSolid $ _crRad cr | mod pdam 2 == 1 = color white $ circleSolid $ _crRad cr
-- | crDam > _crHP cr && odd (crDam - _crHP cr) -- | crDam > _crHP cr && odd (crDam - _crHP cr)
-- = [color white $ circleSolid $ _crRad cr] -- = [color white $ circleSolid $ _crRad cr]
| otherwise = pictures [color col $ circleSolid $ _crRad cr, circLine $ _crRad cr] | otherwise = pictures [color col $ circleSolid $ _crRad cr, circLine $ _crRad cr]
pdam = _crPastDamage $ _crState cr pdam = _crPastDamage $ _crState cr
+2 -2
View File
@@ -929,7 +929,7 @@ reflect a b = a + 2*(a-b)
moveGrenade :: Int -> Float -> Int -> World -> World moveGrenade :: Int -> Float -> Int -> World -> World
moveGrenade 0 dir pID w = over projectiles (IM.delete pID) moveGrenade 0 dir pID w = over projectiles (IM.delete pID)
$ explosion (_pjPos (_projectiles w IM.! pID)) $ explosion (_pjPos (_projectiles w IM.! pID))
-- $ set (pointToItem (_itemPositions w IM.! wpID) . itEquipPict) -- set (pointToItem (_itemPositions w IM.! wpID) . itEquipPict)
-- (drawWeapon $ grenadePic 50) -- (drawWeapon $ grenadePic 50)
w w
where where
@@ -1493,7 +1493,7 @@ explodeRemoteBomb itid pjid n w
$ resetPict $ resetPict
-- $ resetScope -- $ resetScope
$ makeExplosionAt (_pjPos (_projectiles w IM.! pjid)) w $ makeExplosionAt (_pjPos (_projectiles w IM.! pjid)) w
-- $ makeShrapnelBombAt (_pjPos (_projectiles w IM.! pjid)) w -- - $ makeShrapnelBombAt (_pjPos (_projectiles w IM.! pjid)) w
where where
resetName = set (creatures . ix n . crInv . ix j . itName) "REMOTEBOMB" resetName = set (creatures . ix n . crInv . ix j . itName) "REMOTEBOMB"
resetPict = set (creatures . ix n . crInv . ix j . itEquipPict ) resetPict = set (creatures . ix n . crInv . ix j . itEquipPict )
+1 -1
View File
@@ -67,7 +67,7 @@ wallsFromTree t =
-- createInnerWalls -- createInnerWalls
divideWalls divideWalls
. assignKeys . assignKeys
. foldr cutWalls [] -- $ map (map (g . roundPoint2)) . foldr cutWalls [] -- map (map (g . roundPoint2))
-- . map (map roundPoint2) -- . map (map roundPoint2)
$ (concatMap _rmPolys $ flatten t) $ (concatMap _rmPolys $ flatten t)
where where