Saints Row 2 Function Reference

Local functions

These functions are defined in Lua files that aren't always loaded. They're probably only available in the file that defined them or by including that file in another script.

Function name Global Defined in Examples from patch (click blue number to expand)
limit false 1 4
  • main_menu.lua, line 2570: first_vis_item = limit(new_idx - half_max, 0, num_items - FIND_SERVER_MAX_ITEMS)
  • menu_base.lua, line 3179: first_vis_item = limit(new_item - half_max, 0, Menu_active.num_items - Menu_option_labels.max_rows)
  • pause_menu.lua, line 3817: first_vis_item = limit(new_idx - half_max, 0, active_pane.num_items - PLAYLIST_MAX_ITEMS)
  • vehicle_cust.lua, line 271: first_vis_item = limit(Menu_active.highlighted_item - half_max, 0, Menu_active.num_items - Menu_option_labels.max_rows)
liquor_store_add_items false 1
    liquor_store_cleanup false 1
      liquor_store_confirm_selection false 1
        liquor_store_delayed_food_highlight false 1
          liquor_store_exit false 1
            liquor_store_exit_confirm false 1
              liquor_store_exit_final false 1
                liquor_store_get_menu_data false 1
                  liquor_store_init false 1
                    liquor_store_init_store false 1
                      liquor_store_nav_item false 1
                        liquor_store_player_cash_update false 1
                          liquor_store_release false 1
                            liquor_store_select_item false 1
                              liquor_store_sort_swatches false 1 1
                              liquor_store_update_swatch false 1