mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Real global textures (#6105)
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
This commit is contained in:
parent
6bab695479
commit
75320e7e88
26 changed files with 469 additions and 160 deletions
|
@ -431,6 +431,16 @@ TileDef read_tiledef(lua_State *L, int index, u8 drawtype)
|
|||
L, index, "tileable_horizontal", default_tiling);
|
||||
tiledef.tileable_vertical = getboolfield_default(
|
||||
L, index, "tileable_vertical", default_tiling);
|
||||
std::string align_style;
|
||||
if (getstringfield(L, index, "align_style", align_style)) {
|
||||
if (align_style == "user")
|
||||
tiledef.align_style = ALIGN_STYLE_USER_DEFINED;
|
||||
else if (align_style == "world")
|
||||
tiledef.align_style = ALIGN_STYLE_WORLD;
|
||||
else
|
||||
tiledef.align_style = ALIGN_STYLE_NODE;
|
||||
}
|
||||
tiledef.scale = getintfield_default(L, index, "scale", 0);
|
||||
// color = ...
|
||||
lua_getfield(L, index, "color");
|
||||
tiledef.has_color = read_color(L, -1, &tiledef.color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue