Continue reorganising records into functions

This commit is contained in:
2025-06-03 22:20:42 +01:00
parent a5554f24e4
commit 33ebdcb0de
17 changed files with 171 additions and 153 deletions
+1
View File
@@ -7,6 +7,7 @@ module Dodge.Item.Grammar (
allInvLocs,
) where
import Dodge.Data.AimStance
import Dodge.Item.AimStance
import Control.Applicative
import qualified Data.IntMap.Strict as IM
-2
View File
@@ -59,7 +59,6 @@ laser =
, _itTgActive = False
}
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itType .~ HELD LASER
-- previous attractionPower values: 1, -1, -10, 0
@@ -72,7 +71,6 @@ tractorGun =
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ NoFlare
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor
& itType .~ HELD TRACTORGUN
+3 -6
View File
@@ -31,8 +31,7 @@ volleyGun :: Int -> Item
volleyGun i =
defaultBangCane
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
& itUse . heldAim . aimMuzzles .~ getZipList
(ZipList [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 6]
<*> ZipList [0..i-1]
@@ -54,8 +53,7 @@ rifle =
defaultBangCane
& itType .~ HELD RIFLE
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 25 0
alteRifle :: Item
@@ -94,8 +92,7 @@ miniGunX i =
autoRifle
& itUse . heldDelay .~ WarmUpNoDelay{_warmTime = 0, _warmMax = 100, _warmSound = crankSlowS}
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
& itAmmoSlots .~ singleAmmo BeltBulletAmmo
-- & itUse . heldParams . bulGunSound ?~ (mini1S,2)
& itUse . heldAim . aimTurnSpeed .~ 0.5
-1
View File
@@ -16,7 +16,6 @@ rLauncher =
defaultHeldItem
& itUse . heldDelay . rateMax .~ 20
& itUse . heldAim . aimWeight .~ 8
& itUse . heldAim . aimRange .~ 0.5
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleRLauncher
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
+2 -3
View File
@@ -25,8 +25,7 @@ bangRod =
& itUse . heldDelay . rateMax .~ 12
& itType .~ HELD BANGROD
& itUse . heldAim . aimWeight .~ 8
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
-- & itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ HeavySmokeFlare
@@ -54,7 +53,7 @@ sniperRifle =
elephantGun
& itType .~ HELD SNIPERRIFLE
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
--machineGun :: Item
--machineGun =
+2 -2
View File
@@ -40,7 +40,7 @@ flameTorrent :: Item
flameTorrent =
flameThrower
& itType .~ HELD FLAMETORRENT
& itUse . heldAim . aimZoom .~ defaultItZoom
-- & itUse . heldAim . aimZoom .~ defaultItZoom
-- & itParams . sprayNozzles . ix 0
-- %~ ( (nzPressure .~ 10)
-- . (nzMaxWalkAngle .~ 1.5)
@@ -74,7 +74,7 @@ flameThrower =
& itParams .~ NoParams
& itUse . heldDelay .~ NoDelay
& itUse . heldAim . aimWeight .~ 5
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5}
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0 0 NoFlare
MuzzleNozzle
{ _nzPressure = ConstFloat 4
+2 -4
View File
@@ -41,8 +41,7 @@ detector dt =
defaultHeldItem
& itUseCondition .~ UseableAnytime
& itUse . heldDelay . rateMax .~ 20
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
& itAmmoSlots .~ singleAmmo ElectricalAmmo
& itUse . heldParams .~ DefaultHeldParams
& itType .~ DETECTOR dt
@@ -54,8 +53,7 @@ blinker =
defaultHeldItem
& itUseCondition .~ UseableAnytime
& itUse . heldDelay . rateMax .~ 20
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
& itAmmoSlots .~ singleAmmo ElectricalAmmo
& itUse . heldParams .~ DefaultHeldParams
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleBlink
+1
View File
@@ -7,6 +7,7 @@ module Dodge.Item.HeldOffset (
heldItemOrient2D,
) where
import Dodge.Data.AimStance
import Dodge.Item.AimStance
import qualified Quaternion as Q
import Dodge.Data.Creature
+1
View File
@@ -4,6 +4,7 @@ module Dodge.Item.Info (
itemInfo,
) where
import Dodge.Data.AimStance
import Data.Char
--import qualified Data.Map.Strict as M
import Dodge.Data.Item