Remove external corpses, handle them as creatures
This commit is contained in:
+14
-14
@@ -11,18 +11,18 @@ import Data.Aeson.TH
|
||||
import Geometry.Data
|
||||
import ShapePicture.Data
|
||||
|
||||
data CorpseResurrection = NoResurrection
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
--data CorpseResurrection = NoResurrection
|
||||
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
--
|
||||
--data Corpse = Corpse
|
||||
-- { _cpID :: Int
|
||||
-- , _cpPos :: Point2
|
||||
-- , _cpDir :: Float
|
||||
-- , _cpSPic :: SPic
|
||||
-- , _cpRes :: CorpseResurrection
|
||||
-- }
|
||||
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data Corpse = Corpse
|
||||
{ _cpID :: Int
|
||||
, _cpPos :: Point2
|
||||
, _cpDir :: Float
|
||||
, _cpSPic :: SPic
|
||||
, _cpRes :: CorpseResurrection
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
makeLenses ''Corpse
|
||||
deriveJSON defaultOptions ''CorpseResurrection
|
||||
deriveJSON defaultOptions ''Corpse
|
||||
--makeLenses ''Corpse
|
||||
--deriveJSON defaultOptions ''CorpseResurrection
|
||||
--deriveJSON defaultOptions ''Corpse
|
||||
|
||||
@@ -17,6 +17,7 @@ module Dodge.Data.Creature (
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
||||
) where
|
||||
|
||||
import ShapePicture.Data
|
||||
import NewInt
|
||||
import Dodge.Data.Item.Use.Consumption.LoadAction
|
||||
import Dodge.Data.Equipment.Misc
|
||||
@@ -45,7 +46,7 @@ data Creature = Creature
|
||||
, _crMvAim :: Float
|
||||
, _crType :: CreatureType
|
||||
, _crID :: Int
|
||||
, _crHP :: Int
|
||||
, _crHP :: CrHP
|
||||
, _crInv :: NewIntMap InvInt Int
|
||||
, _crManipulation :: Manipulation
|
||||
, _crEquipment :: M.Map EquipSite (NewInt ItmInt)
|
||||
@@ -68,8 +69,9 @@ data Creature = Creature
|
||||
|
||||
data CrHP
|
||||
= HP Int
|
||||
| CrIsCorpse
|
||||
| CrIsCorpse SPic
|
||||
| CrIsGibs
|
||||
| CrIsPitted
|
||||
|
||||
data Intention = Intention
|
||||
{ _targetCr :: Maybe Creature
|
||||
|
||||
@@ -137,7 +137,7 @@ data LWorld = LWorld
|
||||
, _pressPlates :: IM.IntMap PressPlate
|
||||
, _buttons :: IM.IntMap Button
|
||||
, _foregroundShapes :: IM.IntMap ForegroundShape
|
||||
, _corpses :: IM.IntMap Corpse
|
||||
-- , _corpses :: IM.IntMap Corpse
|
||||
, _lightSources :: IM.IntMap LightSource
|
||||
, _lights :: [LSParam]
|
||||
, _seenLocations :: IM.IntMap (WdP2, String)
|
||||
|
||||
Reference in New Issue
Block a user