This commit is contained in:
2024-10-25 21:05:32 +01:00
parent 6424899afd
commit f6c136cfd6
25 changed files with 334 additions and 333 deletions
+2 -1
View File
@@ -103,7 +103,8 @@ laserLinkTest :: Item -> LinkTest
laserLinkTest itm = LTest (llleft itm) (llright itm)
llleft :: Item -> PartiallyComposedItem -> Maybe LinkUpdate
llleft itm pci = _tryLeftLink (uncurry useBreakL $ itemToBreakLists (CItem itm WeaponTargetingSF)) pci
llleft itm = _tryLeftLink
. uncurry useBreakL . itemToBreakLists $ CItem itm WeaponTargetingSF
llright :: Item -> PartiallyComposedItem -> Maybe LinkUpdate
llright itm pci = case pci ^. _1 . itType of
+2 -2
View File
@@ -30,7 +30,7 @@ heldItemRelativeOrient itm cr (p,q)
| isTwoHandFlat =
( V3 (_crRad cr) 0 handD
+ rotate3 (twoFlatHRot cr) (transToHandle itm p)
, (Q.axisAngle (V3 0 0 1) (twoFlatHRot cr)) * q
, Q.axisAngle (V3 0 0 1) (twoFlatHRot cr) * q
)
| isOneHand =
( V3 (_crRad cr * 0.7 + handPos) (_crRad cr * negate 0.7) handD
@@ -40,7 +40,7 @@ heldItemRelativeOrient itm cr (p,q)
| otherwise =
( V3 (_crRad cr) 0 handD
+ rotate3 (strideRot cr + 1.2) (V3 (-8) 0 0 + transToHandle itm p)
, (Q.axisAngle (V3 0 0 1) (strideRot cr + 1.2)) * q
, Q.axisAngle (V3 0 0 1) (strideRot cr + 1.2) * q
)
where
handD = 15
+11 -11
View File
@@ -1,12 +1,12 @@
{-# LANGUAGE LambdaCase#-}
module Dodge.Item.InventoryColor
( itemInvColor
) where
module Dodge.Item.InventoryColor (
itemInvColor,
) where
--import Dodge.Data.Item.Use.Consumption.Ammo
import Dodge.Data.ComposedItem
import Color
import Control.Lens
import Dodge.Data.ComposedItem
itemInvColor :: ComposedItem -> Color
itemInvColor ci = case ci ^. cItemFunction of
@@ -14,13 +14,13 @@ itemInvColor ci = case ci ^. cItemFunction of
WeaponScopeSF -> chartreuse
WeaponTargetingSF -> green
AugmentedHUDSF -> rose
AmmoMagSF {} -> red
AmmoMagSF{} -> red
RemoteScreenSF -> azure
UncomposableIsolateSF -> greyN 0.5
AmmoModifierSF {} -> orange
AmmoTargetingSF {} -> green
AmmoPayloadSF {} -> violet
AmmoEffectSF {} -> aquamarine
AmmoModifierSF{} -> orange
AmmoTargetingSF{} -> green
AmmoPayloadSF{} -> violet
AmmoEffectSF{} -> aquamarine
FunctionChangeSF -> yellow
--ammoTypeColor :: AmmoType -> Color
@@ -30,7 +30,7 @@ itemInvColor ci = case ci ^. cItemFunction of
-- BeltBulletAmmo -> orange
-- ElectricalAmmo -> blue
-- GasAmmo -> green
-- HELD {} -> white
-- LEFT {} -> cyan
-- EQUIP {} -> yellow
+1 -3
View File
@@ -1,4 +1,3 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.Item.Scope (
zoomScope,
targetingScope,
@@ -21,8 +20,7 @@ zoomScope = defaultHeldItem
& itUse .~ UseScope OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
targetingScope :: TargetingType -> Item
targetingScope tt= case tt of
_ -> defaultHeldItem
targetingScope tt = defaultHeldItem
& itType .~ TARGETING tt
& itUse .~ UseCraft
& itTargeting .~ ItTargeting