Separate out concrete part of world

This commit is contained in:
2022-07-25 12:10:50 +01:00
parent 3354d108be
commit b2efbd2b3e
134 changed files with 933 additions and 930 deletions
+2 -2
View File
@@ -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