Freeciv-3.1: /fast/freeciv/nightly/S3_1/server/scripting/api_server_base.c File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Functions
api_server_base.c File Reference
`#include "luascript.h"`
`#include "score.h"`
`#include "settings.h"`
`#include "srv_main.h"`
`#include "savemain.h"`
`#include "script_server.h"`
`#include "api_server_base.h"`

Go to the source code of this file.

## Functions

int | api_server_player_civilization_score (lua_State *L, Player *pplayer)
bool | api_server_was_started (lua_State *L)
bool | api_server_save (lua_State *L, const char *filename)
bool | api_play_music (lua_State *L, Player *pplayer, const char *tag)
const char * | api_server_setting_get (lua_State *L, const char *sett_name)

## Function Documentation

## ◆ api_play_music()

bool api_play_music | ( | lua_State * | L,
|  | Player * | pplayer,
|  | const char * | tag
| ) |  |

Play music track for player

Definition at line 75 of file api_server_base.c.

Referenced by tolua_server_server_play_music00().

## ◆ api_server_player_civilization_score()

int api_server_player_civilization_score | ( | lua_State * | L,
|  | Player * | pplayer
| ) |  |

Return the civilization score (total) for player

Definition at line 37 of file api_server_base.c.

Referenced by tolua_server_server_civilization_score00().

## ◆ api_server_save()

bool api_server_save | ( | lua_State * | L,
|  | const char * | filename
| ) |  |

Save the game (a manual save is triggered).

Definition at line 58 of file api_server_base.c.

Referenced by tolua_server_server_save00().

## ◆ api_server_setting_get()

const char * api_server_setting_get | ( | lua_State * | L,
|  | const char * | sett_name
| ) |  |

Return the formatted value of the setting or NULL if no such setting exists.

Definition at line 94 of file api_server_base.c.

Referenced by tolua_server_server_setting_get00().

## ◆ api_server_was_started()

bool api_server_was_started | ( | lua_State * | L | ) |

Returns TRUE if the game was started.

Definition at line 48 of file api_server_base.c.

Referenced by tolua_server_server_started00().