about summary refs log tree commit diff stats
path: root/074console.mu
diff options
context:
space:
mode:
Diffstat (limited to '074console.mu')
-rw-r--r--074console.mu13
1 files changed, 13 insertions, 0 deletions
diff --git a/074console.mu b/074console.mu
index 1d9702da..8ec8e1e9 100644
--- a/074console.mu
+++ b/074console.mu
@@ -100,3 +100,16 @@ recipe wait-for-event [
     loop-unless found?:boolean
   }
 ]
+
+# use this helper to skip rendering if there's lots of other events queued up
+recipe has-more-events? [
+  default-space:address:array:location <- new location:type, 30:literal
+  console:address <- next-ingredient
+  {
+    break-unless console:address
+    # fake consoles should be plenty fast; never skip
+    reply 0:literal/false
+  }
+  result:boolean <- interactions-left?
+  reply result:boolean
+]