Remove unusable 'minetest.setting_*' from client_lua_api.txt
lua_api.txt:
- Define the 'mod.conf' format
- More precise 'settingtypes.txt' format reference
- Document special sound files 'player_*damage'
- Group, sort and add 'not_in_creative_inventory' special group
- Define the 'Settings' format
- Warning about incorrect byte saving in 'StorageRef'
- Note about non-persistent player definitions fields
- Better 'leveldiff' and 'level' group description
Document new meaning of immortal=1 for players
Disable breathing if player is immortal
Hide builtin statbars if player immortal (delayed)
Co-authored-by: ClobberXD <ClobberXD@gmail.com>
This was previously documented under the general ObjectRef section with a note that this won't work on players. So I think this would fit better with Lua entity-only methods.
This PR also changes the title of the Lua entity-only section from `LuaEntitySAO-only` to `Lua entity only`.
Biome-defined dungeon nodes was added as a feature to MT 5.0.0.
So now remove most of the hardcoded dungeon node code that assumes a
game has stone, sandstone, desert stone, and no other stone types.
If biome-defined dungeon nodes are not found, dungeon nodes fall back
to the 'cobble' mapgen alias if present, if not present they fall back
to biome-defined 'stone'.
Remove now-unnecessary mapgen aliases from MapgenBasic. Non-mgv6 games
now only need to define 3 to 5 mapgen aliases.
Document dungeon parameters.
Make c_lava_source fallback to c_water_source as both are used as cave
liquids.
This allows games to specify biome cave liquids and avoid the old
hardcoded behaviour, but preserves the ability to have multiple
cave liquids in one biome, such as lava and water.
When multiple cave liquids are defined by the biome definition,
make each entire cave use a randomly chosen liquid, instead of
every small cave segment using a randomly chosen liquid.
Plus an optimisation:
Don't place nodes if cave liquid is defined as 'air'
* Force send a mapblock to a player.
Send a single mapblock to a specific remote player.
This is badly needed for mods and games where players are teleported
into terrain which may be not generated, loaded, or modified
significantly since the last player visit.
In all these cases, the player currently ends up in void, air, or
inside blocks which not only looks bad, but has the effect that the
player might end up falling and then the server needs to correct for
the player position again later, which is a hack.
The best solution is to send at least the single mapblock that the
player will be teleported to. I've tested this with ITB which does this
all the time, and I can see it functioning as expected (it even shows
a half loaded entry hallway, as the further blocks aren't loaded yet).
The parameter is a blockpos (table of x, y, z), not a regular pos.
The function may return false if the call failed. This is most likely
due to the target position not being generated or emerged yet, or
another internal failure, such as the player not being initialized.
* Always send mapblock on teleport or respawn.
This avoids the need for mods to send a mapblock on teleport or
respawn, since any call to `player:set_pos()` will pass this code.
Makes the liquid waving shader per-nodedef like waving leaves/plants,
instead of being applied to all liquids.
Like the waving leaves/plants shaders, the liquid waving shader can
also be applied to meshes and nodeboxes.
Derived from a PR by t0ny2.
Like randomwalk caves, preserve nodes that have 'is_ground_content = false',
to avoid dungeons that generate out beyond the edge of a mapchunk destroying
nodes added by mods in 'register_on_generated()'.
Issue discovered by, and original PR by, argyle77.
* Add sounds for falling and attached nodes
The sound specified in `node_definition.sounds.fall` is used.
When a falling node is spawned at a position or an attached node drops, the sound is played at this position.
* allow all sorts of soundspecs
- minetest.get_hit_params
- minetest.get_dig_params
- table.indexof
- Scope of minetest.register_alias
- Vector function parameters
- More explanation of when `minetest.on_player_receive_fields` is called
- Syntax/semantics of the fields in `minetest.on_player_receive_fields`
Store the rotation in the node as a 4x4 transformation matrix internally (through IDummyTransformationSceneNode), which allows more manipulations without losing precision or having gimbal lock issues.
Network rotation is still transmitted as Eulers, though, not as matrix. But it will stay this way in 5.0.
* Add missing tables of registered things
* Eliminate some duplication
Registration functions in 'Registered definitions' section merged into
'Registration functions' section.
* Misc. fixes
* Add privilege definition table
* Remove not-special soil group from special groups
* Merge two registration functions sections
* Move 'added to' information to tables section
Also fix some capitalization and missing periods
* Minor fixes
* Split Registration functions into two subsections
And update Registered definition tables to match order
* Fixes
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
Mods will now have to initialize the list/slot in order to define the default player hand.
They may use the inventory callbacks to prevent abuse of this list.
Improve item types descriptions.
Add replacements field to fuel definition.
Shorten two headers.
Markdown fixes.
Remove extra example.
Add blank lines after headings.
Linkify section references.
Bracketed section names can be linked when compiled to HTML.
Remove ^ and --[[ ]] symbols.
Fix comment indentation level.
Separate fields with blank lines.
Remove period from single-sentence descriptions, add periods to
multi-sentence descriptions.
Separate inline comments from the code with two spaces.
* Fix textarea formspec documentation
The label is shown and the background isn't
* Document the missing gamma correction when generating mip maps
* Remove duplicate text (such as size parameter descriptions)
Add missing section title for 'Node paramtypes'.
Clarify documentation for schematic Y-slice table.
Document that schematic Y-slice behaviour does not invert for ceiling
schematic decorations.
When the noise value or fill_ratio >= 10.0 complete coverage is enabled.
This disables random placement to avoid redundant multiple placements
at one position. Instead, 1 decoration per surface node is placed by
looping across each division.
'10' was chosen as this is the fill_ratio that previously created
very near complete coverage. The complete coverage feature therefore
integrates smoothly when noise is used for variable decoration density.
'fill_ratio = 10' should be used by modders who want a decoration
placed on every surface node. Compared to before such a decoration
placement will be 10 times faster.
Add new biome fields 'node_dungeon', 'node_dungeon_alt', 'node_dungeon_stair'.
If 'node_dungeon' is not defined dungeons fall back to classic behaviour.
Remove messy and imprecise dungeon material code from 'generateBiomes()'.
Code deciding dungeon materials is now in 'generateDungeons()' and uses the
biome at mapchunk centre for more precision.
Remove hardcoded 'MG_STONE' types as long intended.
Returns the decoration ID for the provided decoration name string.
For use with gennotify, to know the decoration IDs for use in
'minetest.set_gen_notify'.
* Add minetest.bulk_set_node call + experimental mod unittest
* Optimize set_node function to prevent triple lookup on contentfeatures
Do only one lookup for old, and try to merge old and new lookup if node is same than previous node
* Add benchmark function + optimize vector population to have real results
A useful function that applies 'core.is_protected()' to a 3D lattice of
points evenly spaced throughout a defined volume, with a parameter for
the maximum spacing of points.
The `disconnected_*` boxes are the opposites of the `connect_*` ones,
i.e. when a node has no suitable neighbours on the respective side, the
according disconnected box is drawn.
* disconnected_top
* disconnected_bottom
* disconnected_front
* disconnected_left
* disconnected_back
* disconnected_right
* disconnected (when there is *no* neighbour)
* disconnected_sides (when there are *no* neighbours to the sides)
* Add player deletion method to auth handler (fixes#6653)
* Support iterating over the auth database
There was no way to do this previously and a recent commit
broke doing this the "hacky" way by accessing `core.auth_table`.
Remove player object property 'can zoom'.
Add player object property 'zoom fov'.
Remove clientside setting for 'zoom fov'.
Object property default is 15 degrees in creative mode, zoom disabled
in survival mode.
Needed due to zoom now loading and/or generating distant world
according to zoom FOV.
Update object properties serialisation version to 3.
Properly document it instead of referencing the builtin handler as
authoritative "example" code.
Also adds definition of get_auth_handler() which was missing previously.
"diffferent" to "different"
"occuring" to "occurring"
"determin" to "determine"
"ommited" to "omitted"
"authetification" to "authentication"
"conponent" to "component"
"ommitted" to "omitted"
"celcius" to "Celsius"
"succesful" to "successful"
Misspellings found using GNU Spell version 1.0
Add "all_floors" and "all_ceilings" flags for simple and schematic
decorations. Decorations are placed on all floor and/or ceiling surfaces.
Decorations are placed before dungeon generation so placement in dungeons
is not possible.
Add 'getSurfaces()' function to mapgen.cpp that returns 2 arrays of y
coordinates for all floor and ceiling surfaces in a specified node column.
Move 'getHeight()' checks into DecoSimple and DecoSchematic. Delete
'getHeight()' functions.
* Fix default item callbacks to work with nil users
* item.lua: Handle node drops for invalid players
The if-condition for the dropping loop is the same as `inv`, which means that the 2nd possible definition of `give_item` is never used.
Remove redundant `local _, dropped_item`
Formspec input for each individual noise parameter and flag.
Allow noise flags to be set in advanced settings, previously only settable
in minetest.conf.
Standardise 'group format' for noise parameters set in minetest.conf, as
only these support noise flags. However the older 'single line' format is
still accepted to support existing minetest.conf files.
Therefore auto-generate minetest.conf.example with noise parameters in
'group format'.
Setting 'type' in settingtypes.txt is now either 'noise_params_2D' or
'noise_params_3D', the dimension number is displayed in the advanced
settings edit page.
Necessary for placing the base cube of 'plantlike_rooted' drawtype in the
seabed instead of on it.
Useful for placing decorations sunk into, or buried in, the ground.
If 'param2_max' is not used, parameter 'param2' works as before for
compatibility.
If 'param2_max' is used, 'param2' and 'param2_max' become the lower
and upper bounds of a per-decoration random param2.
Increase scrollrate depending on fontsize
Scroll on mousewheel
Allow scrolling and marking text on non writable textareas
Update lua api about readonly mode
Show scrollbar if text overflows
If either of the 2 noise parameters are omitted the ore will occur from y_min
to y_max in a simple horizontal stratum. As this does not compute noise
performance improves, and is ideal for placing many layers.
Clean up some nearby ore documentation.
* Add no_static_save property to luaentites to not save them statically.
This allows for temporary objects that would get deleted anyway as soon as they are loaded again without the static saving overhead.
* Use positive meaning for static_save object property
* Invert meaning also for the LUA parameter
Note: getboolfield() does not change &result when field does not exist, so it defaults to the default value in the header file, which is 'true'.
* Extend push_object_properties()
Implement network communication for channels
* Implement ModChannel manager server side to route incoming messages from clients to other clients
* Add signal handler switch on client & ModChannelMgr on client to handle channels
* Add Lua API bindings + client packet sending + unittests
* Implement server message sending
* Add callback from received message handler to Lua API using registration method
Feature is unnecessary and would greatly complicate future development,
it would also make 'get biome at pos' extremely complex.
Mgv7: Revert option to repeat surface biomes in floatlands, which
depended on the above.
The 'glow' value is added to the ambient light value.
Negative 'glow' disables light's effect on object colour, for faking
self-lighting, UI-style entities, or programmatic colouring in mods.
Dig prediction allows clients to remove dug nodes without
waiting for server acknowledgement.
This patch allows mods to override dig prediction,
it can either be turned off or a different "prediction node"
can be selected.
For precise control of schematic vertical position relative to the
'place_on' node.
Avoids workarounds that add empty nodes to a schematic and therefore
reduce performance.
Also remove long-unused decoration cutoff code.
* Implement minetest.register_on_userlimit_check
This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP
Only one mod needs to permit it.
Move core part for builtin privileges checks to builtin
Creates a single undulating ore stratum that is continuous across mapchunk
borders and horizontally spans the world.
Due to being continuous is ideal for creating bands of alternative stone
type running through cliffs and mountains, or underground layers.
Add missing documentation of 'ore_param2' parameter.
* Fix animation frame_speed and blend loosing precision due to incorrect data type
Add lua function set_animation_frame_speed to update the frame speed without resetting the animation to start