Fix aiming with scope

This commit is contained in:
2023-12-26 21:45:59 +00:00
parent 3b4bef944d
commit 26c55ee7f5
14 changed files with 85 additions and 114 deletions
-2
View File
@@ -112,7 +112,6 @@ ammoPosition itm hit = case hit of
SHATTERGUN -> NoAmmoPosition
HELDDETECTOR _ -> NoAmmoPosition
KEYCARD _ -> NoAmmoPosition
BINOCULARS -> NoAmmoPosition
where
lhs = Q.axisAngle (V3 1 0 0) pi
rhs = Q.axisAngle (V3 1 0 0) 0
@@ -186,7 +185,6 @@ heldItemSPic ht it = case ht of
SHATTERGUN -> shatterGunSPic
HELDDETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPolySU 3 $ rectWH 2 2)
KEYCARD _ -> noShape (setDepth 0 $ translate (-5) (-5) $ rotate (pi / 2.5) keyPic)
BINOCULARS -> mempty -- TODO
torchShape :: Shape
torchShape =
-1
View File
@@ -26,7 +26,6 @@ itemFromHeldType :: HeldItemType -> Item
itemFromHeldType ht = case ht of
KEYCARD i -> keyCard i
TORCH -> torch
BINOCULARS -> binoculars
SHATTERGUN -> shatterGun
BANGSTICK i -> bangStick i
PISTOL -> pistol
-5
View File
@@ -69,11 +69,6 @@ sniperRifle =
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
-- & itUse . heldScroll .~ HeldScrollZoom -- zoomLongGun
-- & itScope .~ ZoomScope
-- { _scopePos = (V2 0 0)
-- , _scopeZoom = 1
-- , _scopeDefaultZoom = 0.5
-- }
-- & itType . iyModules . at ModTarget ?~ TARGET TargetLaser
-- & itUse . useTargeting ?~ TargetLaser
-16
View File
@@ -23,22 +23,6 @@ keyCard n = defaultHeldItem & itType . iyBase .~ HELD (KEYCARD n)
latchkey :: Int -> Item
latchkey _ = defaultHeldItem
binoculars :: Item
binoculars =
defaultHeldItem
-- & itScope .~ ZoomScope
-- { _scopePos = (V2 0 0)
-- , _scopeZoom = 1
-- , _scopeDefaultZoom = 0.5
-- }
& itType . iyBase .~ HELD BINOCULARS
-- & itUse . heldAim . aimHandlePos .~ 5
-- & itUse . heldAim . aimMuzPos .~ 10
& itUse . heldAim . aimStance .~ TwoHandFlat
-- & itUse . heldScroll .~ HeldScrollZoom -- zoomLongGun
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5, _izFac = 1}
torch :: Item
torch =
defaultHeldItem
-1
View File
@@ -105,7 +105,6 @@ heldInfo hit = case hit of
FORCEFIELDGUN -> "A device that produces a durable forcefield."
HELDDETECTOR d -> "A device that detects " ++ detectorInfo d ++ " in an expanding radius."
TORCH -> "A stick with a light on the end."
BINOCULARS -> "Two cylinders with lenses. Scroll to zoom."
FLATSHIELD -> "A panel of metal that blocks unwanted objects from the front of the user."
KEYCARD i -> "A keycard. It is labelled " ++ show i ++ "."
-1
View File
@@ -70,7 +70,6 @@ heldBounds hit = case hit of
FORCEFIELDGUN -> launchs
HELDDETECTOR _ -> launchs
TORCH -> launchs
BINOCULARS -> launchs
FLATSHIELD -> launchs
KEYCARD _ -> launchs
where