diff options
author | Aki <please@ignore.pl> | 2024-11-20 23:49:25 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-11-20 23:49:25 +0100 |
commit | 5002bee1413a0dcb886a51619282504dd49b3aeb (patch) | |
tree | 2773c056fe489b8fa2c766ef06c455cb58c2ce1d | |
parent | 419e19cbc2750512a13ddfff5698f9df39f408da (diff) | |
download | noita-eyes-master.zip noita-eyes-master.tar.gz noita-eyes-master.tar.bz2 |
-rwxr-xr-x | delta-wrap.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/delta-wrap.lua b/delta-wrap.lua new file mode 100755 index 0000000..d63beeb --- /dev/null +++ b/delta-wrap.lua @@ -0,0 +1,16 @@ +#!/usr/bin/env lua +local eyes = require "eyes" +local format = require "format" +local reading = require "reading" +for _, message in ipairs(eyes) do + local previous = 0 + local deltas = {} + for _, value in reading.values(message) do + if value <= previous then + previous = previous - 83 + end + table.insert(deltas, value - previous) + previous = value + end + print(format.csv(deltas)) +end |