Minetest  5.4.0
ModApiClient Class Reference

#include <l_client.h>

+ Inheritance diagram for ModApiClient:
+ Collaboration diagram for ModApiClient:

Static Public Member Functions

static void Initialize (lua_State *L, int top)
 
- Static Public Member Functions inherited from ModApiBase
static ScriptApiBasegetScriptApiBase (lua_State *L)
 
static ServergetServer (lua_State *L)
 
static ServerInventoryManagergetServerInventoryMgr (lua_State *L)
 
static ClientgetClient (lua_State *L)
 
static GUIEnginegetGuiEngine (lua_State *L)
 
static IGameDefgetGameDef (lua_State *L)
 
static EnvironmentgetEnv (lua_State *L)
 
static std::string getCurrentModPath (lua_State *L)
 
template<typename T >
static T * getScriptApi (lua_State *L)
 
static bool registerFunction (lua_State *L, const char *name, lua_CFunction func, int top)
 
static int l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func)
 A wrapper for deprecated functions. More...
 

Static Private Member Functions

static int l_get_current_modname (lua_State *L)
 
static int l_get_modpath (lua_State *L)
 
static int l_print (lua_State *L)
 
static int l_display_chat_message (lua_State *L)
 
static int l_send_chat_message (lua_State *L)
 
static int l_clear_out_chat_queue (lua_State *L)
 
static int l_get_player_names (lua_State *L)
 
static int l_show_formspec (lua_State *L)
 
static int l_send_respawn (lua_State *L)
 
static int l_disconnect (lua_State *L)
 
static int l_gettext (lua_State *L)
 
static int l_get_last_run_mod (lua_State *L)
 
static int l_set_last_run_mod (lua_State *L)
 
static int l_get_node_or_nil (lua_State *L)
 
static int l_get_language (lua_State *L)
 
static int l_get_wielded_item (lua_State *L)
 
static int l_get_meta (lua_State *L)
 
static int l_sound_play (lua_State *L)
 
static int l_sound_stop (lua_State *L)
 
static int l_sound_fade (lua_State *L)
 
static int l_get_server_info (lua_State *L)
 
static int l_get_item_def (lua_State *L)
 
static int l_get_node_def (lua_State *L)
 
static int l_get_privilege_list (lua_State *L)
 
static int l_get_builtin_path (lua_State *L)
 
static int l_get_csm_restrictions (lua_State *L)
 

Additional Inherited Members

- Protected Member Functions inherited from LuaHelper
template<>
bool readParam (lua_State *L, int index)
 
- Static Protected Member Functions inherited from LuaHelper
static bool isNaN (lua_State *L, int idx)
 
template<typename T >
static T readParam (lua_State *L, int index)
 Read a value using a template type T from Lua State L and index. More...
 
template<typename T >
static T readParam (lua_State *L, int index, const T &default_value)
 Read a value using a template type T from Lua State L and index. More...
 

Member Function Documentation

◆ Initialize()

void ModApiClient::Initialize ( lua_State *  L,
int  top 
)
static

References API_FCT.

Referenced by ClientScripting::InitializeModApi().

+ Here is the caller graph for this function:

◆ l_clear_out_chat_queue()

int ModApiClient::l_clear_out_chat_queue ( lua_State *  L)
staticprivate

References Client::clearOutChatQueue(), and ModApiBase::getClient().

+ Here is the call graph for this function:

◆ l_disconnect()

int ModApiClient::l_disconnect ( lua_State *  L)
staticprivate

References MainGameCallback::disconnect(), g_gamecallback, and ModApiBase::getClient().

+ Here is the call graph for this function:

◆ l_display_chat_message()

int ModApiClient::l_display_chat_message ( lua_State *  L)
staticprivate

References ModApiBase::getClient(), Client::pushToChatQueue(), and utf8_to_wide().

+ Here is the call graph for this function:

◆ l_get_builtin_path()

int ModApiClient::l_get_builtin_path ( lua_State *  L)
staticprivate

References BUILTIN_MOD_NAME.

◆ l_get_csm_restrictions()

int ModApiClient::l_get_csm_restrictions ( lua_State *  L)
staticprivate

References flagdesc_csm_restriction, ModApiBase::getClient(), Client::getCSMRestrictionFlags(), CSMFlagDesc::name, and setboolfield().

+ Here is the call graph for this function:

◆ l_get_current_modname()

int ModApiClient::l_get_current_modname ( lua_State *  L)
staticprivate

◆ l_get_item_def()

int ModApiClient::l_get_item_def ( lua_State *  L)
staticprivate

References checkCSMRestrictionFlag, CSM_RF_READ_ITEMDEFS, IItemDefManager::get(), ModApiBase::getGameDef(), IGameDef::idef(), IItemDefManager::isKnown(), and push_item_definition_full().

