aboutsummaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
authorLars Müller <34514239+appgurueu@users.noreply.github.com>2020-05-11 21:41:36 +0200
committerGitHub <noreply@github.com>2020-05-11 21:41:36 +0200
commit9ba24f89f5846de6a8f0d7e01c89acfee1254704 (patch)
tree868e0cee87d50271c4fe088d87aa2cb10a849f7f /src/script/common
parent6e1372bd894d955300c40d69e5c882e9cc7d7523 (diff)
downloadminetest-9ba24f89f5846de6a8f0d7e01c89acfee1254704.tar.gz
minetest-9ba24f89f5846de6a8f0d7e01c89acfee1254704.tar.bz2
minetest-9ba24f89f5846de6a8f0d7e01c89acfee1254704.zip
Damage texture modifier (#9833)
Adds a new object property "damage_texture_modifier"
Diffstat (limited to 'src/script/common')
-rw-r--r--src/script/common/c_content.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 540b7222f..de9634c42 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -327,6 +327,8 @@ void read_object_properties(lua_State *L, int index,
getfloatfield(L, -1, "zoom_fov", prop->zoom_fov);
getboolfield(L, -1, "use_texture_alpha", prop->use_texture_alpha);
+
+ getstringfield(L, -1, "damage_texture_modifier", prop->damage_texture_modifier);
}
/******************************************************************************/
@@ -409,6 +411,8 @@ void push_object_properties(lua_State *L, ObjectProperties *prop)
lua_setfield(L, -2, "zoom_fov");
lua_pushboolean(L, prop->use_texture_alpha);
lua_setfield(L, -2, "use_texture_alpha");
+ lua_pushlstring(L, prop->damage_texture_modifier.c_str(), prop->damage_texture_modifier.size());
+ lua_setfield(L, -2, "damage_texture_modifier");
}
/******************************************************************************/