Separate out concrete part of world
This commit is contained in:
@@ -9,8 +9,8 @@ updateTractorBeam :: World -> TractorBeam -> (World, Maybe TractorBeam)
|
||||
updateTractorBeam w pj
|
||||
| _tbTime pj <= 0 = (w, Nothing)
|
||||
| otherwise = (w
|
||||
& creatures %~ IM.map (tractCr pullVel pos outpos)
|
||||
& floorItems %~ IM.map (tractFlIt pullVel pos outpos)
|
||||
& cWorld . creatures %~ IM.map (tractCr pullVel pos outpos)
|
||||
& cWorld . floorItems %~ IM.map (tractFlIt pullVel pos outpos)
|
||||
, Just (pj & tbTime -~ 1))
|
||||
where
|
||||
pullVel = _tbVel pj
|
||||
|
||||
Reference in New Issue
Block a user