Editing
Module:Ticks
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} function p.display(frame) local args = frame:getParent().args local amount = tonumber(args[1] or args["amount"]) or 0 local seconds = amount * 0.6 local timeDisplay local minutes = seconds / 60 if seconds >= 120 then if minutes == math.floor(minutes) then timeDisplay = string.format('<abbr title="Time in minutes">%.0fm</abbr>', minutes) elseif (minutes * 10) % 5 == 0 then -- divisible by 0.5 timeDisplay = string.format('<abbr title="Time in minutes">%.1fm</abbr>', minutes) end end if not timeDisplay then -- Fall back to seconds with 1 decimal place, strip .0 if present local secondsFormatted = string.format("%.1f", seconds):gsub("%.0$", "") timeDisplay = string.format('<abbr title="Time in seconds">%ss</abbr>', secondsFormatted) end return string.format("%s [[Ticks]] <small>(%s)</small>", tostring(amount):reverse():gsub("(%d%d%d)", "%1,"):reverse():gsub("^,", ""), timeDisplay) end return p
Summary:
Please note that all contributions to HighSpell Wiki are considered to be released under the CC BY-NC-SA 3.0 (see
HighSpell Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Ticks/doc
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit
View history
More
Purge cache
Search
Discord
HighLite
Navigation
Main page
Wiki policies
Style guide
Browser extension
Recent changes
Random page
Databases
Bestiary
Equipment
Items
Quests
Shops
Skills
Resources
Getting started
World map
Calculators
Game news
Tools
What links here
Related changes
Special pages
Page information
Cargo data