-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtile.lua
38 lines (35 loc) · 1.71 KB
/
tile.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---@meta
---Tile definition
------------------
-- Can be a name (string) or `mt.TileTableDef`.
---@alias mt.TileDef mt.TileTableDef|string
-- Tile definition.
---@class mt.TileTableDef
---@field name string|nil
---@field animation mt.TileAnimDef|nil
-- Backface culling enabled by default for most nodes.
---@field backface_culling boolean|nil
-- 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.
---@field align_style "node"|"world"|"user"|nil
-- 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.
---@field scale integer|nil
-- * The texture's color will be multiplied with this color.
-- * The tile's color overrides the owning node's color in all cases.
---@field color mt.ColorSpec|nil
---@field image string|nil Deprecated synonym for field `name`.
-- Tile animation definition.
---@class mt.TileAnimDef
---@field type "vertical_frames"|"sheet_2d"|nil
---@field aspect_w number|nil Width of a frame in pixels ("vertical_frames").
---@field aspect_h number|nil Height of a frame in pixels ("vertical_frames").
---@field length number|nil Full loop length ("vertical_frames").
---@field frames_w number|nil Width in number of frames ("sheet_2d").
---@field frames_h number|nil Height in number of frames ("sheet_2d").
---@field frame_length number|nil Length of a single frame ("sheet_2d").