Comment out unused code
This commit is contained in:
+28
-26
@@ -12,7 +12,7 @@ import Color
|
||||
import Control.Monad
|
||||
import Data.Maybe
|
||||
import Dodge.Base.Collide
|
||||
import Dodge.Base.Coordinate
|
||||
--import Dodge.Base.Coordinate
|
||||
import Dodge.Creature.Action.Blink
|
||||
import Dodge.Data.ComposedItem
|
||||
import Dodge.Data.DoubleTree
|
||||
@@ -406,13 +406,14 @@ removeAmmoFromMag x mid cr = fromMaybe id $ do
|
||||
-~ x
|
||||
|
||||
getBulletType ::
|
||||
-- LabelDoubleTree ComposeLinkType Item ->
|
||||
LabelDoubleTree ComposeLinkType Item ->
|
||||
LabelDoubleTree ComposeLinkType Item ->
|
||||
Muzzle ->
|
||||
Creature ->
|
||||
World ->
|
||||
-- Muzzle ->
|
||||
-- Creature ->
|
||||
-- World ->
|
||||
Maybe Bullet
|
||||
getBulletType itmtree magtree mz cr w =
|
||||
--getBulletType itmtree magtree mz cr w =
|
||||
getBulletType magtree =
|
||||
magtree ^? ldtValue . itConsumables . magParams . ampBullet
|
||||
-- <&> buTrajectory .~ btraj
|
||||
<&> buPayload .~ bpayload
|
||||
@@ -431,25 +432,25 @@ getBulletType itmtree magtree mz cr w =
|
||||
attree <- lookup AmmoEffectLink (magtree ^. ldtLeft)
|
||||
attree ^? ldtValue . itUse . ubMod . bmEffect
|
||||
|
||||
getBulletTrajectory ::
|
||||
Muzzle ->
|
||||
Item ->
|
||||
BulletTrajectoryType ->
|
||||
Point2 ->
|
||||
Creature ->
|
||||
World ->
|
||||
BulletTrajectory
|
||||
getBulletTrajectory mz itm bt tp cr w = case bt of
|
||||
BasicBulletTrajectoryType -> BasicBulletTrajectory
|
||||
FlechetteTrajectoryType -> FlechetteTrajectory tp
|
||||
BezierTrajectoryType -> BezierTrajectory bulpos tp (mouseWorldPos (w ^. input) (w ^. wCam))
|
||||
MagnetTrajectoryType -> MagnetTrajectory tp
|
||||
where
|
||||
(moff, _) = heldItemOrient2D itm cr (_mzPos mz + V2 0 offset) (_mzRot mz)
|
||||
bulpos = _crPos cr + rotateV (_crDir cr) moff
|
||||
offset = case itm ^? itUse . heldParams . randomOffset of
|
||||
Just x | x /= 0 -> fst . randomR (- x, x) $ _randGen w
|
||||
_ -> 0
|
||||
--getBulletTrajectory ::
|
||||
-- Muzzle ->
|
||||
-- Item ->
|
||||
-- BulletTrajectoryType ->
|
||||
-- Point2 ->
|
||||
-- Creature ->
|
||||
-- World ->
|
||||
-- BulletTrajectory
|
||||
--getBulletTrajectory mz itm bt tp cr w = case bt of
|
||||
-- BasicBulletTrajectoryType -> BasicBulletTrajectory
|
||||
-- FlechetteTrajectoryType -> FlechetteTrajectory tp
|
||||
-- BezierTrajectoryType -> BezierTrajectory bulpos tp (mouseWorldPos (w ^. input) (w ^. wCam))
|
||||
-- MagnetTrajectoryType -> MagnetTrajectory tp
|
||||
-- where
|
||||
-- (moff, _) = heldItemOrient2D itm cr (_mzPos mz + V2 0 offset) (_mzRot mz)
|
||||
-- bulpos = _crPos cr + rotateV (_crDir cr) moff
|
||||
-- offset = case itm ^? itUse . heldParams . randomOffset of
|
||||
-- Just x | x /= 0 -> fst . randomR (- x, x) $ _randGen w
|
||||
-- _ -> 0
|
||||
|
||||
shootBullet ::
|
||||
LabelDoubleTree ComposeLinkType Item ->
|
||||
@@ -458,7 +459,8 @@ shootBullet ::
|
||||
World ->
|
||||
World
|
||||
shootBullet itmtree cr (mz, x, magtree) w = fromMaybe w $ do
|
||||
thebullet <- getBulletType itmtree magtree mz cr w
|
||||
-- thebullet <- getBulletType itmtree magtree mz cr w
|
||||
thebullet <- getBulletType magtree
|
||||
return $ foldl' (&) w (replicate x (makeBullet' thebullet (itmtree ^. ldtValue) cr mz))
|
||||
|
||||
makeBullet' :: Bullet -> Item -> Creature -> Muzzle -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user