SirTyler / BetterTeleporter

Better Teleporters for Lethal Company
5 stars 5 forks source link

DrainPercent error #7

Closed haer0248 closed 9 months ago

haer0248 commented 9 months ago

The configuration file (cfg) states that 'DrainPercent' represents the percentage of total charge that battery items lose when teleporting, with a default value of 0.5 (equivalent to a 50% loss). However, the observed result is that 20% remains.

## The percentage (as float 0 to 1) of total charge that battery items lose when teleporting
# Setting type: Single
# Default value: 0.5
DrainPercent = 0.5 
# Only 50% is retained, not a 50% loss;
SirTyler commented 9 months ago

I'm not sure what you mean with "the observed result is that 20% remains". How it works is that whatever the current charge of the device is, 50% of that charge is lost on teleportation.

If you are not experiencing this then I would like a little more clarification:

haer0248 commented 9 months ago

Is this the normal teleporter or inverse. Inverse

Do you have any other mods installed, and if so which. No, about teleport only this

What was the charge of the device before and after teleportation. 100%

I explained it incorrectly; I've set up DrainPercent = 0.2, and the result is 20% remaining, not 80%.

SirTyler commented 9 months ago

Ah I understand, you are correct I had messed up the math. Pushing Version 1.2.1 now which should fix the issue.