Luanti
5.11.0-dev
▼
Luanti
The Minetest engine internal documentation
Deprecated List
►
Namespaces
►
Classes
▼
Files
▼
File List
►
benchmark
►
client
►
content
►
database
doc
►
gui
►
irrlicht_changes
►
mapgen
►
network
▼
script
►
common
►
cpp_api
▼
lua_api
►
l_areastore.cpp
►
l_areastore.h
l_auth.cpp
►
l_auth.h
l_base.cpp
►
l_base.h
l_camera.cpp
►
l_camera.h
►
l_client.cpp
►
l_client.h
l_client_common.cpp
►
l_client_common.h
l_client_sound.cpp
►
l_client_sound.h
►
l_craft.cpp
►
l_craft.h
►
l_env.cpp
►
l_env.h
►
l_http.cpp
►
l_http.h
►
l_internal.h
l_inventory.cpp
►
l_inventory.h
►
l_ipc.cpp
►
l_ipc.h
l_item.cpp
►
l_item.h
l_itemstackmeta.cpp
►
l_itemstackmeta.h
l_localplayer.cpp
►
l_localplayer.h
l_mainmenu.cpp
►
l_mainmenu.h
l_mainmenu_sound.cpp
►
l_mainmenu_sound.h
►
l_mapgen.cpp
►
l_mapgen.h
l_menu_common.cpp
►
l_menu_common.h
l_metadata.cpp
►
l_metadata.h
l_minimap.cpp
►
l_minimap.h
l_modchannels.cpp
►
l_modchannels.h
l_nodemeta.cpp
►
l_nodemeta.h
l_nodetimer.cpp
►
l_nodetimer.h
►
l_noise.cpp
►
l_noise.h
►
l_object.cpp
►
l_object.h
►
l_particleparams.h
l_particles.cpp
►
l_particles.h
l_particles_local.cpp
►
l_particles_local.h
l_pause_menu.cpp
►
l_pause_menu.h
l_playermeta.cpp
►
l_playermeta.h
►
l_rollback.cpp
►
l_rollback.h
l_server.cpp
►
l_server.h
►
l_settings.cpp
►
l_settings.h
l_storage.cpp
►
l_storage.h
►
l_util.cpp
►
l_util.h
l_vmanip.cpp
►
l_vmanip.h
scripting_client.cpp
►
scripting_client.h
scripting_emerge.cpp
►
scripting_emerge.h
►
scripting_mainmenu.cpp
►
scripting_mainmenu.h
scripting_pause_menu.cpp
►
scripting_pause_menu.h
scripting_server.cpp
►
scripting_server.h
►
server
►
threading
►
unittest
►
util
►
activeobject.h
►
activeobjectmgr.h
►
catch.cpp
►
catch.h
chat.cpp
►
chat.h
►
chat_interface.h
►
chatmessage.h
►
particles.cpp
►
sound.h
clientdynamicinfo.cpp
►
clientdynamicinfo.h
►
collision.cpp
►
collision.h
►
config.h
►
constants.h
►
content_mapnode.cpp
►
content_mapnode.h
►
content_nodemeta.cpp
►
content_nodemeta.h
►
convert_json.cpp
►
convert_json.h
►
craftdef.cpp
►
craftdef.h
►
daynightratio.h
►
debug.cpp
►
debug.h
►
defaultsettings.cpp
►
defaultsettings.h
►
dummygamedef.h
►
dummymap.h
emerge.cpp
►
emerge.h
►
emerge_internal.h
►
environment.cpp
►
environment.h
►
exceptions.h
face_position_cache.cpp
►
face_position_cache.h
►
filesys.cpp
►
filesys.h
►
gamedef.h
►
gameparams.h
►
gettext.cpp
►
gettext.h
►
gettext_plural_form.cpp
►
gettext_plural_form.h
►
gettime.h
►
httpfetch.cpp
►
httpfetch.h
►
hud.cpp
►
hud.h
►
inventory.cpp
►
inventory.h
►
inventorymanager.cpp
►
inventorymanager.h
►
irr_aabb3d.h
►
irr_gui_ptr.h
►
irr_v2d.h
►
irr_v3d.h
►
irrlichttypes.h
irrlichttypes_bloated.h
irrlichttypes_extrabloated.h
►
itemdef.cpp
►
itemdef.h
►
itemgroup.h
►
itemstackmetadata.cpp
►
itemstackmetadata.h
json-forwards.h
light.cpp
►
light.h
►
lighting.h
►
log.cpp
►
log.h
►
log_internal.h
►
main.cpp
►
map.cpp
►
map.h
map_settings_manager.cpp
►
map_settings_manager.h
►
mapblock.cpp
►
mapblock.h
►
mapnode.cpp
►
mapnode.h
mapsector.cpp
►
mapsector.h
metadata.cpp
►
metadata.h
►
migratesettings.h
►
modchannels.cpp
►
modchannels.h
►
modifiedstate.h
nameidmapping.cpp
►
nameidmapping.h
►
nodedef.cpp
►
nodedef.h
nodemetadata.cpp
►
nodemetadata.h
nodetimer.cpp
►
nodetimer.h
►
noise.cpp
►
noise.h
objdef.cpp
►
objdef.h
►
object_properties.cpp
►
object_properties.h
►
particles.h
►
pathfinder.cpp
►
pathfinder.h
►
player.cpp
►
player.h
►
porting.cpp
►
porting.h
►
porting_android.cpp
►
porting_android.h
►
profiler.cpp
►
profiler.h
►
raycast.cpp
►
raycast.h
reflowscan.cpp
►
reflowscan.h
remoteplayer.cpp
►
remoteplayer.h
rollback_interface.cpp
►
rollback_interface.h
►
serialization.cpp
►
serialization.h
►
server.cpp
►
server.h
►
serverenvironment.cpp
►
serverenvironment.h
►
servermap.cpp
►
servermap.h
►
settings.cpp
►
settings.h
►
settings_translation_file.cpp
►
skyparams.h
staticobject.cpp
►
staticobject.h
terminal_chat_console.cpp
►
terminal_chat_console.h
►
texture_override.cpp
►
texture_override.h
tileanimation.cpp
►
tileanimation.h
►
tool.cpp
►
tool.h
►
translation.cpp
►
translation.h
►
version.cpp
►
version.h
►
voxel.cpp
►
voxel.h
►
voxelalgorithms.cpp
►
voxelalgorithms.h
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
l_nodemeta.h
Go to the documentation of this file.
1
// Luanti
2
// SPDX-License-Identifier: LGPL-2.1-or-later
3
// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5
#pragma once
6
7
#include "
lua_api/l_base.h
"
8
#include "
lua_api/l_metadata.h
"
9
#include "
irrlichttypes_bloated.h
"
10
#include "
nodemetadata.h
"
11
12
class
ServerEnvironment
;
13
class
NodeMetadata
;
14
15
/*
16
NodeMetaRef
17
*/
18
19
class
NodeMetaRef
:
public
MetaDataRef
{
20
private
:
21
bool
m_is_local
=
false
;
22
// Set for server metadata
23
v3s16
m_p
;
24
ServerEnvironment
*
m_env
=
nullptr
;
25
// Set for client metadata
26
IMetadata
*
m_local_meta
=
nullptr
;
27
28
static
const
luaL_Reg
methodsServer
[];
29
static
const
luaL_Reg
methodsClient
[];
30
44
virtual
IMetadata
*
getmeta
(
bool
auto_create);
45
virtual
void
clearMeta
();
46
47
virtual
void
reportMetadataChange
(
const
std::string *name =
nullptr
);
48
49
virtual
void
handleToTable
(lua_State *L,
IMetadata
*_meta);
50
virtual
bool
handleFromTable
(lua_State *L,
int
table
,
IMetadata
*_meta);
51
52
// Exported functions
53
54
// get_inventory(self)
55
static
int
l_get_inventory
(lua_State *L);
56
57
// mark_as_private(self, <string> or {<string>, <string>, ...})
58
static
int
l_mark_as_private
(lua_State *L);
59
60
public
:
61
NodeMetaRef
(
v3s16
p
,
ServerEnvironment
*env);
62
NodeMetaRef
(
IMetadata
*meta);
63
64
~NodeMetaRef
() =
default
;
65
66
// Creates an NodeMetaRef and leaves it on top of stack
67
// Not callable from Lua; all references are created on the C side.
68
static
void
create
(lua_State *L,
v3s16
p
,
ServerEnvironment
*env);
69
70
// Client-sided version of the above
71
static
void
createClient
(lua_State *L,
IMetadata
*meta);
72
73
static
void
Register
(lua_State *L);
74
static
void
RegisterClient
(lua_State *L);
75
76
static
const
char
className
[];
77
};
19
class
NodeMetaRef
:
public
MetaDataRef
{
…
};
IMetadata
Definition
metadata.h:14
MetaDataRef
Definition
l_metadata.h:18
NodeMetaRef
Definition
l_nodemeta.h:19
NodeMetaRef::reportMetadataChange
virtual void reportMetadataChange(const std::string *name=nullptr)
Definition
l_nodemeta.cpp:40
NodeMetaRef::className
static const char className[]
Definition
l_nodemeta.h:76
NodeMetaRef::~NodeMetaRef
~NodeMetaRef()=default
NodeMetaRef::createClient
static void createClient(lua_State *L, IMetadata *meta)
Definition
l_nodemeta.cpp:177
NodeMetaRef::methodsClient
static const luaL_Reg methodsClient[]
Definition
l_nodemeta.h:218
NodeMetaRef::handleToTable
virtual void handleToTable(lua_State *L, IMetadata *_meta)
Definition
l_nodemeta.cpp:106
NodeMetaRef::m_env
ServerEnvironment * m_env
Definition
l_nodemeta.h:24
NodeMetaRef::m_is_local
bool m_is_local
Definition
l_nodemeta.h:21
NodeMetaRef::l_mark_as_private
static int l_mark_as_private(lua_State *L)
Definition
l_nodemeta.cpp:78
NodeMetaRef::l_get_inventory
static int l_get_inventory(lua_State *L)
Definition
l_nodemeta.cpp:64
NodeMetaRef::clearMeta
virtual void clearMeta()
Definition
l_nodemeta.cpp:34
NodeMetaRef::RegisterClient
static void RegisterClient(lua_State *L)
Definition
l_nodemeta.cpp:212
NodeMetaRef::create
static void create(lua_State *L, v3s16 p, ServerEnvironment *env)
Definition
l_nodemeta.cpp:168
NodeMetaRef::NodeMetaRef
NodeMetaRef(v3s16 p, ServerEnvironment *env)
Definition
l_nodemeta.cpp:154
NodeMetaRef::m_local_meta
IMetadata * m_local_meta
Definition
l_nodemeta.h:26
NodeMetaRef::getmeta
virtual IMetadata * getmeta(bool auto_create)
Retrieve metadata for a node.
Definition
l_nodemeta.cpp:18
NodeMetaRef::handleFromTable
virtual bool handleFromTable(lua_State *L, int table, IMetadata *_meta)
Definition
l_nodemeta.cpp:125
NodeMetaRef::methodsServer
static const luaL_Reg methodsServer[]
Definition
l_nodemeta.h:193
NodeMetaRef::m_p
v3s16 m_p
Definition
l_nodemeta.h:23
NodeMetadata
Definition
nodemetadata.h:24
ServerEnvironment
Definition
serverenvironment.h:219
ELoginRegister::Register
@ Register
v3s16
core::vector3d< s16 > v3s16
Definition
irr_v3d.h:13
irrlichttypes_bloated.h
table
static const struct table_key table[]
Definition
keycode.cpp:33
l_base.h
l_metadata.h
nodemetadata.h
p
static std::string p(std::string path)
Definition
test_filesys.cpp:55
script
lua_api
l_nodemeta.h
Generated on Sat Feb 1 2025 10:20:55 for Luanti by
1.11.0