Freeciv21
Develop your civilization from humble roots to a global empire
api_server_base.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2020 Freeciv21 and Freeciv contributors. This file is
3  part of Freeciv21. Freeciv21 is free software: you can redistribute it
4  and/or modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation, either version 3 of the
6  License, or (at your option) any later version. You should have received
7  a copy of the GNU General Public License along with Freeciv21. If not,
8  see https://www.gnu.org/licenses/.
9 **************************************************************************/
10 
11 #pragma once
12 
13 /* common/scriptcore */
14 #include "luascript_types.h"
15 
16 struct lua_State;
17 
18 // Additional methods on the server.
19 int api_server_player_civilization_score(lua_State *L, Player *pplayer);
20 
21 bool api_server_was_started(lua_State *L);
22 
23 bool api_server_save(lua_State *L, const char *filename);
24 
25 const char *api_server_setting_get(lua_State *L, const char *sett_name);
26 
27 bool api_play_music(lua_State *L, Player *pplayer, const char *tag);
bool api_server_was_started(lua_State *L)
Returns TRUE if the game was started.
const char * api_server_setting_get(lua_State *L, const char *sett_name)
Return the formated value of the setting or nullptr if no such setting exists,.
int api_server_player_civilization_score(lua_State *L, Player *pplayer)
Return the civilization score (total) for player.
bool api_play_music(lua_State *L, Player *pplayer, const char *tag)
Play music track for player.
bool api_server_save(lua_State *L, const char *filename)
Save the game (a manual save is triggered).
Definition: player.h:231