Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cnl_mb_imm.rooms_create()
- local i = cnl_mb_imm
- local b = i.build
- local z = b.zone
- local o = b.zone.offset or 0
- b.room = next(z.rooms,b.room)
- if b.room == nil then
- b.phase_completed = true
- return
- else
- local r = z.rooms[b.room]
- -- create room and goto
- send(
- "autoformat on;" ..
- "create room "..(b.room+o)..";" ..
- "goto "..(b.room+o)..";"
- )
- -- clear flags
- send("setr flags 0")
- -- clear extras
- send("setr extra kill")
- -- clear directions
- send("dir north none;dir east none;dir south none;dir west none;dir up none;dir down none")
- -- room name
- send(
- "setr name "..r.name..";"
- )
- -- room desc
- cnl_mb_imm.setr_desc(r.desc)
- --
- cnl_mb.doAction("nod")
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement