Simutrans Programm Version 124.5 r11993
Loading...
Searching...
No Matches
script_tool_manager_t Class Reference

#include <script_tool_manager.h>

Collaboration diagram for script_tool_manager_t:

Static Public Member Functions

static bool check_file (char const *path)
 Looks for tool.nut in path.
static const scripted_tool_info_tget_script_info (const char *path)
static tool_tload_tool (char const *path, tool_t *tool=NULL)
static void load_scripts (char const *path)
static void fill_menu (tool_selector_t *tool_selector, char const *arg, sint16 sound_ok)

Static Private Attributes

static vector_tpl< tool_exec_script_t * > one_click_script_tools
 All one-click script tools.
static vector_tpl< tool_exec_two_click_script_t * > two_click_script_tools
 All two-click script tools.

Detailed Description

There's no need to construct an instance since everything is static here.

Definition at line 22 of file script_tool_manager.h.

Member Function Documentation

◆ check_file()

bool script_tool_manager_t::check_file ( char const * path)
static

Looks for tool.nut in path.

Definition at line 24 of file script_tool_manager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_menu()

void script_tool_manager_t::fill_menu ( tool_selector_t * tool_selector,
char const * arg,
sint16 sound_ok )
static

Fills toolbar with scripted tools. Select only tools with menu entry equal to arg.

Definition at line 120 of file script_tool_manager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_script_info()

const scripted_tool_info_t * script_tool_manager_t::get_script_info ( const char * path)
static

Reads description.tab at path. If no description is found, use default values.

Returns
filled info structure.

Definition at line 36 of file script_tool_manager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_scripts()

void script_tool_manager_t::load_scripts ( char const * path)
static

Reads all tools from directory path.

Definition at line 99 of file script_tool_manager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_tool()

tool_t * script_tool_manager_t::load_tool ( char const * path,
tool_t * tool = NULL )
static

Loads tool from path. If tool is not NULL it is reinitialized with the scripted tool.

Returns
tool

Definition at line 72 of file script_tool_manager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ one_click_script_tools

vector_tpl< tool_exec_script_t * > script_tool_manager_t::one_click_script_tools
staticprivate

All one-click script tools.

Definition at line 26 of file script_tool_manager.h.

◆ two_click_script_tools

vector_tpl< tool_exec_two_click_script_t * > script_tool_manager_t::two_click_script_tools
staticprivate

All two-click script tools.

Definition at line 28 of file script_tool_manager.h.


The documentation for this class was generated from the following files: