aboutsummaryrefslogtreecommitdiff
path: root/entity.scm
diff options
context:
space:
mode:
Diffstat (limited to 'entity.scm')
-rw-r--r--entity.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/entity.scm b/entity.scm
index dab2e83..16d28c4 100644
--- a/entity.scm
+++ b/entity.scm
@@ -27,8 +27,14 @@
(loop (cddr lst) (cons v (cons k acc)))))))))
(cons key (cons val cleaned))))
- (define (entity-update entity key proc #!optional default)
- (entity-set entity key (proc (entity-ref entity key default))))
+(define (entity-set-many entity pairs)
+ (fold (lambda (pair working-ent)
+ (entity-set working-ent (car pair) (cdr pair)))
+ entity
+ pairs))
+
+(define (entity-update entity key proc #!optional default)
+ (entity-set entity key (proc (entity-ref entity key default))))
;; #:skip-pipelines — list of symbols naming frame pipeline steps to skip for this
;; entity. Physics documents the built-in step names (see docs/physics.org). Other