Jump to content

PowerlineFuseDurationSeconds capped at 24h?

Closed 1.0.24 1.0.25

SLATE
SLATE

Posted

I set PowerlineFuseDurationSeconds to 172800 and reloaded. When I place a fuse in, it shows that there are only approximately 24 hours left in the brand new fuse. Am I missing something or is there a bug?

Nikedemos

Posted

Hi there! This could be due to several issues, like 32-bit floating point precision limits (because behind the scenes, Grid Power must divide a large number by a tiny number, and because of how the exponent and mantissas in 32-bit floating point values are expressed and interpreted).

I do have an idea on how to solve it, since this has been bugging me (literally!) for a long time. Basically the solution would be to store the number of seconds remaining as an integer inside of Grid Power data files - or even better, inside the Grid Power fusebox entity itself - for the current/last fuse inserted, and then instead of the fuse being damaged by tiny, tiny floating point value,  this integer would be decremented by 1 each second, and the fuse would assume its new health based on dividing the remaining seconds by max seconds.

First though, I'd definitely try and determine if that's indeed the floating point issues you're currently running into, or is it a newly surface bug with Grid Power itself. Hit me up on Discord (I'm on the Codefling discord or you can join mine at https://discord.nikhub.dev) and let's see what can be done, much easier to discuss things in a bit more of a real-time manner.

Nikedemos

Posted

Changed Status from Pending to Fixed

Changed Fixed In to 1.0.25

1.7m

Downloads

Total number of downloads.

8k

Customers

Total customers served.

120.4k

Files Sold

Total number of files sold.

2.5m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.