Make item use mods an external function
This commit is contained in:
@@ -2,13 +2,9 @@ module Dodge.Combine.Module where
|
||||
import Dodge.Data
|
||||
import Dodge.Tesla
|
||||
import Dodge.Item.Weapon.ExtraEffect
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
import LensHelp
|
||||
import Geometry
|
||||
import Dodge.Beam
|
||||
import Dodge.Base.Coordinate
|
||||
|
||||
import Data.Maybe
|
||||
|
||||
moduleModification :: ItemModuleType -> Item -> Item
|
||||
moduleModification imt = case imt of
|
||||
@@ -45,10 +41,10 @@ moduleModification imt = case imt of
|
||||
& itUse . useAim . aimRange .~ 0
|
||||
-- a better option would be to involve a "scope" centered on the firing
|
||||
-- position
|
||||
directedTelPos it cr w = (p,a)
|
||||
where
|
||||
p = fromMaybe (_crPos cr) $ it ^? itTargeting . tgPos . _Just
|
||||
a = argV (mouseWorldPos w -.- p)
|
||||
-- directedTelPos it cr w = (p,a)
|
||||
-- where
|
||||
-- p = fromMaybe (_crPos cr) $ it ^? itTargeting . tgPos . _Just
|
||||
-- a = argV (mouseWorldPos w -.- p)
|
||||
|
||||
applyModules :: Item -> Item
|
||||
applyModules it = foldr moduleModification it (_iyModules (_itType it))
|
||||
|
||||
Reference in New Issue
Block a user