Add modules to items, upgrades the can persist through combinations

This commit is contained in:
2022-02-20 14:13:12 +00:00
parent 3f20398ed0
commit 7afc367abc
16 changed files with 108 additions and 32 deletions
+20 -4
View File
@@ -125,17 +125,17 @@ data World = World
, _gameRooms :: [GameRoom] -- consider using and IntMap
, _maybeWorld :: Maybe' World
, _rewindWorlds :: [World]
, _rewinding :: RewindingStatus
, _timeFlow :: TimeFlowStatus
, _worldClock :: Int
, _lSelHammerPosition :: HammerPosition
, _worldTerminal :: Maybe' WorldTerminal
}
data WorldTerminal = WorldTerminal Int [(Int,String)]
data RewindingStatus
data TimeFlowStatus
= RewindingNow
| RewindingLastFrame
| NotRewinding
| NormalTimeFlow
deriving (Eq,Ord)
data SaveSlot = QuicksaveSlot | LevelStartSlot
@@ -341,7 +341,7 @@ _itUseAimStance :: Item -> AimStance
_itUseAimStance = _aimStance . _useAim . _itUse
data ItemConsumption
= LoadableAmmo
{ _aoType :: AmmoType
{ _aoType :: AmmoType
, _ammoMax :: Int
, _ammoLoaded :: Int
, _reloadTime :: Int
@@ -375,6 +375,20 @@ data Item
, _itCurseStatus :: CurseStatus
, _itParams :: ItemParams
, _itTweaks :: ItemTweaks
, _itModules :: ItemModules
}
data ItemModules = ItemModules
{ _modHitEffect :: ItemModule HitEffect
}
data ItemModule a
= BlockedModule
| DefaultModule
| ItemModule
{ _theModule :: a
, _modName :: [String]
, _modSize :: Int
}
data ItemDimension = ItemDimension
@@ -917,3 +931,5 @@ makeLenses ''ItemPortage
makeLenses ''Magnet
makeLenses ''Gust
makeLenses ''GunBarrels
makeLenses ''ItemModules
makeLenses ''ItemModule