Add bee pheremones

This commit is contained in:
2026-04-23 10:30:43 +01:00
parent f6e257464d
commit d06660fd06
8 changed files with 212 additions and 167 deletions
+10
View File
@@ -316,6 +316,7 @@ functionalUpdate =
(updateIMl' (_linearShockwaves . _lWorld . _cWorld) updateLinearShockwave)
. over uvWorld (updateIMl' (_projectiles . _lWorld . _cWorld) updateProjectile)
. over uvWorld updateClouds
. over uvWorld updateBeePheremones
. over uvWorld updateGasses
. over uvWorld updateDusts
. over uvWorld updateGusts
@@ -779,6 +780,15 @@ updateSparks = updateObjCatMaybes sparks updateSpark
updateClouds :: World -> World
updateClouds w = updateObjMapMaybe clouds (updateCloud w) w
updateBeePheremones :: World -> World
updateBeePheremones w = updateObjMapMaybe beePheremones updateBeePheremone w
updateBeePheremone :: BeePheremone -> Maybe BeePheremone
updateBeePheremone bp
| x <- bp ^. bpTimer
, x <= 0 = Nothing
| otherwise = Just $ bp & bpTimer -~ 1
updateGasses :: World -> World
updateGasses = updateObjCatMaybes gasses updateGas