Implement introspection items
This commit is contained in:
@@ -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 "----^-----"
|
||||
|
||||
@@ -42,6 +42,7 @@ itemSPic it = case it ^. itType of
|
||||
BULLETMOD{} -> defSPic
|
||||
STICKYMOD -> defSPic
|
||||
ITEMSCANNER -> defSPic
|
||||
INTROSCAN {} -> defSPic
|
||||
|
||||
craftItemSPic :: CraftType -> Shape
|
||||
craftItemSPic = \case
|
||||
|
||||
@@ -16,6 +16,7 @@ module Dodge.Item.Scope (
|
||||
bulletPayloadModule,
|
||||
smokeReducer,
|
||||
itemScanner,
|
||||
introScan,
|
||||
) where
|
||||
|
||||
import Dodge.Item.Attach
|
||||
@@ -47,6 +48,12 @@ stickyMod =
|
||||
& itType .~ STICKYMOD
|
||||
& itUse .~ UseNothing
|
||||
|
||||
introScan :: IntroScanType -> Item
|
||||
introScan t =
|
||||
defaultHeldItem
|
||||
& itType .~ INTROSCAN t
|
||||
& itUse .~ UseNothing
|
||||
|
||||
itemScanner :: Item
|
||||
itemScanner =
|
||||
defaultHeldItem
|
||||
|
||||
Reference in New Issue
Block a user