Remove (by commenting out) module item-type system
This commit is contained in:
+9
-11
@@ -3,9 +3,6 @@ module Dodge.HeldUse
|
||||
(heldEffect
|
||||
, mcUseHeld
|
||||
)
|
||||
-- ( heldEffect
|
||||
-- , mcUseHeld
|
||||
-- )
|
||||
where
|
||||
|
||||
import Dodge.Base.Coordinate
|
||||
@@ -45,13 +42,6 @@ import RandomHelp
|
||||
--import Sound.Data
|
||||
--import Data.Foldable
|
||||
|
||||
--heldEffect :: HeldMod -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
|
||||
--heldEffect effecttype = case effecttype of
|
||||
-- PistolMod -> bulGunEffect
|
||||
---- FireRemoteShellMod -> undefined
|
||||
-- ExplodeRemoteShellMod -> undefined
|
||||
-- DoNothingMod -> const $ const id
|
||||
|
||||
heldEffect :: LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
|
||||
heldEffect = hammerCheck $ useTimeCheck heldEffectMuzzles
|
||||
|
||||
@@ -280,14 +270,22 @@ getBulletType :: LabelDoubleTree ComposeLinkType Item
|
||||
-> Maybe Bullet
|
||||
getBulletType itmtree magtree mz cr w = magtree ^? ldtValue . itUse . amagParams . ampBullet
|
||||
<&> buTrajectory .~ btraj
|
||||
<&> buPayload .~ bpayload
|
||||
<&> buEffect .~ beffect
|
||||
where
|
||||
-- consider modifying other parameters here too
|
||||
btraj = fromMaybe BasicBulletTrajectory $ do
|
||||
targetingtree <- lookup WeaponTargetingLink (itmtree ^. ldtRight) -- left or right for these
|
||||
tp <- targetingtree ^? ldtValue . itUse . tgPos . _Just
|
||||
attree <- lookup AmmoTargetingLink (magtree ^. ldtLeft)
|
||||
bt <- attree ^? ldtValue . itUse . btuBulletTrajectory
|
||||
bt <- attree ^? ldtValue . itUse . buMod . bmTrajectory
|
||||
return $ getBulletTrajectory mz (itmtree ^. ldtValue) bt tp cr w
|
||||
bpayload = fromMaybe BulSpark $ do
|
||||
attree <- lookup AmmoPayloadLink (magtree ^. ldtLeft)
|
||||
attree ^? ldtValue . itUse . buMod . bmPayload
|
||||
beffect = fromMaybe DestroyBullet $ do
|
||||
attree <- lookup AmmoEffectLink (magtree ^. ldtLeft)
|
||||
attree ^? ldtValue . itUse . buMod . bmEffect
|
||||
|
||||
getBulletTrajectory :: Muzzle -> Item
|
||||
-> BulletTrajectoryType -> Point2 -> Creature -> World -> BulletTrajectory
|
||||
|
||||
Reference in New Issue
Block a user