Defunction-ify item modules, requires more cleanup

This commit is contained in:
2022-06-08 12:28:11 +01:00
parent d91a53f76c
commit bcbfd7d2fa
48 changed files with 762 additions and 740 deletions
+5 -7
View File
@@ -3,19 +3,19 @@ import Dodge.Data
import Dodge.Default
import Picture
import Geometry.Data
import LensHelp
--import ShapePicture
import Shape
keyCard :: Int -> Item
keyCard n = defaultEquipment
{ _itType = KEYCARD n
, _itName = "KEYCARD-"++show n
, _itEquipPict = \_ _ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic
{ _itEquipPict = \_ _ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic
, _itEffect = NoItEffect
, _itID = Nothing
-- , _itZoom = defaultItZoom
, _itInvColor = aquamarine
, _itInvDisplay = (:[]) . _itName
}
& itType . iyBase .~ KEYCARD n
keyPic :: Picture
keyPic = color green $
pictures [translate (-4) 0 $ thickCircle 4 2
@@ -25,9 +25,7 @@ keyPic = color green $
latchkey :: Int -> Item
latchkey n = defaultEquipment
{ _itType = NOTDEFINED
, _itName = "KEY "++show n
, _itEquipPict = \_ _ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) latchkeyPic
{ _itEquipPict = \_ _ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) latchkeyPic
, _itEffect = NoItEffect
, _itID = Nothing
-- , _itZoom = defaultItZoom