Work on wrist shields, cleanup

This commit is contained in:
2022-05-25 22:34:22 +01:00
parent 525f45efeb
commit ba80bfd0ad
5 changed files with 26 additions and 16 deletions
+2
View File
@@ -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
}
+4 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+14 -11
View File
@@ -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
+4 -2
View File
@@ -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"