![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <cmath>#include "sol/sol.hpp"#include "deprecations.h"#include "fcintl.h"#include "rand.h"#include "map.h"#include "version.h"#include "luascript.h"#include "api_common_utilities.h"
Include dependency graph for api_common_utilities.cpp:Go to the source code of this file.
Functions | |
| int | api_utilities_random (int min, int max) |
| Generate random number. More... | |
| const char * | api_utilities_fc_version () |
| Return the version of freeciv lua script. More... | |
| void | api_utilities_log_base (sol::this_state s, int level, const char *message) |
| One log message. More... | |
| const Direction * | api_utilities_str2dir (lua_State *L, const char *dir) |
| Convert text describing direction into direction. More... | |
| const Direction * | api_utilities_dir_ccw (lua_State *L, Direction dir) |
| Previous (counter-clockwise) valid direction. More... | |
| const Direction * | api_utilities_dir_cw (lua_State *L, Direction dir) |
| Next (clockwise) valid direction. More... | |
| const Direction * | api_utilities_opposite_dir (lua_State *L, Direction dir) |
| Opposite direction - validity not checked, but it's valid iff original direction is. More... | |
| void | api_utilities_deprecation_warning (char *method, char *replacement, char *deprecated_since) |
| Lua script wants to warn about use of deprecated construct. More... | |
| void api_utilities_deprecation_warning | ( | char * | method, |
| char * | replacement, | ||
| char * | deprecated_since | ||
| ) |
Lua script wants to warn about use of deprecated construct.
Definition at line 120 of file api_common_utilities.cpp.
Referenced by luascript_common_a_register().
Previous (counter-clockwise) valid direction.
Definition at line 77 of file api_common_utilities.cpp.
Next (clockwise) valid direction.
Definition at line 93 of file api_common_utilities.cpp.
| const char* api_utilities_fc_version | ( | ) |
Return the version of freeciv lua script.
Definition at line 48 of file api_common_utilities.cpp.
Referenced by luascript_common_a_register().
| void api_utilities_log_base | ( | sol::this_state | s, |
| int | level, | ||
| const char * | message | ||
| ) |
One log message.
This module is used by script_game and script_auth.
Definition at line 53 of file api_common_utilities.cpp.
Referenced by luascript_common_a_register().
Opposite direction - validity not checked, but it's valid iff original direction is.
Definition at line 110 of file api_common_utilities.cpp.
| int api_utilities_random | ( | int | min, |
| int | max | ||
| ) |
Generate random number.
Definition at line 35 of file api_common_utilities.cpp.
Referenced by luascript_common_a_register().
| const Direction* api_utilities_str2dir | ( | lua_State * | L, |
| const char * | dir | ||
| ) |
Convert text describing direction into direction.
Definition at line 66 of file api_common_utilities.cpp.