Move towards adding corpses

This commit is contained in:
2022-06-04 12:42:18 +01:00
parent 602a004e87
commit 5f5b1dd422
8 changed files with 40 additions and 18 deletions
+8 -5
View File
@@ -118,7 +118,7 @@ data World = World
, _playingSounds :: M.Map SoundOrigin Sound
, _decorations :: IM.IntMap Picture
, _foregroundShape :: Shape
, _corpses :: Zone [Corpse]
, _corpses :: IM.IntMap Corpse
, _clickMousePos :: Point2
, _pathGraph :: ~(Gr Point2 Float)
, _pathGraphP :: ~[(Point2,Point2)]
@@ -274,9 +274,11 @@ data CrGroupParams = CrGroupParams
, _crGroupUpdate :: World -> CrGroupParams -> Maybe CrGroupParams
}
data Corpse = Corpse
{ _cpPos :: Point2
, _cpPict :: Picture
, _cpRes :: Creature
{ _cpID :: Int
, _cpPos :: Point2
, _cpDir :: Float
, _cpPict :: SPic
, _cpRes :: Maybe Creature
}
data Gust = Gust
{ _guID :: Int
@@ -337,7 +339,7 @@ data Creature = Creature
, _crEquipment :: M.Map EquipPosition Int
, _crLeftInvSel :: Maybe Int
, _crState :: CreatureState
, _crCorpse :: Picture
, _crCorpse :: Creature -> SPic
, _crApplyDamage :: [Damage] -> Creature -> World -> World
, _crPastDamage :: Int
, _crStance :: Stance
@@ -1596,6 +1598,7 @@ makeLenses ''EquipParams
makeLenses ''TerminalCommand
makeLenses ''GenParams
makeLenses ''CreatureSkin
makeLenses ''Corpse
----- ROOM LENSES
makeLenses ''Room