Commit 3049a25f authored by Phil Hagelberg's avatar Phil Hagelberg

Oops; linting was broken.

parent 31097ab4
(local lume (require :lume))
(local lume (require :lib.lume))
(local invisibles [:furniture-starts :enemy-starts :player :goal :patrols])
(fn [map]
(let [layers {}]
(each [_ layer (map.layers)]
(each [_ layer (ipairs map.layers)]
(tset layers layer.name layer))
;; it's easy to forget to set these layers to invisible in tiled.
;; why not just force them invisible here?
......@@ -12,8 +12,9 @@
(tset (. layers invisible) :visible false))
;; make sure every enemy has a patrol-id that actually exists
(let [patrols {}]
(each [_ patrol (ipairs layer.patrols.objects)]
(each [_ patrol (ipairs layers.patrols.objects)]
(tset patrols patrol.id patrol))
(each [_ enemy (ipairs layer.enemies.objects)]
(each [_ enemy (ipairs layers.enemy-starts.objects)]
(assert (. patrols enemy.properties.patrol-id)
(.. "patrol not found: " enemy.properties.patrol-id))))))
(.. "patrol not found: " enemy.properties.patrol-id))))
map))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment