LuaStats.wiki
changeset 2022 654f68cfbeac
parent 2021 25a948f79196
child 2023 28eb488c6f8f
equal deleted inserted replaced
2021:25a948f79196 2022:654f68cfbeac
    32 === Values for `siPointType` ===
    32 === Values for `siPointType` ===
    33 
    33 
    34 For `siPointType`, we support a few common point types. Just set `statMessage` to one of the following values below:
    34 For `siPointType`, we support a few common point types. Just set `statMessage` to one of the following values below:
    35 
    35 
    36 || *Value of `statMessage`* || *Meaning* || *How it may appear in team rankings* ||
    36 || *Value of `statMessage`* || *Meaning* || *How it may appear in team rankings* ||
    37 || _Not set_ || Number of kills (default) || Team 1 (8 kills) ||
       
    38 || `"!POINTS"` || Number of points || Team 1 (25 points) ||
    37 || `"!POINTS"` || Number of points || Team 1 (25 points) ||
    39 || `"!CRATES"` || Number of crates || Team 1 (25 crates) ||
    38 || `"!CRATES"` || Number of crates || Team 1 (25 crates) ||
    40 || `"!TIME"` || Number of milliseconds, shown as seconds with 3 decimal places || Team 1 (0.025 seconds) ||
    39 || `"!TIME"` || Number of milliseconds, shown as seconds with 3 decimal places || Team 1 (0.025 seconds) ||
    41 || `"!TIME0"` … `"!TIME3"` || Number of milliseconds, shown as seconds with the decimal places specified in the number (e.g. `"!TIME2"` for 2 decimal places) || Team 1 (0.02 seconds) ||
    40 || `"!TIME0"` … `"!TIME3"` || Number of milliseconds, shown as seconds with the decimal places specified in the number (e.g. `"!TIME2"` for 2 decimal places) || Team 1 (0.02 seconds) ||
    42 || `"!EMPTY"` || Don't display anything besides the team name || Team 1 ||
    41 || `"!EMPTY"` || Don't display anything besides the team name || Team 1 ||
    43 || _Anything else_ || Custom text with number. Display `statMessage` after the number || Team 1 (25 stars) ||
    42 || _Anything else_ || Custom text with number. Display `statMessage` after the number || Team 1 (25 stars) ||
    44 
    43 
    45 The default text is is “kill”/“kills” and is used when you didn't use `siPointType`.
    44 If `siPointType` was not used, the point type will default to “number of kills” and is displayed in the ranking like “Team 1 (2 kills)”.
    46 
    45 
    47 The default and the special values with the exclamation mark will get automatically localized in the frontend, like the proper translation of the numerus form and the decimal point. Do not enclose the special values in `loc()` (see [LuaLibraryLocale]).
    46 The default point type and the special point types (those with the exclamation mark) will get localized in the frontend, including numerus form and decimal point. Do not enclose these special values in `loc()` (see [LuaLibraryLocale]).
    48 
    47 
    49 The custom text will not be automatically localized, so you can enclose it in `loc()`. But there's no support for the numerus form.
    48 If you use the custom text with number, it will not be localized by the frontend. You can enclose it in `loc()` in Lua. However, this type doesn't support localization of the numerus form and decimal point, so only use this one as a last resort.
    50 
    49 
    51 === Examples ===
    50 === Examples ===
    52 
    51 
    53 <code language="lua">
    52 <code language="lua">
    54 -- will automatically change the health icon to a star
    53 -- will automatically change the health icon to a star