Unify launcher projectiles
This commit is contained in:
@@ -2,6 +2,7 @@ module Dodge.Item.Weapon.Launcher (
|
||||
explodeRemoteRocket,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
--import Dodge.Item.Location
|
||||
@@ -9,18 +10,19 @@ import Dodge.Payload
|
||||
|
||||
explodeRemoteRocket ::
|
||||
-- | Item id
|
||||
Int ->
|
||||
Maybe Int ->
|
||||
-- | Projectile id
|
||||
Int ->
|
||||
World ->
|
||||
World
|
||||
explodeRemoteRocket itid pjid w =
|
||||
explodeRemoteRocket mitid pjid w =
|
||||
w
|
||||
& cWorld . lWorld . projectiles . ix pjid . prjUpdates .~ [PJRetireRemote itid 30 pjid]
|
||||
& cWorld . lWorld . projectiles . ix pjid . prjUpdates .~ [PJRetireRemote mitid 30 pjid]
|
||||
& cWorld . lWorld . projectiles . ix pjid . prjDraw .~ DrawBlankProjectile
|
||||
-- & itPoint . itUse . heldUse .~ HeldDoNothing
|
||||
-- & itPoint . itUse . heldMods .~ DoNothingMod
|
||||
& usePayload (_prjPayload thepj) (_prjPos thepj)
|
||||
& stopSoundFrom (ShellSound pjid)
|
||||
where
|
||||
-- itPoint = pointerToItemLocation $ w ^?! cWorld . lWorld . itemLocations . ix itid-- _itemLocations (_cWorld w) IM.! itid
|
||||
thepj = w ^?! cWorld . lWorld . projectiles . ix pjid
|
||||
|
||||
Reference in New Issue
Block a user