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

function p.__main()
    set_default_block("r_chem")
    
    create_rect("e", 1,1,1, 14,14,14)
    --Door.
    create_rect("s", 5,0,5, 9,0,9)
    create_rect("e", 6,0,6, 8,0,8)
    --Door.
    create_rect("s", 5,15,5, 9,15,9)
    create_rect("e", 6,15,6, 8,15,8)
    
    local msg_str = "Look at the file binds.txt and find the action PACKAGE_FREE_DIAMOND.\n\n"
        .. "By default, pressing the L key causes this action to be executed.\n\n"
        .. "When the action is executed, the following console command is executed:\n\n"
        .. "game_input \"free_diamond\". "
    add_bent_s(7,7,9,"bent_base_txt",msg_str)

    msg_str = "Now consider that console command: game_input \"free_diamond\".\n\n"
        .. "This causes the ^x00ff00game_input^! function of the file ^x00ff00Game/top.lua^! to be executed, "
        .. "and it is passed the string \"free_diamond\" as input. "
    add_bent_s(7,7,7,"bent_base_txt",msg_str)    

    msg_str = "Open Game/top.lua and find the function \"game_input\".\n\n"
        .. "Go to the line that checks whether str is equal to \"free_diamond\".\n\n"
        .. "Read the code following that line: it gets the value of the global variable "
        .. "\"game.diamonds\", adds 1 to it, then sets the variable. "
    add_bent_s(7,7,5,"bent_base_txt",msg_str)  

    msg_str = "Now within the game, press L and see what happens! "
    add_bent_s(7,7,3,"bent_base_txt",msg_str) 

    -- msg_str = "Every non-comment line of the binds.txt file "
    --     .. "1) specifies an action name, "
    --     .. "2) specifies the default input event that binds to this action, and "
    --     .. "3) specifies the console command the gets executed when the action "
    --     .. "is executed. "
    -- add_bent_s(7,7,7,"txt",msg_str)

    -- msg_str = "Thus user can change these bindings in "
    --     .. "MAIN MENU -> OPTIONS -> CONTROLS. "
    -- add_bent_s(7,7,5,"txt",msg_str)

    -- msg_str = "^xff0000Warning: ESC.down must bind to PACKAGE_OPEN_MAIN_MENU "
    --     .. "and GRAVE.down must bind to PACKAGE_OPEN_CONSOLE.^!"
    -- add_bent_s(2,13,7,"txt",msg_str)
end
