function p.__get_is_solid() return true end
function p.__get_tex() return "block_room" end

function p.__main()
    set_default_block("r_room")
    
    create_rect("e", 1,1,1, 14,14,14)
    create_rect("e", 6,15,6, 8,15,8)
    create_rect("e", 6,0,6, 8,0,8)
    
    --Maze example.
    create_rect("grow", 4,4,1, 10,10,6)
    create_rect("block_lev4_caves1b", 5,5,1, 9,9,6)
    add_bent(7,7,7, "bent_base_ring_green")

    local msg_str = "There are also built in "
        .. "functions for creating caves. "
        .. "These are \"^x00ff00stick-and-ball^!\" caves, "
        .. "meaning there are balls (nodes) "
        .. "connected by tubes (edges). "
        .. "Adjacent chunks that use the same "
        .. "cave creation code will have caves that "
        .. "connect with each other in the expected way. "
    add_bent_s(7,7,14,"bent_base_txt",msg_str)

    msg_str = "You call caves_start to begin making caves. "
        .. "You then call ^x00ff00caves_set_num_nodes^! "
        .. "to specify how many balls to use. "
        .. "You call ^x00ff00caves_set_nodes^! "
        .. "to set the radius of the balls. "
        .. "Note that there are two types of balls: "
        .. "small and large. "
        .. "In the caves_set_nodes function "
        .. "you also set the probability "
        .. "that a ball is large. "
    add_bent_s(7,7,12,"bent_base_txt",msg_str)

    msg_str = "You call ^x00ff00caves_set_edges^! "
        .. "to set the maximum distance "
        .. "at which there can be an edge between two nodes. "
        .. "There can be edges between nodes in adjacent chunks, "
        .. "but NOT 2 chunks away. "
        .. "If you want there to be edges "
        .. "between chunks that are 2 apart, "
        .. "you call ^x00ff00caves_set_5x5x5^!. "
        .. "Also, in the caves_set_edges function "
        .. "you set the radius of the tube "
        .. "that is around each edge. "
    add_bent_s(7,7,10,"bent_base_txt",msg_str)

    msg_str = "After you have called all these "
        .. "functions to specify the caves, "
        .. "call ^x00ff00caves_end^!. "
        .. "This will construct the \"stick and ball\" "
        .. "data structure which represents the cave. "
        .. "However, no blocks have been created or destroyed. "
        .. "This is your job, and you accomplish this by calling "
        .. "^x00ff00caves_close_to_node^! "
        .. "and ^x00ff00caves_close_to_edge^!. "
        .. "These functions tell you "
        .. "if the center of a block position "
        .. "is within the appropriate radius "
        .. "of a node or edge. "
    add_bent_s(7,7,8,"bent_base_txt",msg_str)
end
