diff options
author | ForbiddenJ <justinscomputercreations@gmail.com> | 2017-03-01 16:28:40 -0600 |
---|---|---|
committer | ForbiddenJ <justinscomputercreations@gmail.com> | 2017-03-01 16:28:40 -0600 |
commit | 7ab8825460ad26a4697fec52a11c864a6cddde63 (patch) | |
tree | a63f861628bb733e335c0f98b9d3fbf689834b76 /register.lua | |
parent | e8529e7742a24290f592011e1b02f336e9cc7e59 (diff) |
Make trash configurable but preserve default functionality
Diffstat (limited to 'register.lua')
-rw-r--r-- | register.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/register.lua b/register.lua index 127df7e..bd6a13b 100644 --- a/register.lua +++ b/register.lua @@ -175,8 +175,11 @@ unified_inventory.register_page("craft", { formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."list[current_player;craftpreview;6,"..formspecy..";1,1;]" formspec = formspec.."list[current_player;craft;2,"..formspecy..";3,3;]" - formspec = formspec.."label[7,"..(formspecy + 1.5)..";" .. F("Trash:") .. "]" - formspec = formspec.."list[detached:trash;main;7,"..(formspecy + 2)..";1,1;]" + if unified_inventory.trash_enabled or unified_inventory.is_creative(player_name) or minetest.get_player_privs(player_name).give then + formspec = formspec.."label[7,"..(formspecy + 1.5)..";" .. F("Trash:") .. "]" + formspec = formspec.."background[7,"..(formspecy + 2)..";1,1;ui_single_slot.png]" + formspec = formspec.."list[detached:trash;main;7,"..(formspecy + 2)..";1,1;]" + end formspec = formspec.."listring[current_name;craft]" formspec = formspec.."listring[current_player;main]" if unified_inventory.is_creative(player_name) then |