This commit is contained in:
2024-09-30 12:54:31 +01:00
parent 65564c993b
commit fc5539cb38
58 changed files with 802 additions and 1255 deletions
+11 -14
View File
@@ -5,7 +5,7 @@ module Dodge.Item.Draw.SPic (
import Dodge.Data.ComposedItem
import Dodge.Data.DoubleTree
import Color
import qualified Data.Map.Strict as M
--import qualified Data.Map.Strict as M
--import Data.Maybe
import Dodge.Data.Item
--import Dodge.Item.AmmoPosition
@@ -27,18 +27,16 @@ import ShapePicture
-- return mempty
itemSPic :: LabelDoubleTree ComposeLinkType PartiallyComposedItem -> SPic
itemSPic itmtree =
--M.foldMapWithKey (modulesSPic it) (_iyModules $ _itType it) <> case it ^. itType . iyBase of
case it ^. itType . iyBase of
CRAFT _ -> defSPic
HELD ht -> heldItemSPic ht it
LEFT lt -> leftItemSPic lt it
EQUIP et -> equipItemSPic et it
CONSUMABLE{} -> defSPic
ATTACH {} -> defSPic
AMMOMAG {} -> defSPic
TARGETING {} -> defSPic
BULLETMOD {} -> defSPic
itemSPic itmtree = case it ^. itType of
CRAFT _ -> defSPic
HELD ht -> heldItemSPic ht it
LEFT lt -> leftItemSPic lt it
EQUIP et -> equipItemSPic et it
CONSUMABLE{} -> defSPic
ATTACH {} -> defSPic
AMMOMAG {} -> defSPic
TARGETING {} -> defSPic
BULLETMOD {} -> defSPic
where
it = itmtree ^. ldtValue . _1
@@ -58,7 +56,6 @@ equipItemSPic et _ = case et of
INVISIBILITYEQUIPMENT _ -> noPic (colorSH chartreuse $ upperPrismPolySI 3 $ rectWH 2 2)
BRAINHAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
HAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
TARGETINGHAT _ -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
HEADLAMP -> noPic headLampShape
POWERLEGS -> legsSPic yellow
SPEEDLEGS -> legsSPic green