improve settings descriptions (thanks insanity54\!); add a small readme.

This commit is contained in:
flux 2023-05-20 15:29:16 -07:00
parent 3ce1d2828b
commit 333dd0d6bc
Signed by: flux
GPG Key ID: 9333B27816848A15
3 changed files with 21 additions and 6 deletions

View File

@ -0,0 +1,13 @@
# name_monoid
a player monoid for controlling the player's nametag.
this is an API, no game behavior is changed by installing this w/out installing things that make use of it.
possible uses include listing a player's "clan" next to their name, or showing a timer w/ how long they've been AFK
over their name.
##### credits
* (c) fluxionary 2022,2023 LGPL
* credit to insanity54 for better settings descriptions.

View File

@ -1,4 +1,4 @@
local component_separator = name_monoid.settings.component_separator
local tag_separator = name_monoid.settings.tag_separator
local invert_composition = name_monoid.settings.invert_composition
name_monoid.monoid_def = {
@ -134,7 +134,7 @@ name_monoid.monoid_def = {
for i = 1, #texts do
table.insert(parts, texts[i].text)
if i < #texts then
table.insert(parts, texts[i].text_separator or component_separator)
table.insert(parts, texts[i].text_separator or tag_separator)
end
end

View File

@ -1,8 +1,10 @@
# separator between components
name_monoid.component_separator (component separator) string
# tag separator used to separate components in the name tag
name_monoid.tag_separator (tag separator) string " "
# show the player's name
# whether to show player names above their head when they join
# set to true to show names, false to hide names
name_monoid.show_name (show name) bool true
# invert the order of composition
# invert composition determines the order of components in the name tag
# set to true to invert the order, false to keep the order as defined
name_monoid.invert_composition (invert composition) bool false