Add basic AND gate and electric switch.

This commit is contained in:
David Thompson 2024-05-22 08:00:39 -04:00
parent ff242fd1a5
commit 5756844161
5 changed files with 105 additions and 23 deletions

View file

@ -555,6 +555,8 @@ the default ORIENTATION value of 'orthogonal' is supported."
(define obj:floor-switch 8)
(define obj:gem 9)
(define obj:gate 10)
(define obj:and-gate 11)
(define obj:electric-switch 12)
(define (compile-environment-layer tile-map layer-name)
(let ((tw (tile-map-tile-width tile-map))
@ -601,9 +603,10 @@ the default ORIENTATION value of 'orthogonal' is supported."
(assq-ref properties 'target-y)))
('gem (list x y obj:gem))
('gate (list x y obj:gate))
;; TODO: Implement these
('and-gate (list x y obj:block:copper))
('electric-switch (list x y obj:wall:copper))
('and-gate (list x y obj:and-gate))
('electric-switch (list x y obj:electric-switch
(assq-ref properties 'target-x)
(assq-ref properties 'target-y)))
(_ (error "unsupported object type" type)))))
(object-layer-objects layer))))