summaryrefslogtreecommitdiff
path: root/src/script/common/c_content.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/common/c_content.cpp')
-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);