Implement introspection items

This commit is contained in:
2025-01-01 15:20:46 +00:00
parent dae0e0591c
commit 08685909be
11 changed files with 181 additions and 154 deletions
+7
View File
@@ -67,6 +67,7 @@ itemBaseName = \case
BULLETMOD (BulletModEffect btt) -> show btt
STICKYMOD -> "STICKYMOD"
ITEMSCANNER -> "ITEMSCANNER"
INTROSCAN t -> show t
showAttachItem :: AttachType -> String
showAttachItem t = case t of
@@ -106,8 +107,14 @@ itemNumberDisplay cr ci
-- | UseAttach (APLinkProjectile i) <- ci ^. _1 . itUse = [show i]
| UseAttach (APProjectiles x) <- ci ^. _1 . itUse = [show x]
| UseScope OpticScope{_opticZoom = x} <- ci ^. _1 . itUse = [shortShow x]
| Just t <- ci ^? _1 . itType . ibtIntroScanType = [introScanDisplay cr t]
| otherwise = mempty
introScanDisplay :: Creature -> IntroScanType -> String
introScanDisplay cr = \case
HEALTH -> shortShow (cr ^. crHP)
MAXHEALTH -> shortShow (cr ^. crMaxHP)
displayPulse :: Int -> String
displayPulse 0 = "*****"
displayPulse x = take 5 $ drop y "----^-----"