Freeciv-3.1
Loading...
Searching...
No Matches
Functions
script_server.h File Reference
#include "support.h"
#include "luascript_types.h"

Go to the source code of this file.

Functions

void script_server_remove_exported_object (void *object)
 
bool script_server_init (void)
 
void script_server_free (void)
 
bool script_server_do_string (struct connection *caller, const char *str)
 
bool script_server_do_file (struct connection *caller, const char *filename)
 
bool script_server_load_file (const char *filename, char **buf)
 
bool script_server_unsafe_do_string (struct connection *caller, const char *str)
 
bool script_server_unsafe_do_file (struct connection *caller, const char *filename)
 
void script_server_state_load (struct section_file *file)
 
void script_server_state_save (struct section_file *file)
 
void script_server_signal_emit (const char *signal_name,...)
 
bool script_server_call (const char *func_name,...)
 

Function Documentation

◆ script_server_call()

bool script_server_call ( const char *  func_name,
  ... 
)

Call a lua function.

Definition at line 595 of file script_server.c.

◆ script_server_do_file()

bool script_server_do_file ( struct connection caller,
const char *  filename 
)

Parse and execute the script at filename in the same instance as the ruleset.

Definition at line 188 of file script_server.c.

Referenced by lua_command(), and openload_script_file().

◆ script_server_do_string()

bool script_server_do_string ( struct connection caller,
const char *  str 
)

Parse and execute the script in str in the same instance as the ruleset

Definition at line 112 of file script_server.c.

Referenced by lua_command().

◆ script_server_free()

void script_server_free ( void  )

Free the scripting data.

Definition at line 366 of file script_server.c.

Referenced by load_rulesetdir(), and rulesets_deinit().

◆ script_server_init()

bool script_server_init ( void  )

Initialize the scripting state.

Definition at line 292 of file script_server.c.

Referenced by load_rulesetdir().

◆ script_server_load_file()

bool script_server_load_file ( const char *  filename,
char **  buf 
)

Load script to a buffer

Definition at line 129 of file script_server.c.

Referenced by openload_script_file().

◆ script_server_remove_exported_object()

void script_server_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 207 of file script_server.c.

Referenced by remove_city(), server_remove_player(), and server_remove_unit_full().

◆ script_server_signal_emit()

void script_server_signal_emit ( const char *  signal_name,
  ... 
)

◆ script_server_state_load()

void script_server_state_load ( struct section_file file)

Load the scripting state from file.

Definition at line 387 of file script_server.c.

Referenced by sg_load_script(), and sg_load_script().

◆ script_server_state_save()

void script_server_state_save ( struct section_file file)

Save the scripting state to file.

Definition at line 399 of file script_server.c.

Referenced by sg_save_script().

◆ script_server_unsafe_do_file()

bool script_server_unsafe_do_file ( struct connection caller,
const char *  filename 
)

Parse and execute the script at filename in an unsafe instance.

Definition at line 196 of file script_server.c.

Referenced by lua_command().

◆ script_server_unsafe_do_string()

bool script_server_unsafe_do_string ( struct connection caller,
const char *  str 
)

Parse and execute the script in str in an unsafe instance

Definition at line 120 of file script_server.c.

Referenced by lua_command().