This commit is contained in:
2024-09-27 23:10:01 +01:00
parent 6c3d0d5def
commit d1690ed3ac
10 changed files with 124 additions and 194 deletions
-28
View File
@@ -1,28 +0,0 @@
module Dodge.Item.Weapon.Launcher (
explodeRemoteRocket,
) where
import Dodge.SoundLogic
import Control.Lens
import Dodge.Data.World
--import Dodge.Item.Location
import Dodge.Payload
explodeRemoteRocket ::
-- | Item id
Maybe Int ->
-- | Projectile id
Int ->
World ->
World
explodeRemoteRocket mitid pjid w =
w
& 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