Remove (by commenting out) module item-type system

This commit is contained in:
2024-09-30 11:42:10 +01:00
parent 4545caa7e6
commit 0701c4043e
37 changed files with 877 additions and 696 deletions
+13 -8
View File
@@ -2,6 +2,8 @@ module Dodge.Item.Draw.SPic (
itemSPic,
) where
import Dodge.Data.ComposedItem
import Dodge.Data.DoubleTree
import Color
import qualified Data.Map.Strict as M
--import Data.Maybe
@@ -24,9 +26,10 @@ import ShapePicture
-- hit <- itm ^? itType . iyBase . ibtHeld
-- return mempty
itemSPic :: Item -> SPic
itemSPic it =
M.foldMapWithKey (modulesSPic it) (_iyModules $ _itType it) <> case it ^. itType . iyBase of
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
@@ -35,7 +38,9 @@ itemSPic it =
ATTACH {} -> defSPic
AMMOMAG {} -> defSPic
TARGETING {} -> defSPic
HOMING {} -> defSPic
BULLETMOD {} -> defSPic
where
it = itmtree ^. ldtValue . _1
equipItemSPic :: EquipItemType -> Item -> SPic
equipItemSPic et _ = case et of
@@ -216,10 +221,10 @@ torchShape =
bot = upperPrismPolySE 0.5 $ rectXH 9 2
back = upperPrismPolySE 3 $ rectXH 1 2
modulesSPic :: Item -> ModuleSlot -> ItemModuleType -> SPic
modulesSPic it _ imt = case imt of
ATTACHTORCH -> noPic (overPosSH (+.+.+ _dimAttachPos (_itDimension it)) torchShape)
_ -> mempty
--modulesSPic :: Item -> ModuleSlot -> ItemModuleType -> SPic
--modulesSPic it _ imt = case imt of
-- ATTACHTORCH -> noPic (overPosSH (+.+.+ _dimAttachPos (_itDimension it)) torchShape)
-- _ -> mempty
baseStickShapeX :: Item -> Int -> Shape
baseStickShapeX it _ = foldMap f (it ^?! itUse . heldAim . aimMuzzles)