Allow for selection of equipment position

This commit is contained in:
2022-05-24 14:03:18 +01:00
parent fa82923a12
commit 7f55ba117f
14 changed files with 221 additions and 37 deletions
+3 -3
View File
@@ -115,6 +115,7 @@ flatShield = defaultEquipment
, _aimZoom = ItZoom 20 0.2 1
, _aimStance = TwoHandFlat
}
, _heldScroll = \_ _ -> id
}
, _itInvSize = 3
, _itInvDisplay = \it -> head (basicItemDisplay it) :
@@ -236,9 +237,8 @@ headLamp = defaultEquipment
& itUse . eqSite .~ GoesOnHead
createHeadLamp :: Creature -> Int -> World -> World
createHeadLamp cr _ w = w
& tempLightSources .:~ tlsTimeRadColPos 1 200 0.5
((_crPos cr `v2z` 0) +.+.+ rotate3 (_crDir cr) (translatePointToHead cr (V3 5 0 3)))
createHeadLamp cr _ = tempLightSources .:~ tlsTimeRadColPos 1 200 0.7
((_crPos cr `v2z` 0) +.+.+ rotate3 (_crDir cr) (translatePointToHead cr (V3 5 0 3)))
powerLegs :: Item
powerLegs = defaultEquipment
+1
View File
@@ -25,6 +25,7 @@ ruseAmmoParamsRate rate ht usemods = RightUse
, _useMods = usemods
, _useHammer = ht
, _useAim = defaultAimParams
, _heldScroll = \_ _ -> id
}
defaultAimParams :: AimParams
defaultAimParams = AimParams
+1 -1
View File
@@ -128,7 +128,7 @@ sniperRifle = elephantGun
& itType .~ SNIPERRIFLE
& itParams . gunBarrels .~ SingleBarrel 0
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomMax = 0.5, _itZoomMin = 0.5}
& itScroll .~ zoomLongGun
& itUse . heldScroll .~ zoomLongGun
& itScope .~ ZoomScope (V2 0 0) 0 1 False
& itTargeting .~ targetLaser
machineGun :: Item
+2 -2
View File
@@ -80,7 +80,6 @@ autoGun = defaultAutoGun
-- , _itZoom = defaultItZoom
, _itEquipPict = pictureWeaponOnAim
, _itAttachment = ItCharMode $ Seq.fromList "MS"
, _itScroll = scrollCharMode
, _itParams = BulletShooter
{ _muzVel = 1
, _rifling = 0.9
@@ -91,6 +90,7 @@ autoGun = defaultAutoGun
, _randomOffset = 0
}
}
& itUse . heldScroll .~ scrollCharMode
autoGunPic :: Item -> SPic
autoGunPic it = noPic $
colorSH red (prismPoly
@@ -295,7 +295,7 @@ longGun = defaultGun
& useAim . aimRange .~ 1
& useAim . aimStance .~ TwoHandTwist
& useAim . aimZoom .~ defaultItZoom {_itZoomMax = 0.5, _itZoomMin = 0.5}
, _itScroll = zoomLongGun
& heldScroll .~ zoomLongGun
, _itAttachment = NoItAttachment
, _itScope = ZoomScope (V2 0 0) 0 1 False
-- , _itEffect = itemLaserScopeEffect