TellMeWhen

TellMeWhen

24M Downloads

[CF 1392] No Decimal Places

tmw-issue-import opened this issue ยท 2 comments

commented

Hi, im the guy who made the Boomkin rotation helper with no LUA.

 

I was hoping you could help me do a small amount of cleaning.

 

I need to display the "duration" of an icon in another icon.

 

My source icon displays its "duration" with no minutes and no decimal places as default like this

11

10

9

8

etc

The "duration" is how long is remaining on a buff.

(I use OmniCC with "never show decimal places" if that helps)

 

When I use your DogTags to display the source icons duration in other icon

[Duration(icon="TMW:icon:1Om2mpPsDX2m")

TMWFormatDuration
FormatDuration

I get results that don't display the duration in the same format as the source icon (no minutes and no decimal places)

I always end up with minutes and seconds or one decimal place such as:

1:01

1:00

0:09

or

1.6

1.5

1.4

 

I have tried formatting using custom code I found on the internet which almost gets what I want.

For Example

  [Duration(icon="TMW:icon:1Om2mpPsDX2m"):FormatDuration("function round(num, numDecimalPlaces)\n  local mult = 10^(numDecimalPlaces or 0)\n  return math.floor(num * mult + 0.5) / mult\nend")]

But this puts an "s" at the end of my seconds like this:

9s

8s

7s

6s

 

Is there any way that I can get my icon to check the duration of the source icon and display the duration exactly as the source icon does with no minutes, no decimal places, and no "s" at the end?

 

Thanks!

 

PS: I'm not a programmer and as you can see I have put in my best effort to make this work rather than bother you :D


Posted by CurseForge user bobthegoat2 | Imported from CurseForge issue #1392 | Raw

commented

[Duration(icon="TMW:icon:1Om2mpPsDX2m"):Round]


Posted by CurseForge user Cybeloras

commented

HAH.

 

So simple. I tried that using FormatDuration and TMWFormatDuration but never thought to try it like that.

 

Thanks ;)


Posted by CurseForge user bobthegoat2