Remove (by commenting out) module item-type system

This commit is contained in:
2024-09-30 11:42:10 +01:00
parent 4545caa7e6
commit 0701c4043e
37 changed files with 877 additions and 696 deletions
+12 -9
View File
@@ -1,6 +1,6 @@
module Dodge.Item.Display (
itemDisplay,
canAttachTargeting,
-- canAttachTargeting,
itemString,
itemBaseName,
basicItemDisplay,
@@ -17,11 +17,11 @@ import Dodge.Module
import LensHelp
import Padding
canAttachTargeting :: TargetingType -> Item -> Bool
canAttachTargeting TARGETLASER _ = True
canAttachTargeting _ itm =
isJust (itm ^? itType . iyModules . ix ModBulletTrajectory . imtBulletTrajectoryType)
|| Just LAUNCHHOME == (itm ^? itType . iyModules . ix ModLauncherHoming)
--canAttachTargeting :: TargetingType -> Item -> Bool
--canAttachTargeting TARGETLASER _ = True
--canAttachTargeting _ itm =
-- isJust (itm ^? itType . iyModules . ix ModBulletTrajectory . imtBulletTrajectoryType)
-- || Just LAUNCHHOME == (itm ^? itType . iyModules . ix ModLauncherHoming)
--targetingTypeString :: TargetType -> String
--targetingTypeString tt = case tt of
@@ -54,7 +54,7 @@ basicItemDisplay itm =
itemBaseName itm :
--catMaybes [maybeWarmupStatus itm, maybeRateStatus itm]
catMaybes [maybeWarmupStatus itm]
++ moduleStrings itm
-- ++ moduleStrings itm
++ repeat "*"
itemString :: Item -> String
@@ -72,7 +72,9 @@ itemBaseName itm = case _iyBase $ _itType itm of
ATTACH ait -> showAttachItem ait itm
AMMOMAG ait -> show ait
TARGETING tt -> show tt
HOMING btt -> show btt
BULLETMOD (BulletModTrajectory btt) -> show btt
BULLETMOD (BulletModPayload btt) -> show btt
BULLETMOD (BulletModEffect btt) -> show btt
showAttachItem :: AttachType -> Item -> String
showAttachItem t itm = case t of
@@ -81,6 +83,7 @@ showAttachItem t itm = case t of
BULLETSYNTHESIZER -> "BSYNTH"
REMOTESCREEN -> "REMOTE SCREEN " ++ show (itm ^? itUse . atLinkedProjectile . _Just)
HOMINGMODULE -> "HOMING MOD"
AUGMENTEDHUD -> "AUGMENTED HUD"
showEquipItem :: EquipItemType -> String
showEquipItem eit = case eit of
@@ -124,7 +127,7 @@ itemNumberDisplay cr itm = case iu of
ScopeUse {} -> []
TargetingUse {_tgPos = mp} -> [maybe "" shortShow mp]
-- this could be cleaner here...
BulletTrajectoryUse {} -> mempty
BulletModUse {} -> mempty
where
iu = itm ^?! itUse