Rehome launcher

This commit is contained in:
2021-05-25 18:03:35 +02:00
parent f737897b18
commit d5fed6c987
15 changed files with 280 additions and 222 deletions
+12 -1
View File
@@ -148,6 +148,7 @@ data Creature = Creature
, _crMaxHP :: Int
, _crInv :: IM.IntMap Item
, _crInvSel :: Int
, _crLeftInvSel :: Maybe Int
, _crState :: CreatureState
, _crCorpse :: Picture
, _crApplyDamage :: [DamageType] -> Creature -> (World -> World,Creature)
@@ -193,6 +194,7 @@ data Item
{ _itName :: String
, _wpMaxAmmo :: Int
, _wpLoadedAmmo :: Int
, _wpAmmo :: Ammo
, _wpReloadTime :: Int
, _wpReloadState :: Int
, _itUseRate :: Int
@@ -381,6 +383,14 @@ data Particle
, _btTimer' :: Int
}
type HitEffect = Particle -> [(Point2, Either3 Creature Wall ForceField)] -> World -> (World,Maybe Particle)
data Ammo
= ShellAmmo
{ _amPayload :: Point2 -> World -> World
}
| BulletAmmo
{ }
| GenericAmmo
data Projectile
= Projectile
{ _pjPos :: Point2
@@ -399,7 +409,7 @@ data Projectile
, _pjDraw :: Projectile -> Picture
, _pjID :: Int
, _pjUpdate :: Projectile -> World -> World
, _pjPayload :: Point2-> World -> World
, _pjPayload :: Point2 -> World -> World
}
| LinearShockwave
{ _pjDraw :: Projectile -> Picture
@@ -645,6 +655,7 @@ makeLenses ''ItemPos
makeLenses ''ItEffect
makeLenses ''ItZoom
makeLenses ''FloorItem
makeLenses ''Ammo
makeLenses ''Projectile
makeLenses ''Particle
makeLenses ''Wall