This commit is contained in:
2022-07-14 00:41:29 +01:00
parent dcc0596a25
commit 2a5b512d61
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -220,3 +220,4 @@ data ModuleSlot
makeLenses ''ItemType
makeLenses ''ItemBaseType
makeLenses ''HeldItemType
+3 -1
View File
@@ -19,7 +19,9 @@ itemString = head . itemDisplay
itemBaseName :: Item -> String
itemBaseName it = case _iyBase $ _itType it of
CRAFT str -> show str
HELD str -> show str
HELD hit -> case hit ^? xNum of
Just i -> takeWhile (/=' ') (show hit) ++ show i
Nothing -> show hit
x -> show x
itemDisplayWithNumber :: String -> Item -> [String]
+1
View File
@@ -109,6 +109,7 @@ setWristShieldPos itm cr w = w
torch :: Item
torch = defaultWeapon
& itEffect .~ effectOnOffHeld createHeldLight (const $ const id)
& itType . iyBase .~ HELD TORCH
createHeldLight :: Creature -> Int -> World -> World
createHeldLight cr i w = w