Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
f022af66
Commit
f022af66
authored
13 years ago
by
Perttu Ahola
Browse files
Options
Downloads
Patches
Plain Diff
Update doc/lua_api.txt
parent
98c40f5e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/lua_api.txt
+57
-29
57 additions, 29 deletions
doc/lua_api.txt
with
57 additions
and
29 deletions
doc/lua_api.txt
+
57
−
29
View file @
f022af66
...
@@ -55,6 +55,8 @@ mods
...
@@ -55,6 +55,8 @@ mods
| |-- textures
| |-- textures
| | |-- modname_stuff.png
| | |-- modname_stuff.png
| | `-- modname_something_else.png
| | `-- modname_something_else.png
| |-- sounds
| |-- media
| `-- <custom data>
| `-- <custom data>
`-- another
`-- another
...
@@ -74,9 +76,9 @@ init.lua:
...
@@ -74,9 +76,9 @@ init.lua:
minetest.setting_get(name) and minetest.setting_getbool(name) can be used
minetest.setting_get(name) and minetest.setting_getbool(name) can be used
to read custom or existing settings at load time, if necessary.
to read custom or existing settings at load time, if necessary.
textures:
textures
, sounds, media
:
These textures will be transferred to the client and can be referred to
Media files (textures, sounds, whatever) that will be transferred to the
by the mod.
client and will be available for use
by the mod.
Naming convention for registered textual names
Naming convention for registered textual names
----------------------------------------------
----------------------------------------------
...
@@ -118,6 +120,58 @@ Mods should generally prefix their textures with modname_, eg. given
...
@@ -118,6 +120,58 @@ Mods should generally prefix their textures with modname_, eg. given
the mod name "foomod", a texture could be called
the mod name "foomod", a texture could be called
"foomod_foothing.png"
"foomod_foothing.png"
Textures are referred to by their complete name, or alternatively by
stripping out the file extension:
eg. foomod_foothing.png
eg. foomod_foothing
Sounds
-------
Only OGG files are supported.
For positional playing of sounds, only single-channel (mono) files are
supported. Otherwise OpenAL will play them non-positionally.
Mods should generally prefix their sounds with modname_, eg. given
the mod name "foomod", a sound could be called
"foomod_foosound.ogg"
Sounds are referred to by their name with a dot, a single digit and the
file extension stripped out. When a sound is played, the actual sound file
is chosen randomly from the matching sounds.
When playing the sound "foomod_foosound", the sound is chosen randomly
from the available ones of the following files:
foomod_foosound.ogg
foomod_foosound.0.ogg
foomod_foosound.1.ogg
...
foomod_foosound.9.ogg
Examples of sound parameter tables:
-- Play locationless on all clients
{
gain = 1.0, -- default
}
-- Play locationless to a player
{
to_player = name,
gain = 1.0, -- default
}
-- Play in a location
{
pos = {x=1,y=2,z=3},
gain = 1.0, -- default
max_hear_distance = 32, -- default
}
-- Play connected to an object, looped
{
object = <an ObjectRef>,
gain = 1.0, -- default
max_hear_distance = 32, -- default
loop = true, -- only sounds connected to objects can be looped
}
Representations of simple things
Representations of simple things
--------------------------------
--------------------------------
MapNode representation:
MapNode representation:
...
@@ -363,32 +417,6 @@ dump2(obj, name="_", dumped={})
...
@@ -363,32 +417,6 @@ dump2(obj, name="_", dumped={})
dump(obj, dumped={})
dump(obj, dumped={})
^ Return object serialized as a string
^ Return object serialized as a string
Sounds
-------
Examples of sound parameter tables:
-- Play locationless on all clients
{
gain = 1.0, -- default
}
-- Play locationless to a player
{
to_player = name,
gain = 1.0, -- default
}
-- Play in a location
{
pos = {x=1,y=2,z=3},
gain = 1.0, -- default
max_hear_distance = 32, -- default
}
-- Play connected to an object, looped
{
object = <an ObjectRef>,
gain = 1.0, -- default
max_hear_distance = 32, -- default
loop = true, -- only sounds connected to objects can be looped
}
minetest namespace reference
minetest namespace reference
-----------------------------
-----------------------------
minetest.get_current_modname() -> string
minetest.get_current_modname() -> string
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment