diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-04-24 20:10:30 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-04-24 20:10:30 +0000 |
| commit | 5216d19068a4cfa2991dc49077c903c6679e77f3 (patch) | |
| tree | e50c1cb21d671c32500bc90cd4a3ebe61c58a5e7 | |
| parent | code readability (diff) | |
| download | alive-5216d19068a4cfa2991dc49077c903c6679e77f3.tar.gz alive-5216d19068a4cfa2991dc49077c903c6679e77f3.zip | |
only mark ValueStreams dirty if they actually changed
| -rw-r--r-- | alv/stream/value.moon | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/alv/stream/value.moon b/alv/stream/value.moon index 575b995..3409537 100644 --- a/alv/stream/value.moon +++ b/alv/stream/value.moon @@ -27,7 +27,10 @@ class ValueStream extends Stream --- update this stream's value. -- -- Marks this stream as dirty for the remainder of the current tick. - set: (@value) => @updated = COPILOT.T + set: (value) => + if value != @value + @value = value + @updated = COPILOT.T --- unwrap to the Lua type. -- |
