Add key card item lock/key system

This commit is contained in:
2022-03-22 14:33:54 +00:00
parent 873abea79f
commit 774738f993
13 changed files with 74 additions and 73 deletions
+8 -43
View File
@@ -1,43 +1,8 @@
module Dodge.Item
where
import Dodge.Data
import Dodge.Default
import Picture
import Geometry.Data
--import ShapePicture
import Shape
keyToken :: Int -> Item
keyToken n = defaultEquipment
{ _itType = NOTDEFINED
, _itName = "KEYTOKEN "++show n
, _itEquipPict = \_ _ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic
, _itEffect = NoItEffect
, _itID = Nothing
-- , _itZoom = defaultItZoom
, _itInvColor = yellow
, _itInvDisplay = (:[]) . _itName
}
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 n = defaultEquipment
{ _itType = NOTDEFINED
, _itName = "KEY "++show n
, _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)]
]
module Dodge.Item
( module Dodge.Item.Weapon
, module Dodge.Item.Consumable
, module Dodge.Item.PassKey
) where
import Dodge.Item.Weapon
import Dodge.Item.Consumable
import Dodge.Item.PassKey