module Dodge.Item.PassKey where
import Dodge.Data
import Dodge.Default
import Picture
import Geometry.Data
import LensHelp
--import ShapePicture
import Shape
keyCard :: Int -> Item
keyCard n = defaultEquipment
    { _itEquipPict = \_ _ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic
    , _itEffect = NoItEffect
    , _itID = Nothing
--    , _itZoom = defaultItZoom
    , _itInvColor = aquamarine
    }
    & itType . iyBase .~ KEYCARD n

keyPic :: Picture
keyPic = color green $
              pictures [translate (-4) 0 $ thickCircle 4 2
                       ,thickLine 2 $ map toV2 [(0,0),(8,0),(8,-4)]
                       ,thickLine 2 $ map toV2 [(4,0),(4,-4)]
                       ]

latchkey :: Int -> Item
latchkey _ = defaultEquipment
    { _itEquipPict = \_ _ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) latchkeyPic
    , _itEffect = NoItEffect
    , _itID = Nothing
--    , _itZoom = defaultItZoom
    , _itInvColor = yellow
    }
latchkeyPic :: Picture
latchkeyPic = color yellow $
              pictures [translate (-4) 0 $ thickCircle 4 2
                       ,thickLine 2 $ map toV2 [(0,0),(8,0),(8,-4)]
                       ,thickLine 2 $ map toV2 [(4,0),(4,-4)]
                       ]
