Add menu option to start new game from seed, uses system clipboard

This commit is contained in:
2021-12-09 14:36:26 +00:00
parent eeda4f3e39
commit 24a0cc289f
13 changed files with 101 additions and 54 deletions
+17 -3
View File
@@ -1,6 +1,20 @@
module Dodge.Creature.HandPos where
import Dodge.Data
import Geometry
--import Geometry
import Control.Lens
import Data.Maybe
crHandPos :: Creature -> Point3
crHandPos _ = V3 0 0 20
-- the position of a weapon handle
aimingWeaponHandlePos :: Creature -> Item -> Float
aimingWeaponHandlePos cr it = case it ^? itUse. useAim . aimStance of
Just TwoHandTwist -> -5
Just OneHand -> 14
Just TwoHandFlat -> 1.2 * _crRad cr
Just LeaveHolstered -> 0
Nothing -> 0
aimingWeaponZeroPos :: Creature -> Item -> Float
aimingWeaponZeroPos cr it = aimingWeaponHandlePos cr it
- fromMaybe 0 (it ^? itDimension . dimPortage . handlePos)
aimingMuzzlePos :: Creature -> Item -> Float
aimingMuzzlePos cr it = aimingWeaponZeroPos cr it
+ fromMaybe 0 (it ^? itDimension . dimPortage . muzPos)