Improve Configuration
* Replace `core` namespace with `minetest` * Use settingtypes.txt * Improve setting documentation
This commit is contained in:
parent
30f788b52a
commit
fb5fde7687
@ -16,6 +16,14 @@ Displaying the rank prefix on a player's nametag can be disabled by setting `ran
|
|||||||
|
|
||||||
Ranks also attempts to make privilege updates easier by allowing you to assign a set of privileges to each rank allowing a strict set of privileges for that rank, automatically granting missing privileges, and automatically revoking extra privileges (configurable per-rank). This means that when a player is given a rank with privilege definitions, they will automatically inherit the privileges specified. Whenever `/grant`, `/grantme`, or `/revoke` is called on a player, their privileges are updated according to rank and a warning is sent to the player who called the chatcommand if privileges are modified further.
|
Ranks also attempts to make privilege updates easier by allowing you to assign a set of privileges to each rank allowing a strict set of privileges for that rank, automatically granting missing privileges, and automatically revoking extra privileges (configurable per-rank). This means that when a player is given a rank with privilege definitions, they will automatically inherit the privileges specified. Whenever `/grant`, `/grantme`, or `/revoke` is called on a player, their privileges are updated according to rank and a warning is sent to the player who called the chatcommand if privileges are modified further.
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
All of the features provided by ranks can be configured directly from the advanced settings menu in the ranks subsection of the top-level Mods section. You can also configure ranks directly from `minetest.conf` with the settings listed below.
|
||||||
|
|
||||||
|
| Name | Type | Default | Description |
|
||||||
|
| -------------------- | ---- | ------- | ----------------------- |
|
||||||
|
| ranks.prefix_chat | bool | true | Prefix chat messages |
|
||||||
|
| ranks.prefix_nametag | bool | true | Prefix nametags |
|
||||||
|
|
||||||
### Packaged Ranks
|
### Packaged Ranks
|
||||||
By default, four ranks are included with the ranks mod, however, they are only for decoration purposes and do not modify any privileges as they should be configured by each server owner.
|
By default, four ranks are included with the ranks mod, however, they are only for decoration purposes and do not modify any privileges as they should be configured by each server owner.
|
||||||
|
|
||||||
|
2
init.lua
2
init.lua
@ -210,7 +210,7 @@ function ranks.remove_rank(player)
|
|||||||
})
|
})
|
||||||
-- Update privileges
|
-- Update privileges
|
||||||
local basic_privs =
|
local basic_privs =
|
||||||
core.string_to_privs(core.settings:get("basic_privs") or "interact,shout")
|
minetest.string_to_privs(minetest.settings:get("basic_privs") or "interact,shout")
|
||||||
minetest.set_player_privs(name, basic_privs)
|
minetest.set_player_privs(name, basic_privs)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
7
settingtypes.txt
Normal file
7
settingtypes.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# If this is enabled, chat send by a player with a rank including a defined
|
||||||
|
# prefix is prefixed with the rank prefix.
|
||||||
|
ranks.prefix_chat (Prefix Chat) bool true
|
||||||
|
|
||||||
|
# If this is enabled, player with a rank that has a prefix will have this
|
||||||
|
# prefix shown in their nametags.
|
||||||
|
ranks.prefix_nametag (Prefix Nametag) bool true
|
Loading…
Reference in New Issue
Block a user