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