Remove non-laser item TARGETLASER
This commit is contained in:
@@ -220,7 +220,7 @@ inventoryX c = case c of
|
||||
]
|
||||
'L' -> [scrollWatch]
|
||||
'M' -> stackedInventory
|
||||
'N' -> [zoomScope,targetingScope TARGETLASER, sniperRifle]
|
||||
'N' -> [zoomScope,laser,battery, sniperRifle, tinMag]
|
||||
'O' -> [ launcherX 2
|
||||
, shellMag
|
||||
, shellMag
|
||||
@@ -283,9 +283,9 @@ stackedInventory :: [Item]
|
||||
stackedInventory =
|
||||
[ torch
|
||||
, smallBattery
|
||||
, makeTypeCraft TRANSFORMER
|
||||
, remoteScreen
|
||||
, megaShellMag
|
||||
, targetingScope TARGETLASER
|
||||
, burstRifle
|
||||
, megaTinMag 100
|
||||
, laser
|
||||
|
||||
@@ -269,7 +269,6 @@ updateItemTargeting tt cr itm w = case tt of
|
||||
_ | not isattached -> w
|
||||
& pointittarg .itTgPos .~ Nothing
|
||||
& pointittarg .itTgActive .~ False
|
||||
TARGETLASER -> w
|
||||
TargetRBPress | rbpressed -> w
|
||||
& pointittarg .itTgPos %~ maybe (Just $ mouseWorldPos (w ^. input) (w ^. wCam)) Just
|
||||
& pointittarg .itTgActive .~ True
|
||||
|
||||
@@ -9,8 +9,7 @@ import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
|
||||
data TargetingType
|
||||
= TARGETLASER
|
||||
| TargetRBPress
|
||||
= TargetRBPress
|
||||
| TargetRBCreature
|
||||
| TargetCursor
|
||||
deriving (Eq, Ord, Show, Read, Enum, Bounded) --Generic, Flat)
|
||||
|
||||
+14
-12
@@ -14,7 +14,7 @@ import Padding
|
||||
|
||||
itemDisplay :: Creature -> ComposedItem -> [String]
|
||||
itemDisplay cr ci =
|
||||
zipWithDefaults id (leftPad 15 ' ') itemDisplayPad (basicItemDisplay itm) (itemNumberDisplay cr itm)
|
||||
zipWithDefaults id (leftPad 15 ' ') itemDisplayPad (basicItemDisplay itm) (itemNumberDisplay cr ci)
|
||||
where
|
||||
itm = _cItem ci
|
||||
|
||||
@@ -92,20 +92,22 @@ showAutoRechargeProgress lc = case lc of
|
||||
-- where
|
||||
-- ic = (itm ^?! itUse . heldConsumption . laSource)
|
||||
|
||||
itemNumberDisplay :: Creature -> Item -> [String]
|
||||
itemNumberDisplay cr itm = case iu of
|
||||
UseHeld{} -> []
|
||||
UseHotkey{} -> [showAutoRechargeProgress (_leftConsumption iu)]
|
||||
UseEquip{} -> showEquipmentNumber cr itm
|
||||
UseCraft -> []
|
||||
UseConsume {} -> []
|
||||
UseAttach {} -> []
|
||||
UseAmmoMag {} -> [maybe "" shortShow $ itm ^? itUse . amagLoadStatus . iaLoaded]
|
||||
UseScope OpticScope {_opticZoom = x} -> [shortShow x]
|
||||
itemNumberDisplay :: Creature -> ComposedItem -> [String]
|
||||
itemNumberDisplay cr ci = case (ci ^. cItemFunction,iu) of
|
||||
-- UseTargeting {_tgPos = mp} -> [maybe "" shortShow mp]
|
||||
-- this could be cleaner here...
|
||||
UseBulletMod {} -> mempty
|
||||
(WeaponTargetingSF,_) -> [maybe "" shortShow (itm ^? itTargeting . itTgPos . _Just)]
|
||||
(_,UseHeld{}) -> []
|
||||
(_,UseHotkey{}) -> [showAutoRechargeProgress (_leftConsumption iu)]
|
||||
(_,UseEquip{}) -> showEquipmentNumber cr itm
|
||||
(_,UseCraft) -> []
|
||||
(_,UseConsume {}) -> []
|
||||
(_,UseAttach {}) -> []
|
||||
(_,UseAmmoMag {}) -> [maybe "" shortShow $ itm ^? itUse . amagLoadStatus . iaLoaded]
|
||||
(_,UseScope OpticScope {_opticZoom = x}) -> [shortShow x]
|
||||
(_,UseBulletMod {}) -> mempty
|
||||
where
|
||||
itm = ci ^. cItem
|
||||
iu = itm ^?! itUse
|
||||
|
||||
showEquipmentNumber :: Creature -> Item -> [String]
|
||||
|
||||
@@ -57,7 +57,7 @@ laser =
|
||||
& itDimension . dimCenter .~ V3 15 0 0
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itType .~ HELD LASER
|
||||
|
||||
-- previous attractionPower values: 1, -1, -10, 0
|
||||
|
||||
@@ -10,7 +10,6 @@ import qualified Quaternion as Q
|
||||
orientChild :: Item -> (Point3, Q.Quaternion Float)
|
||||
orientChild itm = case _itType itm of
|
||||
HELD TORCH -> (V3 0 5 0, Q.qID)
|
||||
TARGETING TARGETLASER -> (V3 15 (-5) 0, Q.qID)
|
||||
HELD LASER -> (V3 15 (-5) 0, Q.qID)
|
||||
_ -> (0, Q.qID)
|
||||
|
||||
|
||||
@@ -22,15 +22,6 @@ zoomScope = defaultHeldItem
|
||||
|
||||
targetingScope :: TargetingType -> Item
|
||||
targetingScope tt= case tt of
|
||||
TARGETLASER -> defaultHeldItem
|
||||
& itType .~ TARGETING tt
|
||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||
& itUse .~ UseCraft
|
||||
& itTargeting .~ ItTargeting
|
||||
{ _itTgPos = Nothing
|
||||
, _itTgID = Nothing
|
||||
, _itTgActive = False
|
||||
}
|
||||
_ -> defaultHeldItem
|
||||
& itType .~ TARGETING tt
|
||||
& itUse .~ UseCraft
|
||||
|
||||
Reference in New Issue
Block a user