Freeciv-3.3: /fast/freeciv/nightly/main/client/luascript/script_client.h File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Functions
script_client.h File Reference
`#include "luascript_types.h"`

Go to the source code of this file.

## Functions

bool | script_client_callback_invoke (const char *callback_name, int nargs, enum api_types *parg_types, va_list args)
void | script_client_remove_exported_object (void *object)
bool | script_client_init (void)
void | script_client_free (void)
bool | script_client_do_string (const char *str)
bool | script_client_do_file (const char *filename)
void | script_client_state_load (struct section_file *file)
void | script_client_state_save (struct section_file *file)
void | script_client_signal_connect (const char *signal_name, const char *callback_name)
void | script_client_signal_emit (const char *signal_name,...)
const char * | script_client_signal_list (void)

## Function Documentation

## ◆ script_client_callback_invoke()

bool script_client_callback_invoke | ( | const char * | callback_name,
|  | int | nargs,
|  | enum api_types * | parg_types,
|  | va_list | args
| ) |  |

Invoke the 'callback_name' Lua function.

Definition at line 99 of file script_client.c.

## ◆ script_client_do_file()

bool script_client_do_file | ( | const char * | filename | ) |

Parse and execute the script at filename.

Definition at line 89 of file script_client.c.

Referenced by luaconsole_load_file_callback(), qload_lua_script(), and qreload_lua_script().

## ◆ script_client_do_string()

bool script_client_do_string | ( | const char * | str | ) |

Parse and execute the script in str

Definition at line 79 of file script_client.c.

Referenced by luaconsole_input_return().

## ◆ script_client_free()

void script_client_free | ( | void |  | ) |

Free the scripting data.

Definition at line 283 of file script_client.c.

Referenced by client_exit().

## ◆ script_client_init()

bool script_client_init | ( | void |  | ) |

Initialize the scripting state.

Definition at line 195 of file script_client.c.

Referenced by client_main().

## ◆ script_client_remove_exported_object()

void script_client_remove_exported_object | ( | void * | object | ) |

Mark any, if exported, full userdata representing 'object' in the current script state as 'Nonexistent'. This changes the type of the lua variable.

Definition at line 111 of file script_client.c.

## ◆ script_client_signal_connect()

void script_client_signal_connect | ( | const char * | signal_name,
|  | const char * | callback_name
| ) |  |

## ◆ script_client_signal_emit()

void script_client_signal_emit | ( | const char * | signal_name,
|  |  | ...
| ) |  |

Invoke all the callback functions attached to a given signal.

Definition at line 320 of file script_client.c.

Referenced by handle_research_info().

## ◆ script_client_signal_list()

const char * script_client_signal_list | ( | void |  | ) |

## ◆ script_client_state_load()

void script_client_state_load | ( | struct section_file * | file | ) |

Load the scripting state from file.

Definition at line 299 of file script_client.c.

## ◆ script_client_state_save()

void script_client_state_save | ( | struct section_file * | file | ) |

Save the scripting state to file.

Definition at line 311 of file script_client.c.