summary refs log tree commit diff
path: root/lib/cells.fnl
diff options
context:
space:
mode:
authorequa <equaa@protonmail.com>2021-04-22 22:18:58 -0500
committerequa <equaa@protonmail.com>2021-04-22 22:18:58 -0500
commit5473d5d303b55b06438d65c4b3abd2fc0b0f86fc (patch)
treedea5e968dd6097b30c7f78ce10a628a2cfa83dfd /lib/cells.fnl
parentd699b9a38da59bc32982db0c8a69c02cd595cdbc (diff)
very messy music
Diffstat (limited to 'lib/cells.fnl')
-rw-r--r--lib/cells.fnl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/cells.fnl b/lib/cells.fnl
index e415f21..5cc104e 100644
--- a/lib/cells.fnl
+++ b/lib/cells.fnl
@@ -1,4 +1,5 @@
 (local cell (require :lib.cell))
+(local music-state (require :lib.music-state))
 
 (local neighbors [{:x -1 :y -1}
                   {:x -1 :y 0}
@@ -84,6 +85,7 @@
          nil))
    cell.update
    (fn [self get]
+     (set music-state.fire (math.max music-state.fire self.life))
      (if (> self.life 0.3)
          (setmetatable {:life (* self.life (+ 0.5 (* (math.random 5) 0.1)))} (getmetatable self))
          nil))