diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-05-11 14:07:30 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-05-11 14:07:30 +0200 |
commit | 4f613bbf5118ebe8c3610514e7f4206e930783bf (patch) | |
tree | bcb4bbb7609019f948e31b7749e1beb6b23e634d /builtin | |
parent | c86dcd0f682f76339989afec255bf3d7078db096 (diff) | |
download | dragonfireclient-4f613bbf5118ebe8c3610514e7f4206e930783bf.tar.xz |
Include tile definitions in get_node_def; Client-side minetest.object_refs table
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/client/register.lua | 1 | ||||
-rw-r--r-- | builtin/common/misc_helpers.lua | 9 | ||||
-rw-r--r-- | builtin/game/item.lua | 9 |
3 files changed, 10 insertions, 9 deletions
diff --git a/builtin/client/register.lua b/builtin/client/register.lua index 835ec5002..6a6d8e13c 100644 --- a/builtin/client/register.lua +++ b/builtin/client/register.lua @@ -110,3 +110,4 @@ core.registered_on_object_hp_change, core.register_on_object_hp_change = make_re core.registered_nodes = {} core.registered_items = {} +core.object_refs = {} diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index b86d68f5f..308e2c7c7 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -785,3 +785,12 @@ end function core.is_nan(number) return number ~= number end + +function core.inventorycube(img1, img2, img3) + img2 = img2 or img1 + img3 = img3 or img1 + return "[inventorycube" + .. "{" .. img1:gsub("%^", "&") + .. "{" .. img2:gsub("%^", "&") + .. "{" .. img3:gsub("%^", "&") +end diff --git a/builtin/game/item.lua b/builtin/game/item.lua index dc0247e5f..cc0314e67 100644 --- a/builtin/game/item.lua +++ b/builtin/game/item.lua @@ -15,15 +15,6 @@ end -- Item definition helpers -- -function core.inventorycube(img1, img2, img3) - img2 = img2 or img1 - img3 = img3 or img1 - return "[inventorycube" - .. "{" .. img1:gsub("%^", "&") - .. "{" .. img2:gsub("%^", "&") - .. "{" .. img3:gsub("%^", "&") -end - function core.dir_to_facedir(dir, is6d) --account for y if requested if is6d and math.abs(dir.y) > math.abs(dir.x) and math.abs(dir.y) > math.abs(dir.z) then |