Remove functions from left use item use field
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Item.Equipment.Booster
|
||||
( boosterGun
|
||||
, boostSelfL
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Base
|
||||
@@ -112,7 +113,7 @@ boosterGun :: Item
|
||||
boosterGun = defaultLeftItem
|
||||
{ _itInvColor = cyan
|
||||
, _itConsumption = defaultChargeable
|
||||
, _itUse = luseInstantNoH $ boostSelfL 10
|
||||
, _itUse = luseInstantNoH LBoost
|
||||
, _itEffect = resetAttachmentID
|
||||
}
|
||||
& itType . iyBase .~ LEFT BOOSTER
|
||||
|
||||
@@ -106,7 +106,6 @@ lasCircle = lasGun
|
||||
& itUse . useAim . aimWeight .~ 6
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
where
|
||||
|
||||
lasWide :: Int -> Item
|
||||
lasWide n = lasGun
|
||||
@@ -114,7 +113,6 @@ lasWide n = lasGun
|
||||
& itParams . lasColor .~ yellow
|
||||
& itParams . lasDamage .~ 2
|
||||
& itUse . useMods .~ LasWideMod n
|
||||
where
|
||||
--lasWidePulse :: Item
|
||||
--lasWidePulse = lasGun
|
||||
-- & itType . iyBase .~ LASGUNWIDEPULSE
|
||||
@@ -201,7 +199,6 @@ dualBeam = lasGun
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandFlat
|
||||
& itType . iyModules . at ModDualBeam ?~ EMPTYMODULE
|
||||
where
|
||||
--lasSwing :: Item
|
||||
--lasSwing = lasGun
|
||||
-- & itType . iyBase .~ LASGUNSWING
|
||||
|
||||
@@ -136,7 +136,6 @@ miniGunUse i = defaultrUse
|
||||
& rUse .~ HeldUseAmmoParams
|
||||
& useDelay .~ NoDelay
|
||||
& useMods .~ MiniGunMod i
|
||||
where
|
||||
|
||||
miniGunX :: Int -> Item
|
||||
miniGunX i = defaultAutoGun
|
||||
|
||||
@@ -2,13 +2,9 @@ module Dodge.Item.Weapon.Utility where
|
||||
import Dodge.Data
|
||||
import Dodge.Base.Coordinate
|
||||
import Dodge.Default
|
||||
--import Dodge.Picture.Layer
|
||||
import Dodge.Creature.Action
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
import Dodge.Item.Weapon.ExtraEffect
|
||||
import Dodge.Wall.ForceField
|
||||
import Dodge.Wall.Move
|
||||
--import Sound.Data
|
||||
import Geometry
|
||||
import Picture
|
||||
import qualified IntMapHelp as IM
|
||||
@@ -16,10 +12,7 @@ import Shape
|
||||
import ShapePicture
|
||||
|
||||
import Data.Maybe
|
||||
--import qualified Data.Map.Strict as M
|
||||
import Control.Lens
|
||||
--import Control.Monad
|
||||
|
||||
rewindGun :: Item
|
||||
rewindGun = defaultLeftItem
|
||||
{ _itInvColor = cyan
|
||||
@@ -29,7 +22,7 @@ rewindGun = defaultLeftItem
|
||||
}
|
||||
, _itEffect = ItRewindEffect rewindEffect []
|
||||
, _itUse = defaultlUse
|
||||
& lUse .~ useRewindGun
|
||||
& lUse .~ LRewind --useRewindGun
|
||||
& eqEq . eqSite .~ GoesOnChest
|
||||
}
|
||||
& itType . iyBase .~ LEFT REWINDER
|
||||
@@ -46,24 +39,10 @@ rewindEffect itm cr w
|
||||
w' = w & rewindWorlds .~ []
|
||||
& timeFlow .~ NormalTimeFlow
|
||||
|
||||
useRewindGun :: Item -> Creature -> World -> World
|
||||
useRewindGun _ _ w = case _rewindWorlds w of
|
||||
[w'] -> rewindusing w' [w']
|
||||
(w':ws) -> rewindusing w' ws
|
||||
_ -> w
|
||||
where
|
||||
rewindusing w' ws = w
|
||||
& maybeWorld .~ Just' ( w'
|
||||
-- & creatures . ix (_crID cr) .~ cr
|
||||
& upbuts
|
||||
& rewindWorlds .~ ws
|
||||
)
|
||||
upbuts = (keys .~ _keys w) . (mouseButtons .~ _mouseButtons w)
|
||||
|
||||
-- needs to shift this item to the current inventory slot
|
||||
shrinkGun :: Item
|
||||
shrinkGun = defaultLeftItem
|
||||
{_itUse = defaultlUse {_lUse = hammerCheckL useShrinkGun}
|
||||
{_itUse = defaultlUse & lUse .~ LShrink -- hammerCheckL useShrinkGun
|
||||
-- , _itFloorPict = shrinkGunPic
|
||||
, _itAttachment = AttachBool True
|
||||
}
|
||||
@@ -72,24 +51,12 @@ shrinkGun = defaultLeftItem
|
||||
shrinkGunPic :: Item -> SPic
|
||||
shrinkGunPic _ = noPic $ colorSH violet $ upperPrismPoly 5 $ square 5
|
||||
|
||||
-- be careful changing this around; potential problems include updating the
|
||||
-- creature but using the old crInvSel value
|
||||
-- 22.05.23 this has been changed from using invids to items
|
||||
useShrinkGun :: Item -> Creature -> World -> World
|
||||
useShrinkGun it cr w = if _atBool $ _itAttachment it
|
||||
then tryResize 0.5 $ stripNoItems cr . f False UndroppableIdentified . dropExcept cr invid
|
||||
else tryResize 1 $ f True Uncursed . setMinInvSize defaultInvSize cr
|
||||
where
|
||||
invid = _ipInvID $ _itPos it
|
||||
tryResize x g = maybe w g $ sizeSelf x cr w
|
||||
f isInUse cstatus = creatures . ix (_crID cr) . crInv . ix invid %~
|
||||
( (itAttachment . atBool .~ isInUse) . (itCurseStatus .~ cstatus) )
|
||||
|
||||
blinkGun :: Item
|
||||
blinkGun = defaultLeftItem
|
||||
{ _itInvColor = cyan
|
||||
, _itUse = defaultlUse
|
||||
& lUse .~ hammerCheckL (shootL $ const blinkAction)
|
||||
& lUse .~ LBlink --hammerCheckL (shootL $ const blinkAction)
|
||||
& eqEq . eqSite .~ GoesOnWrist
|
||||
-- , _itFloorPict = const . noPic . colorSH chartreuse $ upperPrismPoly 2 $ square 2
|
||||
}
|
||||
@@ -98,7 +65,7 @@ blinkGun = defaultLeftItem
|
||||
unsafeBlinkGun :: Item
|
||||
unsafeBlinkGun = blinkGun
|
||||
& itType . iyBase .~ LEFT BLINKERUNSAFE
|
||||
& itUse . lUse .~ hammerCheckL (shootL $ const unsafeBlinkAction)
|
||||
& itUse . lUse .~ LUnsafeBlink --hammerCheckL (shootL $ const unsafeBlinkAction)
|
||||
& itUse . eqEq . eqViewDist ?~ 400
|
||||
|
||||
--effectGun :: String -> (Creature -> World -> World) -> Item
|
||||
|
||||
Reference in New Issue
Block a user