Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+9 -8
View File
@@ -1,8 +1,9 @@
module Dodge.Wall.Dust where
import Dodge.Data
import Control.Lens
import Dodge.Data.World
import Dodge.WorldEvent.Cloud
import Geometry
import Control.Lens
import RandomHelp
wlDustAt :: Wall -> Point2 -> World -> World
@@ -11,12 +12,12 @@ wlDustAt wl = smokeCloudAt dustcol 20 200 1 . addZ 20
dustcol = _wlColor wl & _4 .~ 1
muchWlDustAt :: Wall -> Point2 -> World -> World
muchWlDustAt wl p = flip (foldr f) [10,20..100]
muchWlDustAt wl p = flip (foldr f) [10, 20 .. 100]
where
f h w = w
& smokeCloudAt dustcol 20 200 1 (addZ h (p +.+ off))
& randGen .~ g
f h w =
w
& smokeCloudAt dustcol 20 200 1 (addZ h (p +.+ off))
& randGen .~ g
where
(off,g) = runState (randInCirc 1) (_randGen w)
(off, g) = runState (randInCirc 1) (_randGen w)
dustcol = _wlColor wl & _4 .~ 1