Add Read instances
This commit is contained in:
@@ -248,33 +248,21 @@ lasGun = defaultAutoBatteryGun
|
||||
|
||||
lasGunTweak :: TweakParam
|
||||
lasGunTweak = TweakParam
|
||||
{ _doTweak = thetweak
|
||||
, _curTweak = 1
|
||||
, _maxTweak = 3
|
||||
, _showTweak = showPhaseV
|
||||
, _nameTweak = "PHASE VELOCITY"
|
||||
{ _tweakType = TweakPhaseV
|
||||
, _tweakVal = 1
|
||||
, _tweakMax = 3
|
||||
}
|
||||
where
|
||||
thetweak 0 = itParams . phaseV .~ 0.2
|
||||
thetweak 1 = itParams . phaseV .~ 1
|
||||
thetweak 2 = itParams . phaseV .~ 5
|
||||
thetweak _ = id
|
||||
showPhaseV 0 = "V"
|
||||
showPhaseV 1 = "/"
|
||||
showPhaseV 2 = "Z"
|
||||
showPhaseV i = "THIS SHOULD NOT BE POSSIBLE" ++ show i
|
||||
|
||||
tractorGun :: Item
|
||||
tractorGun = lasGun
|
||||
{ _itConsumption = defaultLoadable
|
||||
& laMax .~ 10000
|
||||
& laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60]
|
||||
, _itParams = Attracting {_attractionPower = 1}
|
||||
, _itTweaks = Tweakable
|
||||
& itConsumption .~
|
||||
( defaultLoadable
|
||||
& laMax .~ 10000
|
||||
& laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] )
|
||||
& itParams .~ Attracting {_attractionPower = 1}
|
||||
& itTweaks .~ Tweakable
|
||||
{ _tweakParams = IM.fromList [(0,tractorGunTweak)]
|
||||
, _tweakSel = 0
|
||||
}
|
||||
}
|
||||
& itUse . rUse .~ HeldTractor --aTractorBeam
|
||||
& itUse . useDelay .~ NoDelay
|
||||
& itUse . useMods .~ AmmoCheckMod
|
||||
@@ -287,23 +275,10 @@ tractorGun = lasGun
|
||||
|
||||
tractorGunTweak :: TweakParam
|
||||
tractorGunTweak = TweakParam
|
||||
{ _doTweak = thetweak
|
||||
, _curTweak = 1
|
||||
, _maxTweak = 4
|
||||
, _showTweak = showPower
|
||||
, _nameTweak = "TRACTION POWER"
|
||||
{ _tweakType = TweakTractionPower
|
||||
, _tweakVal = 1
|
||||
, _tweakMax = 4
|
||||
}
|
||||
where
|
||||
thetweak 0 = itParams . attractionPower .~ 1
|
||||
thetweak 1 = itParams . attractionPower .~ -1
|
||||
thetweak 2 = itParams . attractionPower .~ -10
|
||||
thetweak 3 = itParams . attractionPower .~ 0
|
||||
thetweak _ = id
|
||||
showPower 0 = "+"
|
||||
showPower 1 = "-"
|
||||
showPower 2 = "#"
|
||||
showPower 3 = "0" -- object should stay in the center of the beam
|
||||
showPower i = "THIS SHOULD NOT BE POSSIBLE" ++ show i
|
||||
|
||||
-- | assumes that the item is held
|
||||
shootTeslaArc :: Item -> Creature -> World -> World
|
||||
|
||||
@@ -68,30 +68,23 @@ basicAmPjMoves = IM.fromList . zip [0..] $
|
||||
]
|
||||
spinDrag :: TweakParam
|
||||
spinDrag = TweakParam
|
||||
{ _doTweak = \i -> itParams . shellSpinDrag .~ i
|
||||
, _curTweak = 1
|
||||
, _showTweak = show
|
||||
, _maxTweak = 5
|
||||
, _nameTweak = "SPIN SLOWDOWN"
|
||||
{ _tweakType = TweakSpinDrag
|
||||
, _tweakVal = 1
|
||||
, _tweakMax = 5
|
||||
}
|
||||
spinStart :: TweakParam
|
||||
spinStart = TweakParam
|
||||
{ _doTweak = \i -> itParams . shellSpinAmount .~ i
|
||||
, _curTweak = 2
|
||||
, _showTweak = show
|
||||
, _maxTweak = 5
|
||||
, _nameTweak = "SPIN AMOUNT"
|
||||
{ _tweakType = TweakSpinAmount
|
||||
, _tweakVal = 2
|
||||
, _tweakMax = 5
|
||||
}
|
||||
thrustParam :: TweakParam
|
||||
thrustParam = TweakParam
|
||||
{ _doTweak = \i -> itParams . shellThrustDelay .~ i
|
||||
, _curTweak = 1
|
||||
, _showTweak = show
|
||||
, _maxTweak = 5
|
||||
, _nameTweak = "THRUST DELAY"
|
||||
{ _tweakType = TweakThrustDelay
|
||||
, _tweakVal = 1
|
||||
, _tweakMax = 5
|
||||
}
|
||||
|
||||
|
||||
remoteLauncher :: Item
|
||||
remoteLauncher = launcher
|
||||
& itType . iyBase .~ HELD REMOTELAUNCHER
|
||||
|
||||
Reference in New Issue
Block a user