Cleanup
This commit is contained in:
@@ -220,3 +220,4 @@ data ModuleSlot
|
|||||||
|
|
||||||
makeLenses ''ItemType
|
makeLenses ''ItemType
|
||||||
makeLenses ''ItemBaseType
|
makeLenses ''ItemBaseType
|
||||||
|
makeLenses ''HeldItemType
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ itemString = head . itemDisplay
|
|||||||
itemBaseName :: Item -> String
|
itemBaseName :: Item -> String
|
||||||
itemBaseName it = case _iyBase $ _itType it of
|
itemBaseName it = case _iyBase $ _itType it of
|
||||||
CRAFT str -> show str
|
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
|
x -> show x
|
||||||
|
|
||||||
itemDisplayWithNumber :: String -> Item -> [String]
|
itemDisplayWithNumber :: String -> Item -> [String]
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ setWristShieldPos itm cr w = w
|
|||||||
torch :: Item
|
torch :: Item
|
||||||
torch = defaultWeapon
|
torch = defaultWeapon
|
||||||
& itEffect .~ effectOnOffHeld createHeldLight (const $ const id)
|
& itEffect .~ effectOnOffHeld createHeldLight (const $ const id)
|
||||||
|
& itType . iyBase .~ HELD TORCH
|
||||||
|
|
||||||
createHeldLight :: Creature -> Int -> World -> World
|
createHeldLight :: Creature -> Int -> World -> World
|
||||||
createHeldLight cr i w = w
|
createHeldLight cr i w = w
|
||||||
|
|||||||
Reference in New Issue
Block a user