summaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
authorVitaliy <silverunicorn2011@yandex.ru>2017-10-15 10:34:14 +0300
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-10-15 09:34:14 +0200
commit75320e7e88ab5088a46c9e42c1e789cbdacb13b0 (patch)
treeda71a3134f8b42bdabf25ef1df14c5e1a77a439e /src/script/common
parent6bab695479d42ac2b051b8a35639c32b22efbf8d (diff)
downloadminetest-75320e7e88ab5088a46c9e42c1e789cbdacb13b0.tar.gz
minetest-75320e7e88ab5088a46c9e42c1e789cbdacb13b0.tar.bz2
minetest-75320e7e88ab5088a46c9e42c1e789cbdacb13b0.zip
Real global textures (#6105)
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
Diffstat (limited to 'src/script/common')
-rw-r--r--src/script/common/c_content.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 8f08de1e5..4d8cdd352 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -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);