Work on held item usage

This commit is contained in:
2023-05-27 12:32:09 +01:00
parent 4cfb7d431a
commit ec8317c14e
19 changed files with 150 additions and 173 deletions
+4 -4
View File
@@ -121,7 +121,7 @@ bangStickAmmoPos :: Int -> Item -> AmmoPosition
bangStickAmmoPos _ itm =
Bullets
[(rotate3z a (V3 5 0 3), Q.axisAngle (V3 0 0 1) a)
| a <- map _barlRot (itm ^?! itParams . gunBarrels)]
| a <- map _mzRot (itm ^?! itUse . heldAim . aimMuzzles)]
volleygunAmmoPos :: Int -> AmmoPosition
volleygunAmmoPos i =
@@ -208,9 +208,9 @@ modulesSPic it _ imt = case imt of
_ -> mempty
baseStickShapeX :: Item -> Int -> Shape
baseStickShapeX it _ = foldMap f (it ^?! itParams . gunBarrels)
baseStickShapeX it _ = foldMap f (it ^?! itUse . heldAim . aimMuzzles)
where
f brl = rotateSH (_barlRot brl) baseStickShape
f brl = rotateSH (_mzRot brl) baseStickShape
baseStickShape :: Shape
baseStickShape = colorSH green $ xCylinderST 3 10
@@ -219,7 +219,7 @@ bangConeShape :: Float -> Shape
bangConeShape x =
colorSH cyan $
xCylinderST 3 x
<> upperPrismPolyST 6 (reverse $ rectNSWE 4 (-4) x (10 + x))
<> upperPrismPolyST 6 ( rectNSWE 4 (-4) x (10 + x))
defSPic :: SPic
defSPic = noPic $ colorSH green $ upperPrismPolyST 3 $ square 4