Allow firing of different muzzles on different frames after use

This commit is contained in:
2024-12-21 11:37:52 +00:00
parent e9006addd0
commit 8f65fa6bc5
16 changed files with 444 additions and 465 deletions
+8 -3
View File
@@ -41,11 +41,16 @@ volleyGun i =
<*> pure PistolFlare
<*> pure MuzzleShootBullet
<*> pure (UseExactly 1)
<*> ZipList [0..i-1]
)
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
& itUse . heldParams . recoil .~ 20 + 10 * fromIntegral i
& itUse . heldParams . weaponInvLock .~ i + 1
-- & itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
-- & itUse . heldParams . recoil .~ 20 + 10 * fromIntegral i
& itUse . heldParams . torqueAfter .~ 0
& itUse . heldParams . recoil .~ 0
& itType .~ HELD (VOLLEYGUN i)
& itAmmoSlots .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
& itUse . heldParams . weaponRepeat .~ [1..i-1]
rifle :: Item
rifle =
@@ -90,7 +95,7 @@ miniGunX i =
& itUse . heldAim . aimTurnSpeed .~ 0.5
& itUse . heldAim . aimMuzzles
.~ replicate i
(Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet (UseExactly 1))
(Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet (UseExactly 1) 0)
& itUse . heldParams . recoil .~ 10 * fromIntegral i
& itUse . heldParams . torqueAfter .~ 0.04 + 0.02 * fromIntegral i
& itUse . heldParams . sidePush .~ 10 * fromIntegral i
+1 -1
View File
@@ -14,7 +14,7 @@ bangCone =
& itUse . heldDelay . rateMax .~ 20
& itUse . heldAim . aimMuzzles
.~ replicate 15
(Muzzle (V2 15 0) 0 0.5 0 DefaultFlareType MuzzleShootBullet (UseExactly 1))
(Muzzle (V2 15 0) 0 0.5 0 DefaultFlareType MuzzleShootBullet (UseExactly 1) 0)
& itUse . heldParams . muzVel .~ UniRandFloat 0.5 0.8
& itUse . heldParams . rifling .~ UniRandFloat 0.3 0.8
& itUse . heldParams . recoil .~ 150
+1
View File
@@ -36,6 +36,7 @@ launcherX i =
<*> pure DefaultFlareType
<*> pure MuzzleLauncher
<*> pure (UseExactly 1)
<*> pure 0
)
& itAmmoSlots .~ IM.fromList [(j,LauncherAmmo) | j <- [0..i-1]]
where
+1
View File
@@ -85,6 +85,7 @@ flameThrower =
, _nzCurrentWalkAngle = 0
}
(UseExactly 1)
0
]
& itAmmoSlots .~ singleAmmo GasAmmo
& itType .~ HELD FLAMETHROWER
+1 -1
View File
@@ -22,7 +22,7 @@ bangStick i =
& itType .~ HELD (BANGSTICK i)
& itUse . heldDelay . rateMax .~ 8
& itUse . heldAim . aimMuzzles
.~ [Muzzle (V2 10 0) a 0.01 0 DefaultFlareType MuzzleShootBullet (UseExactly 1)
.~ [Muzzle (V2 10 0) a 0.01 0 DefaultFlareType MuzzleShootBullet (UseExactly 1) 0
| a <- spreadAroundCenter i baseStickSpread]
baseStickSpread :: Float
-2
View File
@@ -2,8 +2,6 @@ module Dodge.Item.InventoryColor (
itemInvColor,
) where
--import Dodge.Data.Item.Use.Consumption.Ammo
import Color
import Control.Lens
import Dodge.Data.ComposedItem