eduran84 / LTN_Tracker

Other
7 stars 6 forks source link

0.9.4 Incorrect cargo alert on normal shipment. #17

Closed 0ptera closed 5 years ago

0ptera commented 5 years ago

I have two Requesters that always trigger incorrect cargo alert when they have lubricant delivered to them. Attached is the log where Refinery - Load (Acid & Lubricant) > Research Lab 1 - Unload 2 triggered the alert.

My first guess would be alerts get confused by seeing stack threshold and normal threshold.

factorio-current.log

eduran84 commented 5 years ago

Floating point fluids strike again... I am checking if the result of get_fluid_contents() matches the amount reported by LTN exactly, which fails in some cases due to rounding errors. I will change the comparison to allow some tolerance for fluids.

0ptera commented 5 years ago

Fluid deliveries cant be merged with items or other fluid deliveries. It's just not really possible to build a station capable of doing that, so LTN doesn't even support that.

This means you could potentially simplify the checks a lot. leaving provider: check if fluid names match between train and delivery leaving requester: check if any fluid is in the train

eduran84 commented 5 years ago

Did 0.9.5 fix the issue? Never saw it myself, so somewhat hard to test.

0ptera commented 5 years ago

Still happens in 0.9.5.

eduran84 commented 5 years ago

Can you send me another log created with 0.9.5? I changed the logging slightly. I guess it was not a floating point issue.

0ptera commented 5 years ago

This is odd.... doing the same as 15min ago in the same save. Now the false alert won't fire, regardless of logging active or not.