Move towards allowing equipable targeting items

This commit is contained in:
2023-01-06 11:01:32 +00:00
parent bf479ca080
commit 612ee85579
23 changed files with 152 additions and 145 deletions
+1 -14
View File
@@ -10,25 +10,12 @@ import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data Targeting
= NoTargeting
| Targeting
{ _tgPos :: Maybe Point2
, _tgType :: TargetType --Item -> Creature -> World -> Targeting -> (World, Targeting)
-- , _tgDraw :: TargetDraw --Item -> Creature -> Configuration -> World -> Picture
, _tgID :: Maybe Int
, _tgActive :: Bool
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data TargetType
= TargetLaser
| TargetRBPress
| TargetRBLine
| TargetRBCreature
| TargetCursor
deriving (Eq, Ord, Show, Read) --Generic, Flat)
deriving (Eq, Ord, Show, Read, Enum, Bounded) --Generic, Flat)
makeLenses ''Targeting
deriveJSON defaultOptions ''TargetType
deriveJSON defaultOptions ''Targeting