Refactor crPos to be a V3
This commit is contained in:
@@ -10,6 +10,7 @@ import Dodge.Zoning.Common
|
||||
import FoldableHelp
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
import Linear
|
||||
|
||||
crIXsNearPoint :: Point2 -> World -> IS.IntSet
|
||||
crIXsNearPoint = nearPoint crZoneSize _crZoning
|
||||
@@ -42,7 +43,7 @@ crZoneSize :: Float
|
||||
crZoneSize = 15
|
||||
|
||||
zoneOfCr :: Creature -> [Int2]
|
||||
zoneOfCr cr = zoneOfCirc crZoneSize (_crPos cr) (crRad $ cr ^. crType)
|
||||
zoneOfCr cr = zoneOfCirc crZoneSize (cr ^. crPos . _xy) (crRad $ cr ^. crType)
|
||||
|
||||
minCrIXOn :: Ord a => (Creature -> a) -> IS.IntSet -> World -> Maybe Creature
|
||||
minCrIXOn f is w = fst <$> IS.foldl' g Nothing is
|
||||
|
||||
Reference in New Issue
Block a user