Add menu option to start new game from seed, uses system clipboard
This commit is contained in:
@@ -4,6 +4,7 @@ import Dodge.Data
|
||||
--import Picture
|
||||
--import Shape
|
||||
import ShapePicture
|
||||
import Dodge.Creature.HandPos
|
||||
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
@@ -44,12 +45,8 @@ pictureWeaponOnAimItem
|
||||
-> Int -- ^ Position of item in inventory
|
||||
-> SPic
|
||||
pictureWeaponOnAimItem p' cr posInInv
|
||||
| isSelected && _posture (_crStance cr) == Aiming && isTwisting
|
||||
= shoulderD twistWep
|
||||
| isSelected && _posture (_crStance cr) == Aiming && isOneHand
|
||||
= shoulderD oneHandWep
|
||||
| isSelected && _posture (_crStance cr) == Aiming && isTwoHandFlat
|
||||
= shoulderD drawnWep
|
||||
| isSelected && _posture (_crStance cr) == Aiming =
|
||||
shoulderD $ translateSPf (aimingWeaponZeroPos cr theIt) 0 p'
|
||||
| isSelected && isTwoHandFlat
|
||||
= handD holsteredTwoFlat
|
||||
| isSelected && isOneHand
|
||||
@@ -61,9 +58,7 @@ pictureWeaponOnAimItem p' cr posInInv
|
||||
shoulderD = translateSPz 18
|
||||
handD = translateSPz 15
|
||||
isSelected = _crInvSel cr == posInInv
|
||||
drawnWep = translateSPf (1.2 * _crRad cr) 0 p
|
||||
twistWep = translateSPf (-5) 0 p
|
||||
oneHandWep = translateSPf 14 0 p
|
||||
holsteredWep = translateSPf (_crRad cr) 0
|
||||
(rotateSP (strideRot cr + 1.2) (translateSPf (-5) 0 twistWep))
|
||||
holsteredTwoFlat = translateSPf (_crRad cr) 0 (rotateSP (twoFlatHRot cr) p)
|
||||
@@ -76,13 +71,13 @@ pictureWeaponOnAimItem p' cr posInInv
|
||||
p = fromMaybe p' $ do
|
||||
x <- theIt ^? itDimension . dimPortage . handlePos
|
||||
return $translateSPf (-x) 0 p'
|
||||
isTwisting = theIt ^? itUseAimStance == Just TwoHandTwist
|
||||
isOneHand = theIt ^? itUseAimStance == Just OneHand
|
||||
isTwoHandFlat = theIt ^? itUseAimStance == Just TwoHandFlat
|
||||
itUseAimStance = itUse . useAim . aimStance
|
||||
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
sLen = _strideLength $ _crStance cr
|
||||
|
||||
|
||||
strideRot :: Creature -> Float
|
||||
strideRot cr = case cr ^? crStance . carriage of
|
||||
Just (Walking x LeftForward) -> f x
|
||||
|
||||
@@ -8,6 +8,7 @@ module Dodge.Item.Weapon.AmmoParams
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Particle.Bullet.Spawn
|
||||
import Dodge.Creature.HandPos
|
||||
import Geometry
|
||||
import LensHelp
|
||||
|
||||
@@ -33,14 +34,15 @@ defaultAimParams = AimParams
|
||||
}
|
||||
|
||||
useAmmoParams :: Item -> Creature -> World -> World
|
||||
useAmmoParams it = withVelWthHiteff
|
||||
useAmmoParams it cr = withVelWthHiteff
|
||||
(muzvel *.* _amBulVel b)
|
||||
(_rifling $ _itParams it)
|
||||
(_amBulWth b)
|
||||
muzlength
|
||||
(_amBulEff b)
|
||||
cr
|
||||
where
|
||||
muzlength = 20
|
||||
muzlength = aimingMuzzlePos cr it
|
||||
muzvel = _muzVel $ _itParams it
|
||||
b = _aoType $ _itConsumption it
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ bangCane = defaultGun
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 20
|
||||
,_muzPos = 15
|
||||
}
|
||||
, _dimSPic = \it -> noPic $ baseCaneShape
|
||||
<> makeSingleClipAt (V3 5 0 3) it
|
||||
|
||||
Reference in New Issue
Block a user