+ Here is the call graph for this function:

◆ l_get_language()

int ModApiClient::l_get_language ( lua_State *  L)
staticprivate

◆ l_get_last_run_mod()

int ModApiClient::l_get_last_run_mod ( lua_State *  L)
staticprivate

References CUSTOM_RIDX_CURRENT_MOD_NAME, and ModApiBase::getScriptApiBase().

+ Here is the call graph for this function:

◆ l_get_meta()

int ModApiClient::l_get_meta ( lua_State *  L)
staticprivate

References NodeMetaRef::createClient(), Client::CSMGetNode(), ModApiBase::getClient(), ModApiBase::getEnv(), Environment::getMap(), Map::getNodeMetadata(), p(), and read_v3s16().

+ Here is the call graph for this function:

◆ l_get_modpath()

int ModApiClient::l_get_modpath ( lua_State *  L)
staticprivate

◆ l_get_node_def()

int ModApiClient::l_get_node_def ( lua_State *  L)
staticprivate

References checkCSMRestrictionFlag, CSM_RF_READ_NODEDEFS, NodeDefManager::get(), ModApiBase::getGameDef(), NodeDefManager::getId(), ContentFeatures::name, IGameDef::ndef(), and push_content_features().

+ Here is the call graph for this function:

◆ l_get_node_or_nil()

int ModApiClient::l_get_node_or_nil ( lua_State *  L)
staticprivate

References Client::CSMGetNode(), ModApiBase::getClient(), pushnode(), and read_v3s16().

+ Here is the call graph for this function:

◆ l_get_player_names()

int ModApiClient::l_get_player_names ( lua_State *  L)
staticprivate

References checkCSMRestrictionFlag, CSM_RF_READ_PLAYERINFO, ModApiBase::getClient(), and Client::getConnectedPlayerNames().

+ Here is the call graph for this function:

◆ l_get_privilege_list()

int ModApiClient::l_get_privilege_list ( lua_State *  L)
staticprivate

References ModApiBase::getClient().

+ Here is the call graph for this function:

◆ l_get_server_info()

int ModApiClient::l_get_server_info ( lua_State *  L)
staticprivate

References ModApiBase::getClient(), Address::getPort(), and Address::serializeString().

+ Here is the call graph for this function:

◆ l_get_wielded_item()

static int ModApiClient::l_get_wielded_item ( lua_State *  L)
staticprivate

◆ l_gettext()

int ModApiClient::l_gettext ( lua_State *  L)
staticprivate

References strgettext().

+ Here is the call graph for this function:

◆ l_print()

int ModApiClient::l_print ( lua_State *  L)
staticprivate

References NO_MAP_LOCK_REQUIRED, and rawstream.

◆ l_send_chat_message()

int ModApiClient::l_send_chat_message ( lua_State *  L)
staticprivate

References checkCSMRestrictionFlag, CSM_RF_CHAT_MESSAGES, ModApiBase::getClient(), Client::sendChatMessage(), and utf8_to_wide().

+ Here is the call graph for this function:

◆ l_send_respawn()

int ModApiClient::l_send_respawn ( lua_State *  L)
staticprivate

References ModApiBase::getClient(), and Client::sendRespawn().

+ Here is the call graph for this function:

◆ l_set_last_run_mod()

int ModApiClient::l_set_last_run_mod ( lua_State *  L)
staticprivate

References ModApiBase::getScriptApiBase(), and ScriptApiBase::setOriginDirect().

+ Here is the call graph for this function:

◆ l_show_formspec()

int ModApiClient::l_show_formspec ( lua_State *  L)
staticprivate

References CE_SHOW_LOCAL_FORMSPEC, ModApiBase::getClient(), and Client::pushToEventQueue().

+ Here is the call graph for this function:

◆ l_sound_fade()

int ModApiClient::l_sound_fade ( lua_State *  L)
staticprivate

References ISoundManager::fadeSound(), ModApiBase::getClient(), and Client::getSoundManager().

+ Here is the call graph for this function:

◆ l_sound_play()

int ModApiClient::l_sound_play ( lua_State *  L)
staticprivate

References BS, SimpleSoundSpec::fade, SimpleSoundSpec::gain, getboolfield(), ModApiBase::getClient(), getfloatfield(), Client::getSoundManager(), SimpleSoundSpec::name, ISoundManager::playSound(), ISoundManager::playSoundAt(), read_soundspec(), and read_v3f().

+ Here is the call graph for this function:

◆ l_sound_stop()

int ModApiClient::l_sound_stop ( lua_State *  L)
staticprivate

References ModApiBase::getClient(), Client::getSoundManager(), and ISoundManager::stopSound().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: