Implement copier, an item that copies the value displayed by other items

This commit is contained in:
2025-01-08 14:29:25 +00:00
parent 47aa8655b1
commit 21b7b863c7
12 changed files with 184 additions and 142 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ module Dodge.Item.Display (
itemBaseName,
itemString,
basicItemDisplay,
itemInternalValue,
) where
import ShortShow
@@ -36,7 +37,7 @@ itemInternalValue itm
| Just x <- itm ^? itConsumables . magLoadStatus . iaLoaded = Just $ Left x
| UseAttach (APInt i) <- itm ^. itUse = Just $ Left i
| UseAttach (APProjectiles x) <- itm ^. itUse = Just . Right $ show x
| otherwise = mempty
| v <- itm ^? itUse . uValue = v
maybeWarmupStatus :: Item -> Maybe String
+2 -1
View File
@@ -88,8 +88,9 @@ copier :: InventoryPathing -> Item
copier x =
defaultHeldItem
& itType .~ COPIER x
& itUse .~ UseInt 0
& itUse .~ UseValue (Left 0)
& itScroll .~ ItemScrollInt 0
& itEffect . ieInv .~ ItemCopierUpdate
bgate :: Item
bgate =