Unify launcher projectiles
This commit is contained in:
@@ -24,7 +24,7 @@ import Dodge.Creature.HandPos
|
||||
import Dodge.Data.World
|
||||
import Dodge.Gas
|
||||
import Dodge.Item.Weapon.BatteryGuns
|
||||
import Dodge.Item.Weapon.Launcher
|
||||
--import Dodge.Item.Weapon.Launcher
|
||||
import Dodge.Item.Weapon.Radar
|
||||
import Dodge.Item.Weapon.Shatter
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
@@ -323,7 +323,7 @@ useHeld hu = case hu of
|
||||
-- HeldSonicWave -> aSonicWave
|
||||
HeldForceField -> useForceFieldGun . _ldtValue
|
||||
-- HeldShatter -> shootShatter . _ldtValue
|
||||
HeldExplodeRemoteShell itid pjid -> const $ const $ explodeRemoteRocket itid pjid
|
||||
-- HeldExplodeRemoteShell itid pjid -> const $ const $ explodeRemoteRocket itid pjid
|
||||
|
||||
--usePjCreation :: LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
|
||||
--usePjCreation itm cr = fromMaybe id $ do
|
||||
@@ -507,13 +507,13 @@ createProjectile magtree muz itm cr = fromMaybe failsound $ do
|
||||
-- matype <- ammoitem ^? itUse . amagType
|
||||
-- guard $ matype == ProjectileAmmo
|
||||
j <- ammoitem ^? itLocation . ilInvID
|
||||
return $ fireTrackingShell (mscreen ^? _Just . ldtValue) ammoitem muz itm cr . extrafuncs j
|
||||
-- pt <- ammoitem ^? itUse . amagParams . ampPjCreation
|
||||
return $ case mscreen of
|
||||
Nothing -> fireShell ammoitem muz itm cr . extrafuncs j
|
||||
Just stree -> fireTrackingShell
|
||||
(stree ^. ldtValue . itID)
|
||||
(stree ^?! ldtValue . itLocation . ilInvID) ammoitem muz itm cr
|
||||
. extrafuncs j
|
||||
-- return $ case mscreen of
|
||||
-- Nothing -> fireShell ammoitem muz itm cr . extrafuncs j
|
||||
-- Just stree -> fireTrackingShell
|
||||
-- (stree ^? ldtValue) ammoitem muz itm cr
|
||||
-- . extrafuncs j
|
||||
where
|
||||
--extrafuncs j = cancelanyreloading . startthesound . useammo j
|
||||
extrafuncs j = startthesound . useammo j
|
||||
|
||||
Reference in New Issue
Block a user