diff --git a/README.md b/README.md index e69de29..7cd148a 100644 --- a/README.md +++ b/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. diff --git a/monoid.lua b/monoid.lua index 00dcca7..8fec5c1 100644 --- a/monoid.lua +++ b/monoid.lua @@ -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 diff --git a/settingtypes.txt b/settingtypes.txt index 88c8210..a0ae4ff 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -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