Advertisement
cnl_cnl_cnl

create

Mar 13th, 2025
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. function cnl_mb_imm.rooms_create()
  2. local i = cnl_mb_imm
  3. local b = i.build
  4. local z = b.zone
  5. local o = b.zone.offset or 0
  6.  
  7. b.room = next(z.rooms,b.room)
  8.  
  9. if b.room == nil then
  10. b.phase_completed = true
  11. return
  12. else
  13. local r = z.rooms[b.room]
  14.  
  15. -- create room and goto
  16. send(
  17. "autoformat on;" ..
  18. "create room "..(b.room+o)..";" ..
  19. "goto "..(b.room+o)..";"
  20. )
  21.  
  22. -- clear flags
  23. send("setr flags 0")
  24. -- clear extras
  25. send("setr extra kill")
  26. -- clear directions
  27. send("dir north none;dir east none;dir south none;dir west none;dir up none;dir down none")
  28.  
  29.  
  30. -- room name
  31. send(
  32. "setr name "..r.name..";"
  33. )
  34.  
  35. -- room desc
  36. cnl_mb_imm.setr_desc(r.desc)
  37.  
  38.  
  39.  
  40. --
  41. cnl_mb.doAction("nod")
  42. return true
  43.  
  44.  
  45. end
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement