Skip to content

Commit

Permalink
Make the meshnode privilege configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
orbea authored and stujones11 committed Nov 4, 2017
1 parent a41f109 commit 8881588
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ meshnode_yaw_amount = 0.017
meshnode_max_radius = 8
meshnode_show_in_creative = false
meshnode_enable_crafting = false
meshnode_disable_privilege = false
meshnode_fake_shading = false
meshnode_autoconf = false
```
Expand Down
1 change: 1 addition & 0 deletions api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ meshnode.config = {
max_radius = 8,
show_in_creative = false,
enable_crafting = false,
disable_privilege = false,
fake_shading = false,
autoconf = false,
}
Expand Down
3 changes: 2 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if is_singleplayer then
meshnode.config.max_radius = 16
meshnode.config.show_in_creative = true
meshnode.config.enable_crafting = true
mehsnode.config.disable_privilege = true
meshnode.config.fake_shading = true
meshnode.config.autoconf = true
else
Expand Down Expand Up @@ -51,7 +52,7 @@ if meshnode.config.show_in_creative == false then
end

local function has_privilege(name)
if is_singleplayer then
if meshnode.config.disable_privilege == true then
return true
end
return minetest.check_player_privs(name, {meshnode=true})
Expand Down

0 comments on commit 8881588

Please sign in to comment.