Major refactor to include tactical combat feed
This commit is contained in:
20
Data/Scripts/Miscellaneous/GameManager/Utilities.lua
Normal file
20
Data/Scripts/Miscellaneous/GameManager/Utilities.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
---Formats the game time in seconds to MM:SS.
|
||||
---@param gameTime number The game time in seconds.
|
||||
---@return string
|
||||
function FormatTime(gameTime)
|
||||
local minutes = Dirty_Floor(gameTime / 60)
|
||||
local minutesText = tostring(minutes)
|
||||
|
||||
if tonumber(minutes) < 10 then
|
||||
minutesText = "0" .. minutesText
|
||||
end
|
||||
|
||||
local seconds = Dirty_Floor(gameTime - (minutes * 60))
|
||||
local secondsText = tostring(seconds)
|
||||
|
||||
if tonumber(seconds) < 10 then
|
||||
secondsText = "0" .. secondsText
|
||||
end
|
||||
|
||||
return string.format("%s:%s", minutesText, secondsText)
|
||||
end
|
||||
Reference in New Issue
Block a user