mirror of
https://gitlab.com/4w/mtimer.git
synced 2024-11-24 16:23:44 +01:00
d65c1f11ba
Before all variables and “constants” (configuration variables) were stored in one single global table. Now the players get custom attributes set. This allows player-based displaying of the timer information. This will be done in subsequent commits. Tracking issue: https://github.com/dsohler/mtimer/issues/1
97 lines
3.3 KiB
Plaintext
97 lines
3.3 KiB
Plaintext
# Since MT is no real-time application and Lua isn't super
|
||
# fast when accessed through the API there is no need in
|
||
# setting this to 1 second. The default of 30 seconds is
|
||
# absolutely fine.
|
||
mtimer_update_interval (Seconds between updates) int 30
|
||
|
||
# The string will be displayed as provided here. There
|
||
# are some variables.
|
||
#
|
||
# +s = Session start time as formatted
|
||
# +c = Current time as formatted
|
||
# +r = Runtime of the current session
|
||
# +i = Current ingame time in 24h format
|
||
# +n = Following output will be in a new line
|
||
mtimer_format (Output string formatting) string Session from +s+nCurrent time: +c+nPlaytime: +r, Ingame time: +i
|
||
|
||
# A placeholder text that is shown before the timer
|
||
# function gets executed the first time
|
||
mtimer_placeholder (Placeholder for the timer) string [Initializing MTimer]
|
||
|
||
# The font color for the timer text
|
||
#
|
||
# Because the timer text is shown all the time the default
|
||
# color is not white but a bit darker so it doesn’t
|
||
# distract too much from the game.
|
||
#
|
||
# Use the hexadecimal color notation here (“HTML notation”
|
||
# but without the `#` sign in front).
|
||
mtimer_font_color (Font color for the timer text) string babdb6
|
||
|
||
|
||
[Time Formatting]
|
||
|
||
# Time when the current session was started. The session
|
||
# is based on when the user connected to the world. The
|
||
# format is this: https://www.lua.org/pil/22.1.html
|
||
mtimer_start ([+s] Session start time) string %c
|
||
|
||
# A hours:minutes timer that allows tracking of the
|
||
# current play time. The timer breaks if game time
|
||
# exceeds 24 hours.
|
||
#
|
||
# +h = Hours
|
||
# +m = Minutes
|
||
# +s = Seconds
|
||
mtimer_runtime ([+r] Session runtime) string +h:+m
|
||
|
||
# The current real-world time according to what the OS
|
||
# provides. Formatting this string is quite easy by using
|
||
# those tags: https://www.lua.org/pil/22.1.html
|
||
mtimer_current_time ([+c] Current time) string %c
|
||
|
||
# Ingame time in 24 hours format that was converted
|
||
# the provided decimal number and might not be 100
|
||
# percent exact.
|
||
#
|
||
# +h = hours with leading zeros
|
||
# +m = minutes with leading zeros
|
||
mtimer_ingame_time ([+i] Ingame time) string +h:+m Uhr
|
||
|
||
# Locale that will be used for the time formatting. The
|
||
# locale has to be provided by your system. On Linux see
|
||
# command `locale` for valid locales to use.
|
||
mtimer_locale (Format output locale) string C
|
||
|
||
|
||
[Positioning]
|
||
|
||
# Regardless of all other configuration: Show the timer
|
||
# in the GUI of the players - or do noit show it.
|
||
mtimer_show (Show at all) bool true
|
||
|
||
# "To account for differing resolutions, the position
|
||
# coordinates are the percentage of the screen, ranging
|
||
# in value from 0 to 1. 0 means left/top, 1 means
|
||
# right/bottom." Separate the numbers with a comma but
|
||
# without spaces.
|
||
#
|
||
# See http://dev.minetest.net/HUD#Fields
|
||
mtimer_position (Position) string 0,1
|
||
|
||
# "Specifies how the item will be aligned. It ranges
|
||
# from -1 to 1, with 0 being the center, -1 is moved to
|
||
# the left/up, and 1 is to the right/down." Separate the
|
||
# numbers with a comma but without spaces.
|
||
#
|
||
# See http://dev.minetest.net/HUD#Fields
|
||
mtimer_alignment (Alignment) string 1,-1
|
||
|
||
# "Specifies a pixel offset from the position. Not scaled
|
||
# to the screen size. [It adapts] to screen DPI as well
|
||
# as the user defined scaling factor!" Separate the
|
||
# numbers with a comma but without spaces.
|
||
#
|
||
# See http://dev.minetest.net/HUD#Fields
|
||
mtimer_offset (Offset) string 4,0
|