|
static ScriptApiBase * | getScriptApiBase (lua_State *L) |
|
static Server * | getServer (lua_State *L) |
|
static ServerInventoryManager * | getServerInventoryMgr (lua_State *L) |
|
static EmergeThread * | getEmergeThread (lua_State *L) |
|
static IGameDef * | getGameDef (lua_State *L) |
|
static Environment * | getEnv (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 void | registerClass (lua_State *L, const char *name, const luaL_Reg *methods, const luaL_Reg *metamethods) |
|
template<typename T > |
static T * | checkObject (lua_State *L, int narg) |
|
static int | l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func) |
| A wrapper for deprecated functions.
|
|
|
template<> |
bool | readParam (lua_State *L, int index) |
|
template<> |
s16 | readParam (lua_State *L, int index) |
|
template<> |
int | readParam (lua_State *L, int index) |
|
template<> |
float | readParam (lua_State *L, int index) |
|
template<> |
v2s16 | readParam (lua_State *L, int index) |
|
template<> |
v2f | readParam (lua_State *L, int index) |
|
template<> |
v3f | readParam (lua_State *L, int index) |
|
template<> |
std::string_view | readParam (lua_State *L, int index) |
|
template<> |
std::string | readParam (lua_State *L, int index) |
|
template<> |
std::string_view | readParam (lua_State *L, int index) |
| Read a string from Lua state L at index without copying it.
|
|
template<typename T > |
static T | readParam (lua_State *L, int index) |
| Read a value using a template type T from Lua state L at index.
|
|
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 at index.
|
|
template<typename T >
static T * ModApiBase::checkObject |
( |
lua_State * | L, |
|
|
int | narg ) |
|
inlinestatic |
Referenced by get_observers(), LuaCamera::getobject(), LuaLocalPlayer::getobject(), InvRef::l_add_item(), LuaItemStack::l_add_item(), ModApiParticles::l_add_particlespawner(), ObjectRef::l_add_pos(), ObjectRef::l_add_velocity(), LuaItemStack::l_add_wear(), LuaItemStack::l_add_wear_by_uses(), LuaPerlinNoiseMap::l_calc_2d_map(), LuaPerlinNoiseMap::l_calc_3d_map(), LuaVoxelManip::l_calc_lighting(), LuaItemStack::l_clear(), InvRef::l_contains_item(), ModApiEnv::l_dig_node(), LuaItemStack::l_equals(), LuaAreaStore::l_from_file(), LuaAreaStore::l_from_string(), ModApiMapgen::l_generate_decorations(), ModApiMapgen::l_generate_ores(), LuaSettings::l_get(), LuaPerlinNoise::l_get_2d(), LuaPerlinNoiseMap::l_get_2d_map(), LuaPerlinNoiseMap::l_get_2d_map_flat(), LuaPerlinNoise::l_get_3d(), LuaPerlinNoiseMap::l_get_3d_map(), LuaPerlinNoiseMap::l_get_3d_map_flat(), ObjectRef::l_get_acceleration(), LuaMinimap::l_get_angle(), ObjectRef::l_get_animation(), LuaAreaStore::l_get_area(), LuaAreaStore::l_get_areas_for_pos(), LuaAreaStore::l_get_areas_in_area(), ObjectRef::l_get_armor_groups(), ObjectRef::l_get_attach(), ObjectRef::l_get_attribute(), ObjectRef::l_get_bone_override(), ObjectRef::l_get_bone_overrides(), ObjectRef::l_get_bone_position(), LuaSettings::l_get_bool(), ObjectRef::l_get_breath(), ObjectRef::l_get_children(), ObjectRef::l_get_clouds(), LuaItemStack::l_get_count(), LuaVoxelManip::l_get_data(), ObjectRef::l_get_day_night_ratio(), LuaItemStack::l_get_definition(), LuaItemStack::l_get_description(), NodeTimerRef::l_get_elapsed(), LuaVoxelManip::l_get_emerged_area(), ObjectRef::l_get_entity_name(), ObjectRef::l_get_eye_offset(), LuaSettings::l_get_flags(), ObjectRef::l_get_flags(), ObjectRef::l_get_formspec_prepend(), ObjectRef::l_get_fov(), LuaItemStack::l_get_free_space(), ObjectRef::l_get_hp(), NodeMetaRef::l_get_inventory(), ObjectRef::l_get_inventory(), ObjectRef::l_get_inventory_formspec(), LuaVoxelManip::l_get_light_data(), ObjectRef::l_get_lighting(), InvRef::l_get_list(), InvRef::l_get_lists(), ObjectRef::l_get_local_animation(), InvRef::l_get_location(), ObjectRef::l_get_look_dir(), ObjectRef::l_get_look_horizontal(), ObjectRef::l_get_look_pitch(), ObjectRef::l_get_look_vertical(), ObjectRef::l_get_look_yaw(), ObjectRef::l_get_luaentity(), LuaPerlinNoiseMap::l_get_map_slice(), LuaItemStack::l_get_meta(), ObjectRef::l_get_meta(), LuaItemStack::l_get_metadata(), LuaMinimap::l_get_mode(), ObjectRef::l_get_moon(), LuaItemStack::l_get_name(), LuaSettings::l_get_names(), ObjectRef::l_get_nametag_attributes(), LuaVoxelManip::l_get_node_at(), LuaSettings::l_get_np_group(), LuaVoxelManip::l_get_param2_data(), ObjectRef::l_get_physics_override(), ObjectRef::l_get_player_control(), ObjectRef::l_get_player_control_bits(), ObjectRef::l_get_player_name(), LuaMinimap::l_get_pos(), ObjectRef::l_get_pos(), ObjectRef::l_get_properties(), ObjectRef::l_get_rotation(), LuaMinimap::l_get_shape(), LuaItemStack::l_get_short_description(), InvRef::l_get_size(), ObjectRef::l_get_sky(), ObjectRef::l_get_sky_color(), InvRef::l_get_stack(), LuaItemStack::l_get_stack_max(), ObjectRef::l_get_stars(), LuaPcgRandom::l_get_state(), LuaPseudoRandom::l_get_state(), ObjectRef::l_get_sun(), ObjectRef::l_get_texture_mod(), NodeTimerRef::l_get_timeout(), LuaItemStack::l_get_tool_capabilities(), ObjectRef::l_get_velocity(), LuaItemStack::l_get_wear(), LuaItemStack::l_get_wear_bar_params(), InvRef::l_get_width(), ObjectRef::l_get_wield_index(), ObjectRef::l_get_wield_list(), ObjectRef::l_get_wielded_item(), ObjectRef::l_get_yaw(), LuaSettings::l_has(), LuaMinimap::l_hide(), ObjectRef::l_hud_add(), ObjectRef::l_hud_change(), ObjectRef::l_hud_get(), ObjectRef::l_hud_get_all(), ObjectRef::l_hud_get_flags(), ObjectRef::l_hud_get_hotbar_image(), ObjectRef::l_hud_get_hotbar_itemcount(), ObjectRef::l_hud_get_hotbar_selected_image(), ObjectRef::l_hud_remove(), ObjectRef::l_hud_set_flags(), ObjectRef::l_hud_set_hotbar_image(), ObjectRef::l_hud_set_hotbar_itemcount(), ObjectRef::l_hud_set_hotbar_selected_image(), LuaAreaStore::l_insert_area(), InvRef::l_is_empty(), LuaItemStack::l_is_empty(), LuaItemStack::l_is_known(), ObjectRef::l_is_player(), NodeTimerRef::l_is_started(), ObjectRef::l_is_valid(), ModChannelRef::l_is_writeable(), LuaItemStack::l_item_fits(), ModChannelRef::l_leave(), NodeMetaRef::l_mark_as_private(), ObjectRef::l_move_to(), LuaPcgRandom::l_next(), LuaPseudoRandom::l_next(), LuaRaycast::l_next(), LuaSecureRandom::l_next_bytes(), ObjectRef::l_override_day_night_ratio(), LuaItemStack::l_peek_item(), ModApiEnv::l_place_node(), ModApiMapgen::l_place_schematic_on_vmanip(), ObjectRef::l_punch(), ModApiEnv::l_punch_node(), LuaPcgRandom::l_rand_normal_dist(), LuaVoxelManip::l_read_from_map(), LuaSettings::l_remove(), ObjectRef::l_remove(), LuaAreaStore::l_remove_area(), InvRef::l_remove_item(), LuaItemStack::l_replace(), LuaAreaStore::l_reserve(), ObjectRef::l_respawn(), ObjectRef::l_right_click(), InvRef::l_room_for_item(), ModChannelRef::l_send_all(), ObjectRef::l_send_mapblock(), LuaSettings::l_set(), NodeTimerRef::l_set(), ObjectRef::l_set_acceleration(), LuaMinimap::l_set_angle(), ObjectRef::l_set_animation(), ObjectRef::l_set_animation_frame_speed(), ObjectRef::l_set_armor_groups(), ObjectRef::l_set_attach(), ObjectRef::l_set_attribute(), ObjectRef::l_set_bone_override(), ObjectRef::l_set_bone_position(), LuaSettings::l_set_bool(), ObjectRef::l_set_breath(), LuaAreaStore::l_set_cache_params(), ObjectRef::l_set_clouds(), LuaItemStack::l_set_count(), LuaVoxelManip::l_set_data(), ObjectRef::l_set_detach(), ObjectRef::l_set_eye_offset(), ObjectRef::l_set_flags(), ObjectRef::l_set_formspec_prepend(), ObjectRef::l_set_fov(), ObjectRef::l_set_hp(), ObjectRef::l_set_inventory_formspec(), LuaVoxelManip::l_set_light_data(), LuaVoxelManip::l_set_lighting(), ObjectRef::l_set_lighting(), InvRef::l_set_list(), InvRef::l_set_lists(), ObjectRef::l_set_local_animation(), ObjectRef::l_set_look_horizontal(), ObjectRef::l_set_look_pitch(), ObjectRef::l_set_look_vertical(), ObjectRef::l_set_look_yaw(), LuaItemStack::l_set_metadata(), ObjectRef::l_set_minimap_modes(), LuaMinimap::l_set_mode(), ObjectRef::l_set_moon(), LuaItemStack::l_set_name(), ObjectRef::l_set_nametag_attributes(), LuaVoxelManip::l_set_node_at(), LuaSettings::l_set_np_group(), ObjectRef::l_set_observers(), LuaVoxelManip::l_set_param2_data(), ObjectRef::l_set_physics_override(), LuaMinimap::l_set_pos(), ObjectRef::l_set_pos(), ObjectRef::l_set_properties(), ObjectRef::l_set_rotation(), LuaMinimap::l_set_shape(), InvRef::l_set_size(), ObjectRef::l_set_sky(), ObjectRef::l_set_sprite(), InvRef::l_set_stack(), ObjectRef::l_set_stars(), LuaPcgRandom::l_set_state(), ObjectRef::l_set_sun(), ObjectRef::l_set_texture_mod(), ItemStackMetaRef::l_set_tool_capabilities(), ObjectRef::l_set_velocity(), LuaItemStack::l_set_wear(), ItemStackMetaRef::l_set_wear_bar_params(), InvRef::l_set_width(), ObjectRef::l_set_wielded_item(), ObjectRef::l_set_yaw(), LuaMinimap::l_show(), NodeTimerRef::l_start(), NodeTimerRef::l_stop(), LuaItemStack::l_take_item(), LuaAreaStore::l_to_file(), LuaAreaStore::l_to_string(), LuaItemStack::l_to_string(), LuaItemStack::l_to_table(), LuaSettings::l_to_table(), LuaVoxelManip::l_update_liquids(), LuaVoxelManip::l_was_modified(), LuaSettings::l_write(), LuaVoxelManip::l_write_to_map(), LuaItemStack::mt_tostring(), LuaItemStack::packIn(), LuaPerlinNoise::packIn(), LuaPerlinNoiseMap::packIn(), LuaVoxelManip::packIn(), read_item(), read_server_sound_params(), LuaParticleParams::readAttachmentID(), and ObjectRef::set_null().
int ModApiBase::l_deprecated_function |
( |
lua_State * | L, |
|
|
const char * | good, |
|
|
const char * | bad, |
|
|
lua_CFunction | func ) |
|
static |
A wrapper for deprecated functions.
When called, handles the deprecation according to user settings and then calls func
.
- Exceptions
-
Lua | Error if required by the user settings. |
- Parameters
-
L | Lua state |
good | Name of good function/method |
bad | Name of deprecated function/method |
func | Actual implementation of function |
- Returns
- value from
func
References Profiler::avg(), Error, FATAL_ERROR_IF, g_profiler, get_deprecated_handling_mode(), porting::getTimeUs(), hash(), Ignore, murmur_hash_64_ua(), and warningstream.