Revert "Add activation counting to switched emitters"
woopsie broke switched-emitters
This reverts commit 133fdb5752
.
This commit is contained in:
parent
534e9c30b7
commit
8004c7df90
1 changed files with 5 additions and 12 deletions
|
@ -198,7 +198,6 @@
|
|||
(define timer (spawn ^cell 0))
|
||||
(define on? (spawn ^cell))
|
||||
(define position (vector x y 0))
|
||||
(define activations (spawn ^cell 0))
|
||||
(define (wire-state)
|
||||
(and ($ on?)
|
||||
(match ($ timer)
|
||||
|
@ -218,18 +217,12 @@
|
|||
(('enter obj grid-info) #f)
|
||||
(('exit obj grid-info) #f)
|
||||
(('activate grid-info)
|
||||
(let ((k (1+ ($ activations))))
|
||||
($ activations k)
|
||||
(unless (> k 1)
|
||||
($ on? #t)
|
||||
($ timer 0)
|
||||
($ grid-info 'append-event `(emitter-on ,x ,y)))))
|
||||
($ on? #t)
|
||||
($ timer 0)
|
||||
($ grid-info 'append-event `(emitter-on ,x ,y)))
|
||||
(('deactivate grid-info)
|
||||
(let ((k (1- ($ activations))))
|
||||
($ activations k)
|
||||
(when (= k 0)
|
||||
($ on? #f)
|
||||
($ grid-info 'append-event `(emitter-off ,x ,y)))))
|
||||
($ on? #f)
|
||||
($ grid-info 'append-event `(emitter-off ,x ,y)))
|
||||
(('wire-state grid-info from from-x from-y) (wire-state))
|
||||
(('update-wire-state grid-info neighbor-grid) #f)
|
||||
(('alive?) #t)
|
||||
|
|
Loading…
Add table
Reference in a new issue