Refactor clouds

This commit is contained in:
2025-06-24 13:28:17 +01:00
parent b1041d1eb0
commit 444be7b49c
12 changed files with 80 additions and 140 deletions
+1 -9
View File
@@ -15,22 +15,14 @@ makeGasCloud ::
Point2 ->
World ->
World
makeGasCloud pos vel w =
w
& cWorld . lWorld . clouds .:~ theCloud
makeGasCloud pos vel = cWorld . lWorld . clouds .:~ theCloud
where
-- & randGen .~ g
theCloud =
Cloud
{ _clPos = addZ 20 pos
, _clVel = addZ 0 vel
-- , _clPict = CloudColor 50 -- (withAlpha 0.5 col)
, _clAlt = 25
, _clTimer = 400
, _clType = GasCloud
}
-- (col, g) = runState (takeOne [green, yellow]) $ _randGen w
{- Attach poison cloud damage to creatures near cloud. -}