Commit before complicating zoning

This commit is contained in:
2022-06-28 14:35:49 +01:00
parent 9801a40b9e
commit 4965934502
6 changed files with 57 additions and 48 deletions
+3 -5
View File
@@ -95,15 +95,13 @@ functionalUpdate cfig w = checkEndGame
. updateRBList
. updateBounds cfig -- where should this go? next to update camera?
$ updateCloseObjects w
where
--updatedLightSources = mapMaybe (\b -> _tlsUpdate b w b) $ _tempLightSources w
zoneClouds :: World -> World
zoneClouds w = w & set (cloudsZone . znObjects) (foldl' (flip cloudInZone) IM.empty (_clouds w))
zoneClouds w = w & set cloudsZone (foldl' (flip cloudInZone) (Zoning mempty) (_clouds w))
where
cloudInZone cl = insertInZoneWith x y (++) [cl]
cloudInZone cl = insertInZoneWith p (++) [cl]
where
V2 x y = clZoneOfPoint $ stripZ $ _clPos cl
p = clZoneOfPoint $ stripZ $ _clPos cl
updateWorldSelect :: World -> World
updateWorldSelect w = case w ^? mouseButtons . ix ButtonLeft of