Cleanup
This commit is contained in:
+21
-18
@@ -205,15 +205,14 @@ heldItemMuzzles itm = \case
|
||||
AUTORIFLE -> dbwMuzzles & ix 0 . mzPos .~ V2 25 0
|
||||
BURSTRIFLE -> dbwMuzzles & ix 0 . mzPos .~ V2 25 0 & ix 0 . mzInaccuracy .~ 0.05
|
||||
MINIGUNX i ->
|
||||
[ ( Muzzle
|
||||
(V2 (30 + 40 * fromIntegral j / fromIntegral i) 0)
|
||||
0
|
||||
0.05
|
||||
maguse1
|
||||
NoFlare
|
||||
MuzzleShootBullet
|
||||
10
|
||||
)
|
||||
[ Muzzle
|
||||
(V2 (30 + 40 * fromIntegral j / fromIntegral i) 0)
|
||||
0
|
||||
0.05
|
||||
maguse1
|
||||
NoFlare
|
||||
MuzzleShootBullet
|
||||
10
|
||||
| j <- [0 .. i -1]
|
||||
]
|
||||
& ix 0 . mzFlareType .~ MiniGunFlare
|
||||
@@ -742,8 +741,10 @@ useLoadedAmmo loc cr mz m w =
|
||||
(getPJStabiliser itmtree)
|
||||
cr
|
||||
w
|
||||
MuzzleNozzle{} -> useGasParams pq' mitid mz loc cr $ walkNozzle mz itm
|
||||
$ w & randGen .~ g
|
||||
MuzzleNozzle{} ->
|
||||
useGasParams pq' mitid mz loc cr $
|
||||
walkNozzle mz itm $
|
||||
w & randGen .~ g
|
||||
MuzzleShatter -> shootShatter itm cr w
|
||||
MuzzleDetector ->
|
||||
itemDetectorEffect
|
||||
@@ -870,11 +871,11 @@ shootLaser so lt pv p dir col =
|
||||
. soundContinue so p tone440sawtoothquietS (Just 2)
|
||||
|
||||
creatureShootPulseLaser :: Point3Q -> Creature -> World -> World
|
||||
creatureShootPulseLaser (p,q) cr =
|
||||
shootPulseLaser
|
||||
(CrWeaponSound (_crID cr) 0)
|
||||
(p ^. _xy)
|
||||
(Q.qToAng q)
|
||||
creatureShootPulseLaser (p, q) cr =
|
||||
shootPulseLaser
|
||||
(CrWeaponSound (_crID cr) 0)
|
||||
(p ^. _xy)
|
||||
(Q.qToAng q)
|
||||
|
||||
shootPulseLaser :: SoundOrigin -> Point2 -> Float -> World -> World
|
||||
shootPulseLaser so p dir w =
|
||||
@@ -1104,8 +1105,10 @@ useGasParams pq (NInt magitid) mz loc cr w =
|
||||
(pressure, g) = doGenFloat (_nzPressure $ _mzEffect mz) (_randGen w)
|
||||
gastype = fromMaybe (error "cannot find gas ammo") $ do
|
||||
hit <- itm ^? itType . ibtHeld
|
||||
fueltype <- w ^? cWorld . lWorld . items . ix magitid
|
||||
>>= magAmmoParams >>= (^? ampCreateGas)
|
||||
fueltype <-
|
||||
w ^? cWorld . lWorld . items . ix magitid
|
||||
>>= magAmmoParams
|
||||
>>= (^? ampCreateGas)
|
||||
gasType hit fueltype
|
||||
dir = Q.qToAng (pq ^. _2) + _nzAngle (_itParams itm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user