mirror of
https://gitlab.com/4w/mtimer.git
synced 2025-01-24 13:31:28 +01:00
set/check player name/existence first and then run
This commit is contained in:
parent
8beb472234
commit
19bcb516ba
6
init.lua
6
init.lua
@ -55,14 +55,14 @@ end)
|
||||
|
||||
|
||||
function _xtimer_changeText(player)
|
||||
local playerName = player:get_player_name()
|
||||
if playerName == '' then return end
|
||||
|
||||
-- Save the game-detected locale. Fun fact: changing the locale on runtime
|
||||
-- from within a mod causes the UI to glitch out completely.
|
||||
local currentLocale = os.setlocale(nil)
|
||||
os.setlocale(_xtend.v.xtimer.format.locale)
|
||||
|
||||
local playerName = player:get_player_name()
|
||||
if playerName == '' then return end
|
||||
|
||||
local startTime = _xtend.v.xtimer.playerData[playerName].startTime
|
||||
local hudID = _xtend.v.xtimer.playerData[playerName].hudID
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user