1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-06 18:25:21 +01:00

More admonition boxes!

This commit is contained in:
Bradley Pierce
2024-01-25 21:27:56 -05:00
parent 4d18a89e5d
commit 5cb96fe27b
6 changed files with 156 additions and 107 deletions

View File

@@ -117,4 +117,5 @@ Run it:
2. `${PROJECT_SOURCE_DIR}/lib/irrlichtmt` (if existent) 2. `${PROJECT_SOURCE_DIR}/lib/irrlichtmt` (if existent)
3. Installation of IrrlichtMt in the system-specific library paths 3. Installation of IrrlichtMt in the system-specific library paths
4. For server builds with disabled `BUILD_CLIENT` variable, the headers from `IRRLICHT_INCLUDE_DIR` will be used. 4. For server builds with disabled `BUILD_CLIENT` variable, the headers from `IRRLICHT_INCLUDE_DIR` will be used.
* NOTE: Changing the IrrlichtMt build directory (includes system installs) requires regenerating the CMake cache (`rm CMakeCache.txt`) > [!NOTE]
> Changing the IrrlichtMt build directory (includes system installs) requires regenerating the CMake cache (`rm CMakeCache.txt`)

View File

@@ -156,7 +156,8 @@ The file is a key-value store of modpack details.
internal ID used to track versions. internal ID used to track versions.
* `title`: A human-readable title to address the modpack. * `title`: A human-readable title to address the modpack.
Note: to support 0.4.x, please also create an empty modpack.txt file. > [!NOTE]
> To support 0.4.x, please also create an empty modpack.txt file.
## Mod Directory Structure ## Mod Directory Structure
@@ -2101,9 +2102,10 @@ to games.
direction. Otherwise, the node is attached to the node below. direction. Otherwise, the node is attached to the node below.
* `2`: if the node is facedir or 4dir, the facedir or 4dir direction is checked. * `2`: if the node is facedir or 4dir, the facedir or 4dir direction is checked.
No effect for other nodes. No effect for other nodes.
Note: The "attaching face" of this node is tile no. 5 (back face).
* `3`: the node is always attached to the node below. * `3`: the node is always attached to the node below.
* `4`: the node is always attached to the node above. * `4`: the node is always attached to the node above.
> [!NOTE]
> The "attaching face" of this node is tile no. 5 (back face).
* `bouncy`: value is bounce speed in percent. * `bouncy`: value is bounce speed in percent.
If positive, jump/sneak on floor impact will increase/decrease bounce height. If positive, jump/sneak on floor impact will increase/decrease bounce height.
Negative value is the same bounciness, but non-controllable. Negative value is the same bounciness, but non-controllable.
@@ -2113,10 +2115,14 @@ to games.
* `2`: the node always gets the digging time 0.5 seconds (rail, sign) * `2`: the node always gets the digging time 0.5 seconds (rail, sign)
* `3`: the node always gets the digging time 0 seconds (torch) * `3`: the node always gets the digging time 0 seconds (torch)
* `disable_jump`: Player (and possibly other things) cannot jump from node * `disable_jump`: Player (and possibly other things) cannot jump from node
or if their feet are in the node. Note: not supported for `new_move = false` or if their feet are in the node.
> [!NOTE]
> Not supported for `new_move = false`
* `disable_descend`: Player (and possibly other things) cannot *actively* * `disable_descend`: Player (and possibly other things) cannot *actively*
descend in node using Sneak or Aux1 key (for liquids and climbable nodes descend in node using Sneak or Aux1 key (for liquids and climbable nodes
only). Note: not supported for `new_move = false` only).
> [!NOTE]
> Not supported for `new_move = false`
* `fall_damage_add_percent`: modifies the fall damage suffered when hitting * `fall_damage_add_percent`: modifies the fall damage suffered when hitting
the top of this node. There's also an armor group with the same name. the top of this node. There's also an armor group with the same name.
The final player damage is determined by the following formula: The final player damage is determined by the following formula:
@@ -2700,9 +2706,10 @@ background elements are drawn before all other elements.
* `scroll factor`: optional, defaults to `0.1`. * `scroll factor`: optional, defaults to `0.1`.
* Nesting is possible. * Nesting is possible.
* Some elements might work a little different if they are in a `scroll_container`. * Some elements might work a little different if they are in a `scroll_container`.
* Note: If you want the `scroll_container` to actually work, you also need to add a > [!NOTE]
scrollbar element with the specified name. Furthermore, it is highly recommended > If you want the `scroll_container` to actually work, you also need to add a
to use a `scrollbaroptions` element on this scrollbar. > scrollbar element with the specified name. Furthermore, it is highly recommended
> to use a `scrollbaroptions` element on this scrollbar.
### `scroll_container_end[]` ### `scroll_container_end[]`
@@ -2821,9 +2828,12 @@ background elements are drawn before all other elements.
* `true`: Only the fullscreen background color is drawn. * `true`: Only the fullscreen background color is drawn.
* `both`: The non-fullscreen and the fullscreen background color are drawn. * `both`: The non-fullscreen and the fullscreen background color are drawn.
* `neither`: No background color is drawn. * `neither`: No background color is drawn.
* Note: Leave a parameter empty to not modify the value. > [!NOTE]
* Note: `fbgcolor`, leaving parameters empty and values for `fullscreen` that > Leave a parameter empty to not modify the value.
are not bools are only available since formspec version 3.
> [!NOTE]
> `fbgcolor`, leaving parameters empty and values for `fullscreen` that
> are not bools are only available since formspec version 3.
### `background[<X>,<Y>;<W>,<H>;<texture name>]` ### `background[<X>,<Y>;<W>,<H>;<texture name>]`
@@ -3189,8 +3199,9 @@ background elements are drawn before all other elements.
* `state` is a list of states separated by the `+` character. * `state` is a list of states separated by the `+` character.
* If a state is provided, the style will only take effect when the element is in that state. * If a state is provided, the style will only take effect when the element is in that state.
* All provided states must be active for the style to apply. * All provided states must be active for the style to apply.
* Note: this **must** be before the element is defined.
* See [Styling Formspecs]. * See [Styling Formspecs].
> [!NOTE]
> This **must** be before the element is defined.
### `style_type[<selector 1>,<selector 2>,...;<prop1>;<prop2>;...]` ### `style_type[<selector 1>,<selector 2>,...;<prop1>;<prop2>;...]`
@@ -3654,8 +3665,9 @@ by any of the following notations:
Vectors used to be defined as tables of the form `{x = num, y = num, z = num}`. Vectors used to be defined as tables of the form `{x = num, y = num, z = num}`.
Since Minetest 5.5.0, vectors additionally have a metatable to enable easier use. Since Minetest 5.5.0, vectors additionally have a metatable to enable easier use.
Note: Those old-style vectors can still be found in old mod code. Hence, mod and > [!NOTE]
engine APIs still need to be able to cope with them in many places. > Those old-style vectors can still be found in old mod code. Hence, mod and
> engine APIs still need to be able to cope with them in many places.
Manually constructed tables are deprecated and highly discouraged. This interface Manually constructed tables are deprecated and highly discouraged. This interface
should be used to ensure seamless compatibility between mods and the Minetest API. should be used to ensure seamless compatibility between mods and the Minetest API.
@@ -3675,7 +3687,8 @@ Vectors can be indexed with numbers and allow method and operator syntax.
All these forms of addressing a vector `v` are valid: All these forms of addressing a vector `v` are valid:
`v[1]`, `v[3]`, `v.x`, `v[1] = 42`, `v.y = 13` `v[1]`, `v[3]`, `v.x`, `v[1] = 42`, `v.y = 13`
Note: Prefer letter over number indexing for performance and compatibility reasons. > [!NOTE]
> Prefer letter over number indexing for performance and compatibility reasons.
Where `v` is a vector and `foo` stands for any function name, `v:foo(...)` does Where `v` is a vector and `foo` stands for any function name, `v:foo(...)` does
the same as `vector.foo(v, ...)`, apart from deprecated functionality. the same as `vector.foo(v, ...)`, apart from deprecated functionality.
@@ -3784,10 +3797,12 @@ Operators can be used if all of the involved vectors have metatables:
* Returns the additive inverse of v. * Returns the additive inverse of v.
* `v1 + v2`: * `v1 + v2`:
* Returns the sum of both vectors. * Returns the sum of both vectors.
* Note: `+` cannot be used together with scalars. > [!NOTE]
> `+` cannot be used together with scalars.
* `v1 - v2`: * `v1 - v2`:
* Returns the difference of `v1` subtracted by `v2`. * Returns the difference of `v1` subtracted by `v2`.
* Note: `-` cannot be used together with scalars. > [!NOTE]
> `-` cannot be used together with scalars.
* `v * s` or `s * v`: * `v * s` or `s * v`:
* Returns `v` scaled by `s`. * Returns `v` scaled by `s`.
* `v / s`: * `v / s`:
@@ -4625,33 +4640,38 @@ inside the VoxelManip.
### Notes ### Notes
* Attempting to read data from a VoxelManip object before map is read will > [!NOTE]
result in a zero-length array table for `VoxelManip:get_data()`, and an > Attempting to read data from a VoxelManip object before map is read will
"ignore" node at any position for `VoxelManip:get_node_at()`. > result in a zero-length array table for `VoxelManip:get_data()`, and an
> "ignore" node at any position for `VoxelManip:get_node_at()`.
* If you attempt to use a VoxelManip to read a region of the map that has > [!NOTE]
already been generated, but is not currently loaded, that region will be > If you attempt to use a VoxelManip to read a region of the map that has
loaded from disk. This means that reading a region of the map with a > already been generated, but is not currently loaded, that region will be
VoxelManip has a similar effect as calling `minetest.load_area` on that > loaded from disk. This means that reading a region of the map with a
region. > VoxelManip has a similar effect as calling `minetest.load_area` on that
> region.
* If a region of the map has either not yet been generated or is outside the > [!NOTE]
map boundaries, it is filled with "ignore" nodes. Writing to regions of the > If a region of the map has either not yet been generated or is outside the
map that are not yet generated may result in unexpected behavior. You > map boundaries, it is filled with "ignore" nodes. Writing to regions of the
can use `minetest.emerge_area` to make sure that the area you want to > map that are not yet generated may result in unexpected behavior. You
read/write is already generated. > can use `minetest.emerge_area` to make sure that the area you want to
> read/write is already generated.
* Other mods, or the core itself, could possibly modify the area of the map > [!NOTE]
currently loaded into a VoxelManip object. With the exception of Mapgen > Other mods, or the core itself, could possibly modify the area of the map
VoxelManips (see above section), the internal buffers are not updated. For > currently loaded into a VoxelManip object. With the exception of Mapgen
this reason, it is strongly encouraged to complete the usage of a particular > VoxelManips (see above section), the internal buffers are not updated. For
VoxelManip object in the same callback it had been created. > this reason, it is strongly encouraged to complete the usage of a particular
> VoxelManip object in the same callback it had been created.
* If a VoxelManip object will be used often, such as in an `on_generated()` > [!NOTE]
callback, consider passing a file-scoped table as the optional parameter to > If a VoxelManip object will be used often, such as in an `on_generated()`
`VoxelManip:get_data()`, which serves as a static buffer the function can use > callback, consider passing a file-scoped table as the optional parameter to
to write map data to instead of returning a new table each call. This greatly > `VoxelManip:get_data()`, which serves as a static buffer the function can use
enhances performance by avoiding unnecessary memory allocations. > to write map data to instead of returning a new table each call. This greatly
> enhances performance by avoiding unnecessary memory allocations.
## Methods ## Methods
@@ -5371,9 +5391,10 @@ Call these functions only at load time!
* `minetest.register_tool(name, item definition)` * `minetest.register_tool(name, item definition)`
* `minetest.override_item(name, redefinition)` * `minetest.override_item(name, redefinition)`
* Overrides fields of an item registered with register_node/tool/craftitem. * Overrides fields of an item registered with register_node/tool/craftitem.
* Note: Item must already be defined, (opt)depend on the mod defining it.
* Example: `minetest.override_item("default:mese", * Example: `minetest.override_item("default:mese",
{light_source=minetest.LIGHT_MAX})` {light_source=minetest.LIGHT_MAX})`
> [!NOTE]
> Item must already be defined, (opt.) depend on the mod defining it.
* `minetest.unregister_item(name)` * `minetest.unregister_item(name)`
* Unregisters the item from the engine, and deletes the entry with key * Unregisters the item from the engine, and deletes the entry with key
`name` from `minetest.registered_items` and from the associated item table `name` from `minetest.registered_items` and from the associated item table
@@ -5488,7 +5509,6 @@ Call these functions only at load time!
* Called when a new player enters the world for the first time * Called when a new player enters the world for the first time
* `minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage))` * `minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage))`
* Called when a player is punched * Called when a player is punched
* Note: This callback is invoked even if the punched player is dead.
* `player`: ObjectRef - Player that was punched * `player`: ObjectRef - Player that was punched
* `hitter`: ObjectRef - Player that hit * `hitter`: ObjectRef - Player that hit
* `time_from_last_punch`: Meant for disallowing spamming of clicks * `time_from_last_punch`: Meant for disallowing spamming of clicks
@@ -5498,6 +5518,8 @@ Call these functions only at load time!
the puncher to the punched. the puncher to the punched.
* `damage`: Number that represents the damage calculated by the engine * `damage`: Number that represents the damage calculated by the engine
* should return `true` to prevent the default damage mechanism * should return `true` to prevent the default damage mechanism
> [!NOTE]
> This callback is invoked even if the punched player is dead.
* `minetest.register_on_rightclickplayer(function(player, clicker))` * `minetest.register_on_rightclickplayer(function(player, clicker))`
* Called when the 'place/use' key was used while pointing a player * Called when the 'place/use' key was used while pointing a player
(not necessarily an actual rightclick) (not necessarily an actual rightclick)
@@ -5521,9 +5543,10 @@ Call these functions only at load time!
* Any of the above types may have additional fields from mods. * Any of the above types may have additional fields from mods.
* `reason.from` will be `mod` or `engine`. * `reason.from` will be `mod` or `engine`.
* `modifier`: when true, the function should return the actual `hp_change`. * `modifier`: when true, the function should return the actual `hp_change`.
Note: modifiers only get a temporary `hp_change` that can be modified by later modifiers. > [!NOTE]
Modifiers can return true as a second argument to stop the execution of further functions. > Modifiers only get a temporary `hp_change` that can be modified by later modifiers.
Non-modifiers receive the final HP change calculated by the modifiers. > Modifiers can return true as a second argument to stop the execution of further functions.
> Non-modifiers receive the final HP change calculated by the modifiers.
* `minetest.register_on_dieplayer(function(ObjectRef, reason))` * `minetest.register_on_dieplayer(function(ObjectRef, reason))`
* Called when a player dies * Called when a player dies
* `reason`: a PlayerHPChangeReason table, see register_on_player_hpchange * `reason`: a PlayerHPChangeReason table, see register_on_player_hpchange
@@ -5685,7 +5708,8 @@ Call these functions only at load time!
and can be converted to positions with `minetest.get_position_from_hash`. and can be converted to positions with `minetest.get_position_from_hash`.
The set is a table where the keys are hashes and the values are `true`. The set is a table where the keys are hashes and the values are `true`.
* `modified_block_count` is the number of entries in the set. * `modified_block_count` is the number of entries in the set.
* Note: callbacks must be registered at mod load time. > [!NOTE]
> Callbacks must be registered at mod load time.
## Settings-Related ## Settings-Related
@@ -5976,7 +6000,8 @@ handler.
* `override_meta` is an optional boolean (default: `false`). If this is set * `override_meta` is an optional boolean (default: `false`). If this is set
to true, the setting will become the active setting regardless of the map to true, the setting will become the active setting regardless of the map
metafile contents. metafile contents.
* Note: to set the seed, use `"seed"`, not `"fixed_map_seed"`. > [!NOTE]
> To set the seed, use `"seed"`, not `"fixed_map_seed"`.
* `minetest.set_mapgen_setting_noiseparams(name, value, [override_meta])` * `minetest.set_mapgen_setting_noiseparams(name, value, [override_meta])`
* Same as above, except value is a NoiseParams table. * Same as above, except value is a NoiseParams table.
* `minetest.set_noiseparams(name, noiseparams, set_default)` * `minetest.set_noiseparams(name, noiseparams, set_default)`
@@ -6364,10 +6389,11 @@ You can find mod channels communication scheme in `doc/mod_channels.png`.
* `step` determines how fast a sound will fade. * `step` determines how fast a sound will fade.
The gain will change by this much per second, The gain will change by this much per second,
until it reaches the target gain. until it reaches the target gain.
Note: Older versions used a signed step. This is deprecated, but old
code will still work. (the client uses abs(step) to correct it)
* `gain` the target gain for the fade. * `gain` the target gain for the fade.
Fading to zero will delete the sound. Fading to zero will delete the sound.
> [!NOTE]
> Older versions used a signed step. This is deprecated, but old code will
> still work. (the client uses `abs(step)` to correct it)
## Timing ## Timing
@@ -6481,19 +6507,22 @@ Variables:
* Returns false on error, true if the request was accepted * Returns false on error, true if the request was accepted
* The given callback will be called for every player as soon as the * The given callback will be called for every player as soon as the
media is available on the client. media is available on the client.
* Details/Notes:
* If `ephemeral`=false and `to_player` is unset the file is added to the media
sent to clients on startup, this means the media will appear even on
old clients if they rejoin the server.
* If `ephemeral`=false the file must not be modified, deleted, moved or
renamed after calling this function.
* Regardless of any use of `ephemeral`, adding media files with the same
name twice is not possible/guaranteed to work. An exception to this is the
use of `to_player` to send the same, already existent file to multiple
chosen players.
* Clients will attempt to fetch files added this way via remote media, * Clients will attempt to fetch files added this way via remote media,
this can make transfer of bigger files painless (if set up). Nevertheless this can make transfer of bigger files painless (if set up). Nevertheless
it is advised not to use dynamic media for big media files. it is advised not to use dynamic media for big media files.
> [!NOTE]
> If `ephemeral` = false and `to_player` is unset, then the file is added to the media
> sent to clients on startup. This means the media will appear even on old clients if
> they rejoin the server.
> [!NOTE]
> If `ephemeral` = false, then the file must not be modified, deleted, moved or
> renamed after calling this function.
> [!NOTE]
> Regardless of any use of `ephemeral`, adding media files with the same name twice
> is not possible/guaranteed to work. An exception to this is the use of `to_player`
> to send the same, already existent file to multiple chosen players.
## Bans ## Bans
@@ -6910,8 +6939,9 @@ Variables:
* `minetest.registered_entities` * `minetest.registered_entities`
* Map of registered entity prototypes, indexed by name * Map of registered entity prototypes, indexed by name
* Values in this table may be modified directly. * Values in this table may be modified directly.
Note: changes to initial properties will only affect entities spawned afterwards, > [!NOTE]
as they are only read when spawning. > Changes to initial properties will only affect entities spawned afterwards,
> as they are only read when spawning.
* `minetest.object_refs` * `minetest.object_refs`
* Map of object references, indexed by active object ID * Map of object references, indexed by active object ID
* `minetest.luaentities` * `minetest.luaentities`
@@ -7159,21 +7189,19 @@ an itemstring, a table or `nil`.
* `n`: number, default: `1` * `n`: number, default: `1`
* `equals(other)`: * `equals(other)`:
* returns `true` if this stack is identical to `other`. * returns `true` if this stack is identical to `other`.
* Note: `stack1:to_string() == stack2:to_string()` is not reliable, > [!NOTE]
as stack metadata can be serialized in arbitrary order. > `stack1:to_string() == stack2:to_string()` is not reliable, as stack
* Note: if `other` is an itemstring or table representation of an > metadata can be serialized in arbitrary order.
ItemStack, this will always return false, even if it is
"equivalent". > [!NOTE]
> If `other` is an itemstring or table representation of an `ItemStack`,
> this will always return false, even if it is "equivalent".
### Operators ### Operators
* `stack1 == stack2`: * `stack1 == stack2`:
* Returns whether `stack1` and `stack2` are identical. * Returns whether `stack1` and `stack2` are identical.
* Note: `stack1:to_string() == stack2:to_string()` is not reliable, * See above notes.
as stack metadata can be serialized in arbitrary order.
* Note: if `stack2` is an itemstring or table representation of an
ItemStack, this will always return false, even if it is
"equivalent".
## `ItemStackMetaRef` ## `ItemStackMetaRef`
@@ -7402,7 +7430,8 @@ child will follow movement and rotation of that bone.
* simulates using the 'place/use' key on the object * simulates using the 'place/use' key on the object
* triggers all consequences as if a real player had done this * triggers all consequences as if a real player had done this
* `clicker` is another `ObjectRef` which has clicked * `clicker` is another `ObjectRef` which has clicked
* note: this is called `right_click` for historical reasons only > [!NOTE]
> This is called `right_click` for historical reasons only.
* `get_hp()`: returns number of health points * `get_hp()`: returns number of health points
* `set_hp(hp, reason)`: set number of health points * `set_hp(hp, reason)`: set number of health points
* See reason in register_on_player_hpchange * See reason in register_on_player_hpchange
@@ -7423,7 +7452,8 @@ child will follow movement and rotation of that bone.
* `set_armor_groups({group1=rating, group2=rating, ...})` * `set_armor_groups({group1=rating, group2=rating, ...})`
* sets the object's full list of armor groups * sets the object's full list of armor groups
* same table syntax as for `get_armor_groups` * same table syntax as for `get_armor_groups`
* note: all armor groups not in the table will be removed > [!NOTE]
> All armor groups not in the table will be removed.
* `set_animation(frame_range, frame_speed, frame_blend, frame_loop)` * `set_animation(frame_range, frame_speed, frame_blend, frame_loop)`
* Sets the object animation parameters and (re)starts the animation * Sets the object animation parameters and (re)starts the animation
* Animations only work with a `"mesh"` visual * Animations only work with a `"mesh"` visual
@@ -7464,12 +7494,18 @@ child will follow movement and rotation of that bone.
* `set_detach()`: Detaches object. No-op if object was not attached. * `set_detach()`: Detaches object. No-op if object was not attached.
* `set_bone_position([bone, position, rotation])` * `set_bone_position([bone, position, rotation])`
* Shorthand for `set_bone_override(bone, {position = position, rotation = rotation:apply(math.rad)})` using absolute values. * Shorthand for `set_bone_override(bone, {position = position, rotation = rotation:apply(math.rad)})` using absolute values.
* **Note:** Rotation is in degrees, not radians. > [!WARNING]
* **Deprecated:** Use `set_bone_override` instead. > **Deprecated**, use `set_bone_override` instead.
> [!NOTE]
> Rotation is in degrees, not radians.
* `get_bone_position(bone)`: returns the previously set position and rotation of the bone * `get_bone_position(bone)`: returns the previously set position and rotation of the bone
* Shorthand for `get_bone_override(bone).position.vec, get_bone_override(bone).rotation.vec:apply(math.deg)`. * Shorthand for `get_bone_override(bone).position.vec, get_bone_override(bone).rotation.vec:apply(math.deg)`.
* **Note:** Returned rotation is in degrees, not radians. > [!WARNING]
* **Deprecated:** Use `get_bone_override` instead. > **Deprecated**, use `get_bone_override` instead.
> [!NOTE]
> Returned rotation is in degrees, not radians.
* `set_bone_override(bone, override)` * `set_bone_override(bone, override)`
* `bone`: string * `bone`: string
* `override`: `position = property, rotation = property, scale = property}` or `nil` * `override`: `position = property, rotation = property, scale = property}` or `nil`
@@ -7482,11 +7518,13 @@ child will follow movement and rotation of that bone.
* Multiplication in the case of `scale` * Multiplication in the case of `scale`
* `interpolation`: Old and new values are interpolated over this timeframe (in seconds) * `interpolation`: Old and new values are interpolated over this timeframe (in seconds)
* `override = nil` (including omission) is shorthand for `override = {}` which clears the override * `override = nil` (including omission) is shorthand for `override = {}` which clears the override
* **Note:** Unlike `set_bone_position`, the rotation is in radians, not degrees. > [!NOTE]
* Compatibility note: Clients prior to 5.9.0 only support absolute position and rotation. > Unlike `set_bone_position`, the rotation is in radians, not degrees.
All values are treated as absolute and are set immediately (no interpolation). > Compatibility note: Clients prior to 5.9.0 only support absolute position and rotation.
> All values are treated as absolute and are set immediately (no interpolation).
* `get_bone_override(bone)`: returns `override` in the above format * `get_bone_override(bone)`: returns `override` in the above format
* **Note:** Unlike `get_bone_position`, the returned rotation is in radians, not degrees. > [!NOTE]
> Unlike `get_bone_position`, the returned rotation is in radians, not degrees.
* `get_bone_overrides()`: returns all bone overrides as table `{[bonename] = override, ...}` * `get_bone_overrides()`: returns all bone overrides as table `{[bonename] = override, ...}`
* `set_properties(object property table)` * `set_properties(object property table)`
* `get_properties()`: returns a table of all object properties * `get_properties()`: returns a table of all object properties
@@ -7849,8 +7887,9 @@ child will follow movement and rotation of that bone.
* `sunrise_visible`: Boolean for whether the sunrise texture is visible. * `sunrise_visible`: Boolean for whether the sunrise texture is visible.
(default: `true`) (default: `true`)
* `scale`: Float controlling the overall size of the sun. (default: `1`) * `scale`: Float controlling the overall size of the sun. (default: `1`)
Note: For legacy reasons, the sun is bigger than the moon by a factor > [!NOTE]
of about `1.57` for equal `scale` values. > For legacy reasons, the sun is bigger than the moon by a factor
> of about `1.57` for equal `scale` values.
* `get_sun()`: returns a table with the current sun parameters as in `set_sun`. * `get_sun()`: returns a table with the current sun parameters as in `set_sun`.
* `set_moon(moon_parameters)`: * `set_moon(moon_parameters)`:
* Passing no arguments resets the moon to its default values. * Passing no arguments resets the moon to its default values.
@@ -7861,13 +7900,12 @@ child will follow movement and rotation of that bone.
will re-enable the mesh moon. (default: `"moon.png"`, if it exists) will re-enable the mesh moon. (default: `"moon.png"`, if it exists)
The texture appears non-rotated at sunrise / moonset and rotated 180 The texture appears non-rotated at sunrise / moonset and rotated 180
degrees (upside down) at sunset / moonrise. degrees (upside down) at sunset / moonrise.
Note: Relative to the sun, the moon texture is hence rotated by 180°.
You can use the `^[transformR180` texture modifier to achieve the same orientation.
* `tonemap`: A 512x1 texture containing the tonemap for the moon * `tonemap`: A 512x1 texture containing the tonemap for the moon
(default: `"moon_tonemap.png"`) (default: `"moon_tonemap.png"`)
* `scale`: Float controlling the overall size of the moon (default: `1`) * `scale`: Float controlling the overall size of the moon (default: `1`)
Note: For legacy reasons, the sun is bigger than the moon by a factor > [!NOTE]
of about `1.57` for equal `scale` values. > Relative to the sun, the moon texture is hence rotated by 180°.
> You can use the `^[transformR180` texture modifier to achieve the same orientation.
* `get_moon()`: returns a table with the current moon parameters as in `set_moon`. * `get_moon()`: returns a table with the current moon parameters as in `set_moon`.
* `set_stars(star_parameters)`: * `set_stars(star_parameters)`:
* Passing no arguments resets stars to their default values. * Passing no arguments resets stars to their default values.
@@ -8505,12 +8543,13 @@ gets activated (not loaded!)
* align style determines whether the texture will be rotated with the node * align style determines whether the texture will be rotated with the node
or kept aligned with its surroundings. "user" means that client or kept aligned with its surroundings. "user" means that client
setting will be used, similar to `glasslike_framed_optional`. setting will be used, similar to `glasslike_framed_optional`.
Note: supported by solid nodes and nodeboxes only.
* scale is used to make texture span several (exactly `scale`) nodes, * scale is used to make texture span several (exactly `scale`) nodes,
instead of just one, in each direction. Works for world-aligned instead of just one, in each direction. Works for world-aligned
textures only. textures only.
Note that as the effect is applied on per-mapblock basis, `16` should Note that as the effect is applied on per-mapblock basis, `16` should
be equally divisible by `scale` or you may get wrong results. be equally divisible by `scale` or you may get wrong results.
> [!NOTE]
> Supported by solid nodes and nodeboxes only.
* `{name="image.png", color=ColorSpec}` * `{name="image.png", color=ColorSpec}`
* the texture's color will be multiplied with this color. * the texture's color will be multiplied with this color.
* the tile's color overrides the owning node's color in all cases. * the tile's color overrides the owning node's color in all cases.
@@ -9453,8 +9492,9 @@ Parameters:
that utilize cooking recipes (e.g. for adding a furnace that utilize cooking recipes (e.g. for adding a furnace
node) need to implement replacements on their own node) need to implement replacements on their own
Note: Games and mods are free to re-interpret the cooktime in special > [!NOTE]
cases, e.g. for a super furnace that cooks items twice as fast. > Games and mods are free to re-interpret the cooktime in special
> cases, e.g. for a super furnace that cooks items twice as fast.
#### Example #### Example
@@ -9489,9 +9529,9 @@ Parameters:
that utilize fuels need to implement replacements that utilize fuels need to implement replacements
on their own on their own
Note: Games and mods are free to re-interpret the burntime in special > [!NOTE]
cases, e.g. for an efficient furnace in which fuels burn twice as > Games and mods are free to re-interpret the burntime in special cases,
long. > e.g. for an efficient furnace in which fuels burn twice as long.
#### Examples #### Examples

