diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-01 18:20:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 18:20:15 -0500 |
commit | cff06ab167c1e0cc978794ddc94314f818c28011 (patch) | |
tree | a63f861628bb733e335c0f98b9d3fbf689834b76 /bags.lua | |
parent | e8529e7742a24290f592011e1b02f336e9cc7e59 (diff) | |
parent | 7ab8825460ad26a4697fec52a11c864a6cddde63 (diff) |
Merge pull request #91 from ForbiddenJ/master
Make trash configurable but preserve default functionality
Diffstat (limited to 'bags.lua')
-rw-r--r-- | bags.lua | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -51,8 +51,11 @@ for i = 1, 4 do elseif slots == 24 then formspec = formspec.."background[0.06,0.99;7.92,7.52;ui_bags_lg_form.png]" end - formspec = (formspec.."background[6.06,0;0.92,0.92;ui_bags_trash.png]" - .."list[detached:trash;main;6,0.1;1,1;]") + local player_name = player:get_player_name() -- For if statement. + if unified_inventory.trash_enabled or unified_inventory.is_creative(player_name) or minetest.get_player_privs(player_name).give then + formspec = (formspec.."background[6.06,0;0.92,0.92;ui_bags_trash.png]" + .."list[detached:trash;main;6,0.1;1,1;]") + end return {formspec=formspec} end, }) |