Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+3 -5
View File
@@ -2,13 +2,11 @@
module Dodge.Projectile.Update where
--import qualified Data.Set as S
import Control.Lens
import qualified Data.Map.Strict as M
import Data.Maybe
import Dodge.Base
import Dodge.Data
import Dodge.Data.World
import Dodge.Default.Weapon
import Dodge.EnergyBall
import Dodge.Item.Location
@@ -71,7 +69,7 @@ explodeRemoteRocket' mitid thepj w =
itid <- mitid
itpos <- w ^? cWorld . itemLocations . ix itid
return $
(pointerToItemLocation itpos . itUse . rUse .~ HeldDoNothing)
(pointerToItemLocation itpos . itUse . heldUse .~ HeldDoNothing)
. (cWorld . projectiles . ix pjid . prjUpdates .~ [PJRetireRemote itid 30 pjid])
pjid = _prjID thepj
@@ -127,7 +125,7 @@ retireRemoteProj'' itid pjid w =
w
& pointerToItemLocation (_itemLocations (_cWorld w) IM.! itid)
%~ ( (itScope . scopePos .~ V2 0 0)
. (itUse . rUse .~ HeldFireRemoteShell)
. (itUse . heldUse .~ HeldFireRemoteShell)
)
& cWorld . props %~ IM.delete pjid