From 654479da36c61cb16aa38f910e74b35d5f592f67 Mon Sep 17 00:00:00 2001 From: jgk Date: Sun, 4 Apr 2021 16:39:58 +0200 Subject: [PATCH] Cleanup enough to make haddock work --- src/Dodge/AIs.hs | 26 +++++++++++++------------- src/Dodge/Creature.hs | 2 +- src/Dodge/Item/Weapon.hs | 4 ++-- src/Dodge/Layout.hs | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Dodge/AIs.hs b/src/Dodge/AIs.hs index 05813ba79..0824f1058 100644 --- a/src/Dodge/AIs.hs +++ b/src/Dodge/AIs.hs @@ -415,8 +415,8 @@ chaseAI w (f,g') cr = ---- $ mvForward 2.5 cid $ randomTurn $ turnTowardSpeed 0.05 p cid w ---- | dist p cpos < 10 -> replaceAction [] w ---- | x == 0 -> replaceAction [] w ----- -- | not (canSeePoint cid p w) -> replaceAction [PathTo p] w ----- -- | not (canSeePoint cid p w) -> replaceAction [] w +---- -- | not (canSeePoint cid p w) -> replaceAction [PathTo p] w +---- -- | not (canSeePoint cid p w) -> replaceAction [] w ---- | angleVV (unitVectorAtAngle (_crDir cr)) (p -.- cpos) > pi/4 ---- -> replaceAction [MoveToFor p (max 0 (x-1))] $ turnTowardSpeed 0.05 p cid w ---- | otherwise -> replaceAction [MoveToFor p (max 0 (x-1))] @@ -526,7 +526,7 @@ miniAI w (f,g) cr = -> ( (f , g) , Just $ turnCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) | otherwise @@ -646,7 +646,7 @@ strafeOrChargeAI inRange outRange w (f,g) cr = -> ( (f , g) , Just $ strafeCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) | otherwise @@ -825,8 +825,8 @@ launcherAI inRange outRange w (f,g) cr = | otherwise = 0 curveLeftProb = 20 curveRightProb = 20 - -- | dist cpos ypos < 200 = 1 - -- | otherwise = 0 + -- | dist cpos ypos < 200 = 1 + -- | otherwise = 0 fireActions = -- TurnToward ypos : (evalState (takeOneWeighted [curveLeftProb,curveRightProb @@ -921,7 +921,7 @@ launcherAI inRange outRange w (f,g) cr = -> ( (f , g') , Just $ cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g') , Just cr) (Guard p p':_) | dist ypos cpos < 900 && canSeeFireVisionAny cid (_yourID w) w -> ( ( f , g') @@ -1161,7 +1161,7 @@ circleClockwiseAI inRange outRange w (f,g) cr = -> ( (f , g) , Just $ strafeCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) | otherwise @@ -1269,7 +1269,7 @@ twitchMissAI inRange outRange w (f,g) cr = -> ( (f , g') , Just $ strafeCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Guard p p':_) | dist ypos cpos < 900 && canSeeFireVisionAny cid (_yourID w) w -> ( ( f , g') @@ -1377,7 +1377,7 @@ closeToRangeAI inRange outRange w (f,g) cr = -> ( (f , g) , Just $ strafeCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) | otherwise @@ -1483,7 +1483,7 @@ suppressShooterAI w (f,g) cr = -> ( (f , g) , Just $ turnCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) | otherwise @@ -1587,7 +1587,7 @@ basicShooterAI w (f,g) cr = -> ( (f , g) , Just $ turnCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- -$ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) | otherwise @@ -1689,7 +1689,7 @@ sniperAI w (f,g) cr = -> ( (f , g) , Just $ turnCloseSlow ypos cr ) -- no longer chase if see you when reloading - -- $ replaceAction [] w + -- $ replaceAction [] w | otherwise -> ( (f , g) , Just cr) (Search i:gls) | i == 0 -> ( (f , g) , replaceAction [] cr) | otherwise diff --git a/src/Dodge/Creature.hs b/src/Dodge/Creature.hs index f86a9d483..bcdef972b 100644 --- a/src/Dodge/Creature.hs +++ b/src/Dodge/Creature.hs @@ -298,7 +298,7 @@ basicCrPict col cr = pictures [ onLayer CrLayer naked , drawEquipment cr] where naked | pdam > 200 = color red $ circleSolid $ _crRad cr | pdam > 100 = 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] | otherwise = pictures [color col $ circleSolid $ _crRad cr, circLine $ _crRad cr] pdam = _crPastDamage $ _crState cr diff --git a/src/Dodge/Item/Weapon.hs b/src/Dodge/Item/Weapon.hs index f75dde56f..2fbdaa5d9 100644 --- a/src/Dodge/Item/Weapon.hs +++ b/src/Dodge/Item/Weapon.hs @@ -929,7 +929,7 @@ reflect a b = a + 2*(a-b) moveGrenade :: Int -> Float -> Int -> World -> World moveGrenade 0 dir pID w = over projectiles (IM.delete pID) $ explosion (_pjPos (_projectiles w IM.! pID)) - -- $ set (pointToItem (_itemPositions w IM.! wpID) . itEquipPict) + -- set (pointToItem (_itemPositions w IM.! wpID) . itEquipPict) -- (drawWeapon $ grenadePic 50) w where @@ -1493,7 +1493,7 @@ explodeRemoteBomb itid pjid n w $ resetPict -- $ resetScope $ makeExplosionAt (_pjPos (_projectiles w IM.! pjid)) w - -- $ makeShrapnelBombAt (_pjPos (_projectiles w IM.! pjid)) w + -- - $ makeShrapnelBombAt (_pjPos (_projectiles w IM.! pjid)) w where resetName = set (creatures . ix n . crInv . ix j . itName) "REMOTEBOMB" resetPict = set (creatures . ix n . crInv . ix j . itEquipPict ) diff --git a/src/Dodge/Layout.hs b/src/Dodge/Layout.hs index 202859817..7e2360a98 100644 --- a/src/Dodge/Layout.hs +++ b/src/Dodge/Layout.hs @@ -67,7 +67,7 @@ wallsFromTree t = -- createInnerWalls divideWalls . assignKeys - . foldr cutWalls [] -- $ map (map (g . roundPoint2)) + . foldr cutWalls [] -- map (map (g . roundPoint2)) -- . map (map roundPoint2) $ (concatMap _rmPolys $ flatten t) where