Remove unnecessary item held/worn field type
This commit is contained in:
@@ -18,10 +18,10 @@ aimingWeaponHandlePos cr it = case it ^? itUse. useAim . aimStance of
|
||||
Nothing -> 0
|
||||
aimingWeaponZeroPos :: Creature -> Item -> Float
|
||||
aimingWeaponZeroPos cr it = aimingWeaponHandlePos cr it
|
||||
- fromMaybe 0 (it ^? itDimension . dimPortage . handlePos)
|
||||
- fromMaybe 0 (it ^? itUse . useAim . aimHandlePos)
|
||||
aimingMuzzlePos :: Creature -> Item -> Float
|
||||
aimingMuzzlePos cr it = aimingWeaponZeroPos cr it
|
||||
+ fromMaybe 0 (it ^? itDimension . dimPortage . muzPos)
|
||||
+ fromMaybe 0 (it ^? itUse . useAim . aimMuzPos)
|
||||
|
||||
translatePointToRightHand :: Creature -> Point3 -> Point3
|
||||
translatePointToRightHand cr = translatePointToRightHand' cr . mirrorV3xz
|
||||
|
||||
+1
-1
@@ -569,7 +569,7 @@ data Targeting
|
||||
data ItemDimension = ItemDimension
|
||||
{ _dimRad :: Float
|
||||
, _dimCenter :: Point3
|
||||
, _dimPortage :: ItemPortage
|
||||
-- , _dimPortage :: ItemPortage
|
||||
, _dimSPic :: Item -> SPic
|
||||
}
|
||||
data ItemPortage
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
module Dodge.Default.AimParams where
|
||||
import Dodge.Item.Data
|
||||
|
||||
defaultAimParams :: AimParams
|
||||
defaultAimParams = AimParams
|
||||
{ _aimWeight = 0
|
||||
, _aimRange = 0
|
||||
, _aimZoom = ItZoom 20 0.2 1
|
||||
, _aimStance = OneHand
|
||||
, _aimHandlePos = 10
|
||||
, _aimMuzPos = 20
|
||||
}
|
||||
@@ -16,7 +16,7 @@ defaultItem = Item
|
||||
, _itInvColor = yellow
|
||||
, _itInvSize = 1
|
||||
, _itPos = VoidItm
|
||||
, _itDimension = ItemDimension 0 0 NoPortage (const mempty)
|
||||
, _itDimension = ItemDimension 0 0 (const mempty)
|
||||
, _itConsumption = NoConsumption
|
||||
, _itUse = NoUse
|
||||
, _itAttachment = NoItAttachment
|
||||
|
||||
@@ -5,6 +5,7 @@ import Dodge.Item.Weapon.AmmoParams
|
||||
import Dodge.Reloading.Action
|
||||
import Dodge.Item.Weapon.Bullet
|
||||
import Dodge.Default.Item
|
||||
import Dodge.Default.AimParams
|
||||
--import Dodge.Item.Draw
|
||||
import Picture
|
||||
import ShapePicture
|
||||
@@ -92,13 +93,6 @@ luseInstantNoH :: (Item -> Creature -> World -> World) -> ItemUse
|
||||
luseInstantNoH f = defaultlUse
|
||||
& lUse .~ f
|
||||
& useDelay .~ NoDelay
|
||||
defaultAimParams :: AimParams
|
||||
defaultAimParams = AimParams
|
||||
{ _aimWeight = 0
|
||||
, _aimRange = 0
|
||||
, _aimZoom = ItZoom 20 0.2 1
|
||||
, _aimStance = OneHand
|
||||
}
|
||||
|
||||
-- TODO change this
|
||||
defaultLeftItem :: Item
|
||||
@@ -134,20 +128,12 @@ defItDim :: ItemDimension
|
||||
defItDim = ItemDimension
|
||||
{ _dimRad = 2
|
||||
, _dimCenter = V3 0 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{ _handlePos = 0
|
||||
, _muzPos = 0
|
||||
}
|
||||
, _dimSPic = const $ noPic $ colorSH green $ upperPrismPoly 3 $ square 4
|
||||
}
|
||||
defItDimCol :: Color -> ItemDimension
|
||||
defItDimCol col = ItemDimension
|
||||
{ _dimRad = 2
|
||||
, _dimCenter = V3 0 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{ _handlePos = 0
|
||||
, _muzPos = 0
|
||||
}
|
||||
, _dimSPic = const $ noPic $ colorSH col $ upperPrismPoly 3 $ square 4
|
||||
}
|
||||
defBulletShooter :: ItemParams
|
||||
|
||||
@@ -69,6 +69,8 @@ data AimParams = AimParams
|
||||
, _aimRange :: Float
|
||||
, _aimZoom :: ItZoom
|
||||
, _aimStance :: AimStance
|
||||
, _aimHandlePos :: Float
|
||||
, _aimMuzPos :: Float
|
||||
}
|
||||
data UseDelay -- should just be Delay
|
||||
= NoDelay
|
||||
|
||||
@@ -18,10 +18,11 @@ import Control.Lens
|
||||
import Data.Maybe
|
||||
|
||||
itemEquipPict :: Creature -> Item -> SPic
|
||||
itemEquipPict cr it = case _dimPortage (_itDimension it) of
|
||||
HeldItem {} -> pictureWeaponOnAim cr it
|
||||
WornItem -> pictureOnEquip (itSPic it) cr it
|
||||
NoPortage -> mempty
|
||||
itemEquipPict cr it = case it ^?! itUse of
|
||||
RightUse {} -> pictureWeaponOnAim cr it
|
||||
ituse -> case ituse ^? eqEq of
|
||||
Just _ -> pictureOnEquip (itSPic it) cr it
|
||||
Nothing -> mempty
|
||||
|
||||
pictureWeaponOnAim
|
||||
:: Creature
|
||||
@@ -72,7 +73,7 @@ pictureWeaponOnAimItem p' cr posInInv
|
||||
_ -> 0
|
||||
theIt = _crInv cr IM.! posInInv
|
||||
p = fromMaybe p' $ do
|
||||
x <- theIt ^? itDimension . dimPortage . handlePos
|
||||
x <- theIt ^? itUse . useAim . aimHandlePos
|
||||
return $translateSPf (-x) 0 p'
|
||||
isOneHand = theIt ^? itUseAimStance == Just OneHand
|
||||
|| isNothing (theIt ^? itUseAimStance)
|
||||
|
||||
@@ -67,7 +67,6 @@ frontArmour = defaultEquipment
|
||||
}
|
||||
& itUse . eqEq . eqSite .~ GoesOnChest
|
||||
& itType . iyBase .~ FRONTARMOUR
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ const (emptySH , setDepth 20 $ pictures
|
||||
[color thecol $ thickArc 0 (pi/2) 10 5
|
||||
,color thecol $ thickArc (3*pi/2) (2*pi) 10 5
|
||||
@@ -84,7 +83,6 @@ wristArmour = defaultEquipment
|
||||
& itUse . eqEq . eqUse .~ setWristShieldPos
|
||||
& itUse . eqEq . eqOnRemove .~ onRemoveWristShield
|
||||
& itType . iyBase .~ WRISTARMOUR
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ const mempty
|
||||
|
||||
onEquipWristShield :: Item -> Creature -> World -> World
|
||||
@@ -132,6 +130,8 @@ flatShield = defaultEquipment
|
||||
, _aimRange = 0
|
||||
, _aimZoom = ItZoom 20 0.2 1
|
||||
, _aimStance = TwoHandFlat
|
||||
, _aimHandlePos = 10
|
||||
, _aimMuzPos = 10
|
||||
}
|
||||
, _heldScroll = \_ _ -> id
|
||||
}
|
||||
@@ -212,7 +212,6 @@ jetPack = defaultEquipment
|
||||
, _itID = Nothing
|
||||
} & itUse . eqEq . eqSite .~ GoesOnBack
|
||||
& itType . iyBase .~ JETPACK
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ ( \_ -> (,) emptySH $ setDepth 20
|
||||
$ pictures [color yellow $ polygon $ reverse $ rectNSWE 5 (-5) (-11) (-3) ]
|
||||
)
|
||||
@@ -224,7 +223,6 @@ brainHat = defaultEquipment
|
||||
}
|
||||
& itUse . eqEq . eqSite .~ GoesOnHead
|
||||
& itType . iyBase .~ BRAINHAT
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~
|
||||
const (noPic $ colorSH yellow $ upperPrismPoly 3 $ rectWH 4 4)
|
||||
|
||||
@@ -236,7 +234,6 @@ headLamp1 = defaultEquipment
|
||||
& itUse . eqEq . eqUse .~ createHeadLamp
|
||||
& itUse . eqEq . eqSite .~ GoesOnHead
|
||||
& itType . iyBase .~ HEADLAMP1
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~
|
||||
const (noPic $ colorSH yellow $
|
||||
translateSHf 5 2 (upperPrismPoly 8 $ rectWH 4 1)
|
||||
@@ -249,7 +246,6 @@ headLamp = defaultEquipment
|
||||
& itUse . eqEq . eqUse .~ createHeadLamp
|
||||
& itUse . eqEq . eqSite .~ GoesOnHead
|
||||
& itType . iyBase .~ HEADLAMP
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ const (noPic headLampShape)
|
||||
|
||||
headLampShape :: Shape
|
||||
@@ -270,7 +266,6 @@ powerLegs = defaultEquipment
|
||||
}
|
||||
& itUse . eqEq . eqSite .~ GoesOnLegs
|
||||
& itType . iyBase .~ POWERLEGS
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ const
|
||||
(noPic $ translateSH (V3 0 4 0) $ colorSH yellow $ upperPrismPoly 3 $ rectWH 2 2)
|
||||
speedLegs :: Item
|
||||
@@ -288,7 +283,6 @@ wristInvisibility = defaultEquipment
|
||||
& itUse . eqEq . eqOnEquip .~ overCID (crCamouflage .~ Invisible)
|
||||
& itUse . eqEq . eqOnRemove .~ overCID (crCamouflage .~ FullyVisible)
|
||||
& itType . iyBase .~ INVISIBILITYEQUIPMENT GoesOnWrist
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ const (noPic (colorSH chartreuse $ upperPrismPoly 3 $ rectWH 2 2))
|
||||
|
||||
overCID :: (Creature -> Creature) -> Item -> Creature -> World -> World
|
||||
|
||||
@@ -14,7 +14,6 @@ keyCard n = defaultEquipment
|
||||
, _itInvColor = aquamarine
|
||||
}
|
||||
& itType . iyBase .~ KEYCARD n
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ (const . noShape)
|
||||
(setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic)
|
||||
|
||||
@@ -32,7 +31,6 @@ latchkey _ = defaultEquipment
|
||||
-- , _itZoom = defaultItZoom
|
||||
, _itInvColor = yellow
|
||||
}
|
||||
& itDimension . dimPortage .~ WornItem
|
||||
& itDimension . dimSPic .~ ( \_ -> (,) emptySH $ setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) latchkeyPic
|
||||
)
|
||||
latchkeyPic :: Picture
|
||||
|
||||
@@ -9,6 +9,7 @@ import Dodge.Base
|
||||
import Dodge.Particle.Bullet.Spawn
|
||||
import Dodge.Creature.HandPos
|
||||
import Dodge.Movement.Turn
|
||||
import Dodge.Default.AimParams
|
||||
import Geometry
|
||||
import LensHelp
|
||||
|
||||
@@ -25,13 +26,15 @@ ruseAmmoParams = RightUse
|
||||
, _heldScroll = \_ _ -> id
|
||||
}
|
||||
|
||||
defaultAimParams :: AimParams
|
||||
defaultAimParams = AimParams
|
||||
{ _aimWeight = 0
|
||||
, _aimRange = 0
|
||||
, _aimZoom = ItZoom 20 0.2 1
|
||||
, _aimStance = OneHand
|
||||
}
|
||||
--defaultAimParams :: AimParams
|
||||
--defaultAimParams = AimParams
|
||||
-- { _aimWeight = 0
|
||||
-- , _aimRange = 0
|
||||
-- , _aimZoom = ItZoom 20 0.2 1
|
||||
-- , _aimStance = OneHand
|
||||
-- , _aimHandlePos = 10
|
||||
-- , _aimMuzPos = 20
|
||||
-- }
|
||||
useAmmoParams :: Maybe Float -> Item -> Creature -> World -> World
|
||||
useAmmoParams vfact it cr w = w & instantParticles .:~ aBulAt
|
||||
vfact
|
||||
|
||||
@@ -80,10 +80,6 @@ teslaGun = defaultBatteryGun
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 9
|
||||
, _dimCenter = V3 4 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 4
|
||||
,_muzPos = 4
|
||||
}
|
||||
, _dimSPic = teslaGunPic
|
||||
}
|
||||
, _itParams = teslaParams
|
||||
@@ -98,6 +94,8 @@ teslaGun = defaultBatteryGun
|
||||
]
|
||||
& itUse . useAim . aimWeight .~ 6
|
||||
& itUse . useAim . aimStance .~ TwoHandFlat
|
||||
& itUse . useAim . aimHandlePos .~ 4
|
||||
& itUse . useAim . aimMuzPos .~ 4
|
||||
& itType . iyBase .~ TESLAGUN
|
||||
teslaGunPic :: Item -> SPic
|
||||
teslaGunPic _ = noPic $ colorSH blue $
|
||||
@@ -241,7 +239,7 @@ lasWide n = lasGun
|
||||
dualBeam :: Item
|
||||
dualBeam = lasGun
|
||||
& itType . iyBase .~ DUALBEAM
|
||||
& itDimension . dimPortage . muzPos .~ 0
|
||||
& itUse . useAim . aimMuzPos .~ 0
|
||||
& itDimension .dimSPic .~ dualBeamPic
|
||||
& itParams .~ DualBeam
|
||||
{ _phaseV = 1
|
||||
@@ -306,7 +304,6 @@ lasGun = defaultAutoBatteryGun
|
||||
& itDimension .~ ItemDimension
|
||||
{ _dimRad = 10
|
||||
, _dimCenter = V3 15 0 0
|
||||
, _dimPortage = HeldItem 5 30
|
||||
, _dimSPic = lasGunPic
|
||||
}
|
||||
& itUse . rUse .~ shootLaser
|
||||
@@ -322,6 +319,8 @@ lasGun = defaultAutoBatteryGun
|
||||
& itUse . useAim . aimWeight .~ 6
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 30
|
||||
& itType . iyBase .~ LASGUN
|
||||
|
||||
lasGunPic :: Item -> SPic
|
||||
@@ -375,7 +374,6 @@ tractorGun = lasGun
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 10
|
||||
, _dimCenter = V3 15 0 0
|
||||
, _dimPortage = HeldItem 5 30
|
||||
, _dimSPic = tractorGunPic
|
||||
}
|
||||
, _itParams = Attracting {_attractionPower = 1}
|
||||
@@ -392,6 +390,8 @@ tractorGun = lasGun
|
||||
& itUse . useAim . aimWeight .~ 6
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 30
|
||||
& itType . iyBase .~ TRACTORGUN
|
||||
|
||||
tractorGunTweak :: TweakParam
|
||||
|
||||
@@ -46,10 +46,6 @@ defaultBangCane = defaultBulletWeapon
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 8
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 15
|
||||
}
|
||||
, _dimSPic = \it -> noPic $ baseCaneShape
|
||||
<> makeSingleClipAt (V3 5 0 3) it
|
||||
}
|
||||
@@ -67,6 +63,8 @@ defaultBangCane = defaultBulletWeapon
|
||||
, withMuzFlareI
|
||||
]
|
||||
& itUse . useAim . aimStance .~ OneHand
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 15
|
||||
& itType . iyBase .~ error "undefined bangCane baseitemtype"
|
||||
& itConsumption . laMax .~ 1
|
||||
& itConsumption . laCycle .~ [loadPartialInsert 10 1]
|
||||
@@ -87,10 +85,6 @@ volleyGun i = defaultBulletWeapon
|
||||
& itDimension .~ ItemDimension
|
||||
{ _dimRad = 8
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 15
|
||||
}
|
||||
, _dimSPic = \it -> noPic $
|
||||
colorSH red (foldMap
|
||||
((\y -> upperPrismPoly 3 $ map (+.+ V2 0 y) $ rectXH 15 2)
|
||||
@@ -101,6 +95,8 @@ volleyGun i = defaultBulletWeapon
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandFlat
|
||||
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 15
|
||||
& itConsumption . laMax .~ i
|
||||
& itParams .~ BulletShooter
|
||||
{ _muzVel = 0.8
|
||||
@@ -136,10 +132,6 @@ rifle = defaultBangCane
|
||||
{ _itDimension = ItemDimension
|
||||
{ _dimRad = 8
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 15
|
||||
}
|
||||
, _dimSPic = \it -> noPic $ baseRifleShape
|
||||
<> makeSingleClipAt (V3 5 0 3) it
|
||||
}
|
||||
@@ -287,15 +279,11 @@ miniGunX i = defaultAutoGun
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 20
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 20
|
||||
}
|
||||
, _dimSPic = miniGunXPictItem i
|
||||
}
|
||||
}
|
||||
& itDimension . dimPortage . muzPos .~ 40
|
||||
& itType . iyBase .~ MINIGUNX i
|
||||
& itUse . useAim . aimMuzPos .~ 40
|
||||
miniGunXPictItem :: Int -> Item -> SPic
|
||||
miniGunXPictItem i it = miniGunXPict i spin (_laLoaded $ _itConsumption it)
|
||||
where
|
||||
|
||||
@@ -60,10 +60,6 @@ bangRod = defaultBulletWeapon
|
||||
& itDimension .~ ItemDimension
|
||||
{ _dimRad = 12
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 30
|
||||
}
|
||||
, _dimSPic = \it -> noPic $ baseRodShape
|
||||
<> makeSingleClipAt (V3 5 0 3) it
|
||||
}
|
||||
@@ -74,6 +70,8 @@ bangRod = defaultBulletWeapon
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ OneHand
|
||||
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 30
|
||||
& itConsumption . laAmmoType . amBulEff .~ expireAndDamage heavyBulDams
|
||||
baseRodShape :: Shape
|
||||
baseRodShape = colorSH orange $ upperPrismPoly 3 $ rectXH 20 2
|
||||
|
||||
@@ -71,15 +71,13 @@ bangStick i = defaultBulletWeapon
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 5
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 10
|
||||
}
|
||||
, _dimSPic = \it -> noPic $ baseStickShapeX i
|
||||
<> stickClip it
|
||||
}
|
||||
}
|
||||
& itType . iyBase .~ BANGSTICK i
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 10
|
||||
& itConsumption . laMax .~ i
|
||||
& itConsumption . laCycle .~ [loadPartialInsert 10 1]
|
||||
baseStickShapeX :: Int -> Shape
|
||||
@@ -190,7 +188,7 @@ smg = autoPistol -- & some parameter affecting stability
|
||||
& itUse . useMods .~ (ammoCheckI : smgAfterHamMods)
|
||||
& itType . iyBase .~ SMG
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itDimension . dimPortage . handlePos .~ 2
|
||||
& itUse . useAim . aimHandlePos .~ 2
|
||||
& itParams . torqueAfter .~ 0.05
|
||||
& itDimension . dimSPic .~ \it -> noPic (baseSMGShape
|
||||
<> makeTinClipAt 0 (V3 7 (-2) 0) it)
|
||||
|
||||
@@ -103,10 +103,6 @@ bangCone = defaultBulletWeapon
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 8
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 15
|
||||
}
|
||||
, _dimSPic = const $ noPic $ colorSH cyan $ upperPrismPoly 3 (rectXH 5 2)
|
||||
<> upperPrismPoly 6 (reverse $ rectNSWE 4 (-4) 5 15)
|
||||
}
|
||||
@@ -127,6 +123,8 @@ bangCone = defaultBulletWeapon
|
||||
, withRandomItemUpdate coneRandItemUpdate
|
||||
, withRandomItemParams coneRandItemParams
|
||||
]
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 15
|
||||
& itType . iyBase .~ BANGCONE
|
||||
& itConsumption . laMax .~ 5
|
||||
& itConsumption . laCycle .~ [loadEject 5, loadInsert 20 , loadPrime 5]
|
||||
@@ -148,10 +146,6 @@ blunderbuss = bangCone
|
||||
{_itDimension = ItemDimension
|
||||
{ _dimRad = 8
|
||||
, _dimCenter = V3 5 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 30
|
||||
}
|
||||
, _dimSPic = const $ noPic $ colorSH cyan $ upperPrismPoly 3 (rectXH 20 2)
|
||||
<> upperPrismPoly 6 (reverse $ rectNSWE 4 (-4) 20 30)
|
||||
}
|
||||
@@ -160,6 +154,8 @@ blunderbuss = bangCone
|
||||
& itConsumption . laCycle .~ [loadEject 5, loadInsert 30 , loadPrime 5]
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimWeight .~ 6
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 30
|
||||
& itType . iyBase .~ BLUNDERBUSS
|
||||
grapeCannon :: Int -> Item
|
||||
grapeCannon i = blunderbuss
|
||||
|
||||
@@ -60,10 +60,6 @@ launcher = defaultWeapon
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 9
|
||||
, _dimCenter = V3 10 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{_handlePos = 5
|
||||
,_muzPos = 20
|
||||
}
|
||||
, _dimSPic = launcherPic
|
||||
}
|
||||
}
|
||||
@@ -79,6 +75,8 @@ launcher = defaultWeapon
|
||||
& itUse . useAim . aimWeight .~ 8
|
||||
& itUse . useAim . aimRange .~ 0.5
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 20
|
||||
& itType . iyBase .~ LAUNCHER
|
||||
& itType . iyModules . at ModLauncherHoming ?~ EMPTYMODULE
|
||||
|
||||
|
||||
@@ -36,8 +36,6 @@ autoDetector dt = defaultEquipment
|
||||
& itUse . eqEq . eqParams .~ EquipCounter 0
|
||||
& itUse . eqEq . eqViewDist ?~ 350
|
||||
& itType . iyBase .~ AUTODETECTOR dt
|
||||
& itDimension . dimPortage
|
||||
.~ WornItem
|
||||
& itDimension . dimSPic .~ const
|
||||
(noPic (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2))
|
||||
-- , _itEffect = autoRadarEffect
|
||||
|
||||
@@ -39,7 +39,6 @@ sonicGun = defaultAutoGun
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 10
|
||||
, _dimCenter = V3 15 0 0
|
||||
, _dimPortage = HeldItem 5 25
|
||||
, _dimSPic = const $ noPic baseSonicShape
|
||||
}
|
||||
}
|
||||
@@ -53,6 +52,7 @@ sonicGun = defaultAutoGun
|
||||
& itUse . useAim . aimWeight .~ 6
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimMuzPos .~ 25
|
||||
& itType . iyBase .~ SONICGUN
|
||||
baseSonicShape :: Shape
|
||||
baseSonicShape = colorSH rose $ upperPrismPoly 3 $ rectXH 25 2
|
||||
|
||||
@@ -139,10 +139,6 @@ flameThrower = defaultAutoGun
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 7
|
||||
, _dimCenter = V3 9 0 0
|
||||
, _dimPortage = HeldItem
|
||||
{ _handlePos = 0
|
||||
, _muzPos = 18
|
||||
}
|
||||
, _dimSPic = flamerPic
|
||||
}
|
||||
-- , _itFloorPict = flamerPic
|
||||
@@ -159,6 +155,8 @@ flameThrower = defaultAutoGun
|
||||
& itUse . useAim . aimWeight .~ 5
|
||||
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomMax = 5, _itZoomMin = 1.5}
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimHandlePos .~ 0
|
||||
& itUse . useAim . aimMuzPos .~ 18
|
||||
& itType . iyBase .~ FLAMETHROWER
|
||||
|
||||
aGasCloud :: Float -> Point2 -> Float -> Creature -> World -> World
|
||||
|
||||
@@ -391,9 +391,9 @@ withMuzFlareI f it cr w = makeTlsTimeRadColPos 2 100 (V3 1 1 0.5) flashPos
|
||||
cdir = _crDir cr
|
||||
|
||||
muzzleOffset :: Creature -> Item -> Point3
|
||||
muzzleOffset cr it = V3 (holdOffset + 5 + _muzPos dimPort - _handlePos dimPort) 0 0
|
||||
muzzleOffset cr it = V3 (holdOffset + 5 + _aimMuzPos dimPort - _aimHandlePos dimPort) 0 0
|
||||
where
|
||||
dimPort = _dimPortage $ _itDimension it
|
||||
dimPort = _useAim $ _itUse it
|
||||
holdOffset
|
||||
| crInAimStance OneHand cr = 10
|
||||
| otherwise = 0
|
||||
|
||||
@@ -67,7 +67,7 @@ updateTurret rotSpeed mc w
|
||||
cid = IM.newKey (_creatures w')
|
||||
thecreature = defaultCreature
|
||||
& crID .~ cid
|
||||
& crInv . at 0 ?~ (_tuWeapon (_mcType mc) & itDimension . dimPortage . handlePos -~ 10
|
||||
& crInv . at 0 ?~ (_tuWeapon (_mcType mc) & itUse . useAim . aimHandlePos -~ 10
|
||||
& itConsumption . laLoaded .~ 1
|
||||
)
|
||||
& crPos .~ mcpos
|
||||
|
||||
Reference in New Issue
Block a user