ide-helper: add notations for TileDefinition.

This commit is contained in:
alek13
2025-03-06 00:57:04 +03:00
parent 0a794a5522
commit db5e414d98
2 changed files with 37 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ local NodeDefinition = {
---
--- Textures of node; +Y, -Y, +X, -X, +Z, -Z
--- List can be shortened to needed length.
--- @type string[]
--- @type string[]|TileDefinition[]
tiles = nil,
--- {tile definition 1, def2, def3, def4, def5, def6}

View File

@@ -0,0 +1,36 @@
--- @class TileDefinition
local TileDefinition = {
--- @type string
name = "image.png",
--- @type TileAnimationDefinition
animation = nil,
--- Backface culling enabled by default for most nodes.
--- @type boolean
backface_culling = true,
--- One of `{"node"|"world"|"user"}`.
---
--- `align_style` determines whether the texture will be rotated with the node or kept aligned with its surroundings.
---
--- `"user"` means that client setting will be used, similar to `glasslike_framed_optional`.
---
--- **Note:** supported by solid nodes and nodeboxes only.
--- @type string
align_style = "none",
--- `scale` is used to make texture span several (exactly scale) nodes, instead of just one, in each direction.
---
--- Works for world-aligned textures only.
---
--- **Note** that as the effect is applied on per-mapblock basis,
--- 16 should be equally divisible by scale or you may get wrong results.
--- @type number
scale = 1,
--- - the texture's color will be multiplied with this color.
--- - the tile's color overrides the owning node's color in all cases.
--- @type string|ColorSpec
color = ""
}