Move towards tweak parameters editing items
This commit is contained in:
+21
-11
@@ -500,12 +500,11 @@ type HitEffect = Particle
|
||||
-> (World,Maybe Particle)
|
||||
|
||||
data AmmoType
|
||||
= ShellAmmo
|
||||
= ProjectileAmmo
|
||||
{ _amPayload :: Point2 -> World -> World
|
||||
, _amString :: String
|
||||
, _amPjParams :: [PjParam]
|
||||
, _amPjDraw :: Prop -> SPic
|
||||
, _amParamSel :: Int
|
||||
-- , _aProjectile :: Ammo -> Prop
|
||||
}
|
||||
| BulletAmmo
|
||||
{ _amString :: String
|
||||
@@ -520,7 +519,11 @@ data ItemParams
|
||||
= UtilityItem
|
||||
| NoParams
|
||||
| ShellLauncher
|
||||
{ _launchParams :: [PjParam]
|
||||
{ _tweakParams :: [TweakParam]
|
||||
, _tweakSel :: Int
|
||||
, _shellSpinDrag :: Int
|
||||
, _shellSpinAmount :: Int
|
||||
, _shellThrustDelay :: Int
|
||||
}
|
||||
| MultiBarrel
|
||||
{ _barrelSpread :: BarrelSpread
|
||||
@@ -533,12 +536,19 @@ data ItemParams
|
||||
, _currentWalkAngle :: Float
|
||||
, _walkSpeed :: Float
|
||||
}
|
||||
data PjParam = PjParam
|
||||
{ _pjMoveParam :: Int -> Item -> Creature -> Prop -> World -> World
|
||||
, _pjIntParam :: Int
|
||||
, _pjMaxParam :: Int
|
||||
, _pjDisplayParam :: Int -> String
|
||||
}
|
||||
data TweakParam
|
||||
= PjExtraUpdate
|
||||
{ _pjMoveParam :: Int -> Item -> Creature -> Prop -> World -> World
|
||||
, _curTweak :: Int
|
||||
, _pjMaxParam :: Int
|
||||
, _pjDisplayParam :: Int -> String
|
||||
}
|
||||
| TweakItem
|
||||
{ _doTweak :: Int -> Item -> Item
|
||||
, _curTweak :: Int
|
||||
, _maxTweak :: Int
|
||||
, _showTweak :: Int -> String
|
||||
}
|
||||
data Modification
|
||||
= ModIDTimerPoint3Bool
|
||||
{ _mdID :: Int
|
||||
@@ -871,7 +881,7 @@ makeLenses ''ItEffect
|
||||
makeLenses ''FloorItem
|
||||
makeLenses ''ItemConsumption
|
||||
makeLenses ''AmmoType
|
||||
makeLenses ''PjParam
|
||||
makeLenses ''TweakParam
|
||||
makeLenses ''Prop
|
||||
makeLenses ''Modification
|
||||
makeLenses ''Particle
|
||||
|
||||
Reference in New Issue
Block a user