View File

@@ -115,8 +115,9 @@ by texture packs. All existing fallback textures can be found in the directory
* `wieldhand.png`: texture of the wieldhand * `wieldhand.png`: texture of the wieldhand
Note: The default textures of `player.png`, `player_back.png` and `wieldhand.png` > [!NOTE]
are placeholders intended to be overwritten by the game. > The default textures of `player.png`, `player_back.png` and `wieldhand.png`
> are placeholders intended to be overwritten by the game.
### Mainmenu textures ### Mainmenu textures

View File

@@ -340,12 +340,16 @@ See below for description.
# MapBlock Serialization Format # MapBlock Serialization Format
> **Notes**: > [!NOTE]
> * NOTE: Byte order is MSB first (big-endian). > Byte order is MSB first (big-endian).
> * NOTE: Zlib data is in such a format that Python's `zlib` at least can
> directly decompress. > [!NOTE]
> * NOTE: Since version 29 zstd is used instead of zlib. In addition, the entire > Zlib data is in such a format that Python's `zlib` at least can
> block is first serialized and then compressed (except the version byte). > directly decompress.
> [!NOTE]
> Since version 29 zstd is used instead of zlib. In addition, the entire
> block is first serialized and then compressed (except the version byte).
`u8` version `u8` version
* map format version number, see serialization.h for the latest number * map format version number, see serialization.h for the latest number

