improve settings descriptions (thanks insanity54\!); add a small readme.
This commit is contained in:
parent
3ce1d2828b
commit
333dd0d6bc
13
README.md
13
README.md
@ -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.
|
@ -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
|
local invert_composition = name_monoid.settings.invert_composition
|
||||||
|
|
||||||
name_monoid.monoid_def = {
|
name_monoid.monoid_def = {
|
||||||
@ -134,7 +134,7 @@ name_monoid.monoid_def = {
|
|||||||
for i = 1, #texts do
|
for i = 1, #texts do
|
||||||
table.insert(parts, texts[i].text)
|
table.insert(parts, texts[i].text)
|
||||||
if i < #texts then
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# separator between components
|
# tag separator used to separate components in the name tag
|
||||||
name_monoid.component_separator (component separator) string
|
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
|
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
|
name_monoid.invert_composition (invert composition) bool false
|
||||||
|
Loading…
Reference in New Issue
Block a user