Commit before changes to item grammar

This commit is contained in:
2024-09-25 11:13:01 +01:00
parent f765b02f2c
commit 600b8cd309
23 changed files with 152 additions and 150 deletions
+5 -5
View File
@@ -60,7 +60,7 @@ itemString :: Item -> String
itemString = head . basicItemDisplay
itemBaseName :: Item -> String
itemBaseName it = case _iyBase $ _itType it of
itemBaseName itm = case _iyBase $ _itType itm of
CRAFT str -> show str
HELD hit -> case hit ^? xNum of
Just i -> takeWhile (/= ' ') (show hit) ++ show i
@@ -68,15 +68,15 @@ itemBaseName it = case _iyBase $ _itType it of
LEFT lit -> show lit
EQUIP eit -> showEquipItem eit
CONSUMABLE cit -> show cit
ATTACH ait -> showAttachItem ait
ATTACH ait -> showAttachItem ait itm
AMMOMAG ait -> show ait
showAttachItem :: AttachType -> String
showAttachItem t = case t of
showAttachItem :: AttachType -> Item -> String
showAttachItem t itm = case t of
ZOOMSCOPE -> "ZOOMSCOPE"
TARGETATTACH x -> show x
BULLETSYNTHESIZER -> "BSYNTH"
ROCKETREMOTESCREEN -> "REMOTE SCREEN"
REMOTESCREEN -> "REMOTE SCREEN " ++ show (itm ^? itUse . atLinkedProjectile . _Just)
ROCKETHOMER -> "HOMING MOD"
showEquipItem :: EquipItemType -> String