diff --git a/src/Dodge/Euse.hs b/src/Dodge/Euse.hs index fc1d56543..9a88df66b 100644 --- a/src/Dodge/Euse.hs +++ b/src/Dodge/Euse.hs @@ -80,9 +80,11 @@ onEquipWristShield itm cr w = onRemoveWristShield :: Item -> Creature -> World -> World onRemoveWristShield itm _ = - (pointerToItem itm . itUse . equipEffect . eeParams .~ NoEquipParams) . deleteWallID i + (pointerToItem itm . itUse . equipEffect . eeParams .~ NoEquipParams) . mremovewall where - i = _eparamID $ _eeParams $ _equipEffect $ _itUse itm + mremovewall = fromMaybe id $ do + i <- itm ^? itUse . equipEffect . eeParams . eparamID + return $ deleteWallID i setWristShieldPos :: Item -> Creature -> World -> World setWristShieldPos itm cr w = diff --git a/src/Dodge/Render/HUD.hs b/src/Dodge/Render/HUD.hs index bafb8a84d..2b7c4cc4c 100644 --- a/src/Dodge/Render/HUD.hs +++ b/src/Dodge/Render/HUD.hs @@ -134,7 +134,8 @@ drawNoSubInventory cfig w = invid <- cr ^. crLeftInvSel . lisMPos sss <- w ^? hud . hudElement . diSections pos <- selSecSelPos 0 invid sss - return $ listTextPictureAt 144 0 cfig pos . color cyan . text . eqPosText $_crInvEquipped cr IM.! invid + return $ listTextPictureAt 144 0 cfig pos . color cyan . text . eqPosText + $ _crInvEquipped cr IM.! invid f col invid epos = fromMaybe mempty $ do sss <- w ^? hud . hudElement . diSections pos <- selSecSelPos 0 invid sss