Skip to content

Commit

Permalink
Allow admins to open all race chests again
Browse files Browse the repository at this point in the history
Fixes a slight regression reported on the forum.
  • Loading branch information
Amaz1 committed Aug 26, 2019
1 parent cefe234 commit fac6382
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions mods/lottblocks/chests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ minetest.register_node("lottblocks:hobbit_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEhobbit=true}) then
if minetest.check_player_privs(player, {GAMEhobbit=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player, "lottblocks:hobbit_chest", default.get_chest_formspec(pos, "gui_hobbitbg.png")
)
Expand Down Expand Up @@ -85,7 +86,8 @@ minetest.register_node("lottblocks:gondor_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEman=true}) then
if minetest.check_player_privs(player, {GAMEman=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player,
"lottblocks:gondor_chest",
Expand Down Expand Up @@ -127,7 +129,8 @@ minetest.register_node("lottblocks:rohan_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEman=true}) then
if minetest.check_player_privs(player, {GAMEman=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player,
"lottblocks:rohan_chest",
Expand Down Expand Up @@ -169,7 +172,8 @@ minetest.register_node("lottblocks:elfloth_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEelf=true}) then
if minetest.check_player_privs(player, {GAMEelf=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player,
"lottblocks:elfloth_chest",
Expand Down Expand Up @@ -211,7 +215,8 @@ minetest.register_node("lottblocks:elfmirk_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEelf=true}) then
if minetest.check_player_privs(player, {GAMEelf=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player,
"lottblocks:elfmirk_chest",
Expand Down Expand Up @@ -253,7 +258,8 @@ minetest.register_node("lottblocks:mordor_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEorc=true}) then
if minetest.check_player_privs(player, {GAMEorc=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player,
"lottblocks:mordor_chest",
Expand Down Expand Up @@ -295,7 +301,8 @@ minetest.register_node("lottblocks:angmar_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEorc=true}) then
if minetest.check_player_privs(player, {GAMEorc=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player,
"lottblocks:angmar_chest",
Expand Down Expand Up @@ -338,7 +345,8 @@ minetest.register_node("lottblocks:dwarf_chest", {
on_rightclick = function(pos, node, clicker, itemstack)
local player = clicker:get_player_name()
local item = itemstack:get_name()
if minetest.check_player_privs(player, {GAMEdwarf=true}) then
if minetest.check_player_privs(player, {GAMEdwarf=true})
or minetest.check_player_privs(player, {GAMEwizard=true}) then
minetest.show_formspec(
player,
"lottblocks:dwarf_chest",
Expand Down

0 comments on commit fac6382

Please sign in to comment.