Move item parameters into a more sensible place

This commit is contained in:
2021-11-29 17:45:10 +00:00
parent e9ff591a28
commit 4f77a15445
9 changed files with 68 additions and 51 deletions
+19 -1
View File
@@ -344,7 +344,7 @@ data Item
, _itTargeting :: Maybe (World -> Maybe Point2, Int -> Item -> Creature -> World -> Picture)
, _itDimension :: ItemDimension
, _itCurseStatus :: CurseStatus
, _itType :: ItemType
, _itParams :: ItemParams
}
| Consumable
{ _itName :: String
@@ -516,6 +516,23 @@ data AmmoType
| DroneAmmo
{ _amString :: String }
| GenericAmmo
data ItemParams
= UtilityItem
| NoParams
| ShellLauncher
{ _launchParams :: [PjParam]
}
| MultiBarrel
{ _barrelSpread :: BarrelSpread
, _barrelNum :: Int
}
| SingleBarrel
{_inaccuracy :: Float}
| AngleWalk
{ _maxWalkAngle :: Float
, _currentWalkAngle :: Float
, _walkSpeed :: Float
}
data PjParam = PjParam
{ _pjMoveParam :: Int -> Item -> Creature -> Prop -> World -> World
, _pjIntParam :: Int
@@ -877,3 +894,4 @@ makeLenses ''ItemDimension
makeLenses ''Vocalization
makeLenses ''Universe
makeLenses ''LSParam
makeLenses ''ItemParams