Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
@@ -13,7 +13,7 @@ import LensHelp
|
||||
|
||||
aRadarPulse :: ObjectType -> Creature -> World -> World
|
||||
aRadarPulse ob cr =
|
||||
cWorld . radarSweeps
|
||||
cWorld . lWorld . radarSweeps
|
||||
.:~ RadarSweep
|
||||
{ _rsTimer = 100
|
||||
, _rsRad = 0
|
||||
@@ -35,7 +35,7 @@ updateRadarSweep w pt
|
||||
blipsF = findBlips ob
|
||||
bf = makeBlip ob
|
||||
x = _rsTimer pt
|
||||
putBlips = cWorld . radarBlips .++~ blips
|
||||
putBlips = cWorld . lWorld . radarBlips .++~ blips
|
||||
blips = map bf circPoints
|
||||
circPoints = blipsF p r w
|
||||
r = fromIntegral (400 - x * 4)
|
||||
@@ -66,13 +66,13 @@ blipAt r col i p =
|
||||
}
|
||||
|
||||
crBlips :: Point2 -> Float -> World -> [Point2]
|
||||
crBlips p r = IM.elems . IM.filter f . fmap _crPos . IM.filter g . _creatures . _cWorld
|
||||
crBlips p r = IM.elems . IM.filter f . fmap _crPos . IM.filter g . _creatures . _lWorld . _cWorld
|
||||
where
|
||||
f q = dist p q <= r && dist p q > r - 100
|
||||
g cr = _crID cr /= 0
|
||||
|
||||
itemBlips :: Point2 -> Float -> World -> [Point2]
|
||||
itemBlips p r = IM.elems . IM.filter f . fmap _flItPos . _floorItems . _cWorld
|
||||
itemBlips p r = IM.elems . IM.filter f . fmap _flItPos . _floorItems . _lWorld . _cWorld
|
||||
where
|
||||
f q = dist p q <= r && dist p q > r - 4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user