View File

@@ -23,7 +23,8 @@ Change the value param2 of nodes.
* Place: Subtract 1 from param2 * Place: Subtract 1 from param2
* Sneak+Place: Subtract 8 from param2 * Sneak+Place: Subtract 8 from param2
Note: Use the debug screen (F5) to see the param2 of the pointed node. > [!NOTE]
> Use the debug screen (F5) to see the param2 of the pointed node.
## Falling Node Tool ## Falling Node Tool
Turns nodes into falling nodes. Turns nodes into falling nodes.

View File

@@ -16,9 +16,10 @@ It is recommended to set the textdomain name (for `minetest.get_translator`) to
of the mod name as the script will automatically detect it. If the textdomain name differs, of the mod name as the script will automatically detect it. If the textdomain name differs,
you may have to manually change the `# textdomain:` line of newly generated files. you may have to manually change the `# textdomain:` line of newly generated files.
**Note:** In each `*.tr` file, there **must** be only one textdomain. Multiple textdomains in > [!NOTE]
the same file are not supported by this script and any additional textdomain line will be > In each `*.tr` file, there **must** be only one textdomain. Multiple textdomains in
removed. > the same file are not supported by this script and any additional textdomain line will be
> removed.
### Defining the helper functions ### Defining the helper functions
@@ -134,8 +135,9 @@ The script will add (if not already present) a `# textdomain: <modname>` at the
will be moved to the top, with the textdomain name being left intact (even if it differs will be moved to the top, with the textdomain name being left intact (even if it differs
from the mod name). from the mod name).
**Note:** If there are multiple `# textdomain:` lines in the file, all of them except the > [!NOTE]
first one will be deleted. This script only supports one textdomain per `*.tr` file. > If there are multiple `# textdomain:` lines in the file, all of them except the
> first one will be deleted. This script only supports one textdomain per `*.tr` file.
### Strings ### Strings