Add basic AND gate and electric switch.
This commit is contained in:
parent
ff242fd1a5
commit
5756844161
5 changed files with 105 additions and 23 deletions
|
@ -42,9 +42,14 @@
|
|||
(spawn ^floor-switch x y target-x target-y)))
|
||||
(9 (and spawn-gem? (spawn ^gem x y)))
|
||||
(10 (spawn ^gate x y))
|
||||
(11 (spawn ^and-gate x y))
|
||||
(12 (let ((target-x (bytevector-u8-ref objects (+ i 3)))
|
||||
(target-y (bytevector-u8-ref objects (+ i 4))))
|
||||
(spawn ^electric-switch x y target-x target-y)))
|
||||
(id (error "invalid level object" id))))
|
||||
(i* (+ i (match id
|
||||
(8 5) ; floor-switch
|
||||
;; floor-switch or electric-switch
|
||||
((or 8 12) 5)
|
||||
(_ 3)))))
|
||||
(when obj
|
||||
($ level* 'add-object obj))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue