diff --git a/src/Dodge/Config/Data.hs b/src/Dodge/Config/Data.hs index 3bb2a6440..d78d025ea 100644 --- a/src/Dodge/Config/Data.hs +++ b/src/Dodge/Config/Data.hs @@ -25,6 +25,7 @@ data Configuration = Configuration , _debug_cr_awareness :: Bool , _debug_mouse_position :: Bool , _debug_view_boundaries :: Bool + , _debug_walls :: Bool , _debug_view_clip_bounds :: RoomClipping , _debug_pathing :: Bool } @@ -75,4 +76,5 @@ defaultConfig = Configuration , _debug_view_boundaries = False , _debug_view_clip_bounds = NoRoomClipBoundaries , _debug_pathing = False + , _debug_walls = False } diff --git a/src/Dodge/Creature.hs b/src/Dodge/Creature.hs index a4b4078fe..be8482d80 100644 --- a/src/Dodge/Creature.hs +++ b/src/Dodge/Creature.hs @@ -172,8 +172,11 @@ inventoryA = IM.fromList $ zip [0..] ] inventoryB :: IM.IntMap Item inventoryB = IM.fromList $ zip [0..] - [ autoRifle + [ wristArmour + , wristArmour + , autoRifle , smg + , machinePistol , makeTypeCraftNum 4 MICROCHIP , makeTypeCraftNum 2 TIN , makeTypeCraftNum 2 HARDWARE diff --git a/src/Dodge/Creature/HandPos.hs b/src/Dodge/Creature/HandPos.hs index fe5fd49f1..7497664dd 100644 --- a/src/Dodge/Creature/HandPos.hs +++ b/src/Dodge/Creature/HandPos.hs @@ -31,7 +31,7 @@ mirrorV3xz (V3 x y z) = V3 x (-y) z translatePointToRightHand' :: Creature -> Point3 -> Point3 translatePointToRightHand' cr - | oneH cr = (+.+.+ V3 11 (-3) 20) . rotate3 (-0.5)-- . scaleSH (V3 1 1.5 1) + | oneH cr = (+.+.+ V3 11 (-3) 20) . rotate3 0.4 -- . rotate3 (-0.5)-- . scaleSH (V3 1 1.5 1) | twists cr = (+.+.+ V3 0 5 20) . rotate3 (-1) . (+.+.+ V3 4 (-10) 0) | twoFlat cr = (+.+.+ V3 4 (-8) 10) | otherwise = case cr ^? crStance . carriage of @@ -61,7 +61,7 @@ translateToRightHand' cr translatePointToLeftHand :: Creature -> Point3 -> Point3 translatePointToLeftHand cr | oneH cr = (+.+.+ V3 0 0 10) . rotate3 0.4 . (+.+.+ V3 0 off 0) - | twists cr = (+.+.+ V3 0 5 20) . rotate3 (-1) . (+.+.+ V3 12 4 0) + | twists cr = (+.+.+ V3 0 5 20) . rotate3 (-1) . (+.+.+ V3 12 4 0) . rotate3 0.4 | twoFlat cr = (+.+.+ V3 4 8 10) | otherwise = case cr ^? crStance . carriage of Just (Walking sa RightForward) -> (+.+.+ V3 (-f sa) off 10) diff --git a/src/Dodge/Menu.hs b/src/Dodge/Menu.hs index 585b781b3..6e3b62279 100644 --- a/src/Dodge/Menu.hs +++ b/src/Dodge/Menu.hs @@ -77,19 +77,22 @@ debugMenu = slTitleOptions "OPTIONS:GAMEPLAY" debugMenuOptions debugMenuOptions :: [MenuOption] -debugMenuOptions = - [ doption ScancodeF debug_seconds_frame "SHOW SECONDS/FRAME" _debug_seconds_frame - , doption ScancodeC debug_noclip "NOCLIP" _debug_noclip - , doption ScancodeT debug_cr_status "SHOW CREATURE STATUS" _debug_cr_status - , doption ScancodeA debug_cr_awareness "SHOW CREATURE AWARENESS" _debug_cr_awareness - , doption ScancodeV debug_view_boundaries "SHOW VIEW BOUNDARIES" _debug_view_boundaries - , makeEnumOption ScancodeB debug_view_clip_bounds "SHOW ROOM CLIP" return - , doption ScancodeP debug_pathing "SHOW PATHING" _debug_pathing - , doption ScancodeS debug_show_sound "SHOW VISUAL SOUNDS" _debug_show_sound - , doption ScancodeM debug_mouse_position "SHOW MOUSE POSITION" _debug_mouse_position +debugMenuOptions = zipWith ($) + [ doption debug_seconds_frame "SHOW SECONDS/FRAME" _debug_seconds_frame + , doption debug_noclip "NOCLIP" _debug_noclip + , doption debug_cr_status "SHOW CREATURE STATUS" _debug_cr_status + , doption debug_cr_awareness "SHOW CREATURE AWARENESS" _debug_cr_awareness + , doption debug_view_boundaries "SHOW VIEW BOUNDARIES" _debug_view_boundaries + , \sc -> makeEnumOption sc debug_view_clip_bounds "SHOW ROOM CLIP" return + , doption debug_pathing "SHOW PATHING" _debug_pathing + , doption debug_show_sound "SHOW VISUAL SOUNDS" _debug_show_sound + , doption debug_mouse_position "SHOW MOUSE POSITION" _debug_mouse_position + --, doption debug_walls "SHOW WALL INFO" _debug_walls + , \sc -> makeBoolOption sc debug_walls "SHOW WALL INFO" ] + $ map Scancode [4 ..] where - doption scode l t rec + doption l t rec scode = Toggle scode (return . Just . (config . l %~ not)) (\w -> Right (t ,show (rec $ _config w))) gameplayMenu :: ScreenLayer gameplayMenu = slTitleOptions diff --git a/src/Dodge/Render/ShapePicture.hs b/src/Dodge/Render/ShapePicture.hs index 1152fac54..3d74c466b 100644 --- a/src/Dodge/Render/ShapePicture.hs +++ b/src/Dodge/Render/ShapePicture.hs @@ -114,8 +114,10 @@ drawMousePosition cfig w mwp = mouseWorldPos w drawWallIDs :: Configuration -> World -> Picture -drawWallIDs cfig w = setLayer FixedCoordLayer - $ foldMap f (_walls w) +drawWallIDs cfig w + | _debug_walls cfig = setLayer FixedCoordLayer + $ foldMap f (_walls w) + | otherwise = mempty where f wl | dist (_crPos $ you w) (fst (_wlLine wl)) > 200 = mempty -- this should be improved with a better "on screen test"