Fix bug with mapper spawn location
This commit is contained in:
parent
d9f69ecbd6
commit
b45b757cf1
1 changed files with 3 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
|||
; The "cell-num" is the number of cells across; it is then squared to make the
|
||||
; grid. Each cell has a "cell-size" of walls ("wall-width") and hallways
|
||||
; ("hall-width").
|
||||
(var cell-num 10)
|
||||
(var (hall-width wall-width) (values 1 1))
|
||||
(var cell-num 20)
|
||||
(var (hall-width wall-width) (values 2 4))
|
||||
(var cell-size (+ hall-width wall-width))
|
||||
; Helper functions for dealing with the cell list
|
||||
(fn cell-row [i] (+ 1 (math.floor (/ (- i 1) cell-num))))
|
||||
|
@ -17,7 +17,7 @@
|
|||
(var leave-cell (math.random (+ (* cell-num (- cell-num 1)) 1) (* cell-num cell-num)))
|
||||
(var spawn-spot
|
||||
{:x cell-size
|
||||
:y (+ (- (* spawn-cell cell-size) (- cell-size 1)) (* 2 hall-width))})
|
||||
:y (+ (- (* spawn-cell cell-size) (- cell-size 1)) cell-size)})
|
||||
(fn default-meta-cells []
|
||||
(var meta-cells {})
|
||||
(for [c 1 (* cell-num cell-num)]
|
||||
|
|
Loading…
Reference in a new issue