Jericho1060 / DU-Industry-HUD

A simple HUD for monitoring and managing industry in Dual Universe
GNU General Public License v3.0
38 stars 19 forks source link

Wrong values in container monitoring! #15

Closed 53m1k0l0n closed 4 years ago

53m1k0l0n commented 4 years ago

Hub: Here link to 2 containers one with 55 and one empty. 1

2

Containers: 3 4 5

Hub: Here even without a single link. 6

Jericho1060 commented 4 years ago

This is due to a hub, i have a problem getting the mass. This could also come to the fact that you or the one that deployed containers and hub have some talents to reduce mass i'll investigate that.

That is also a reason why i you do not have the % fill on containers hub

For containers, i do not have any problems on my side, just tested it

53m1k0l0n commented 4 years ago

The Default value are local container_size = "hub"

this local container_empty_mass = 0 must this local container_empty_mass = Hub base mass i think it was 55.80

The logic at hubs is the same as at containers. getMassById = current mass ( empty mass + item mass )

Hub is not influenced by the skills

"That is also a reason why i you do not have the % fill on containers hub" => The % are Containers not the Hub

But the Containers always have 1 even if there is nothing in it

Jericho1060 commented 4 years ago

i know my code :D The problem is that i have to found a way to know how many containers are linked to the hub as the container mass are added to the container

53m1k0l0n commented 4 years ago

Why do you want to make it so cumbersome for the hubs.

contentMass = core.getElementMassById(HubId) - 55.8

the mass of the container does not matter for the hub.

i use this for a while and it works great.

What surprises me is why an empty container shows a value of 1 and the one with 55 is 1 on it.

Jericho1060 commented 4 years ago

to be able to calculate the full volume to determine the percent fill as you can see, the storage management is still under developement

Jericho1060 commented 4 years ago

please, update the script to the lastest version, i just seen you do not have the gauge on containers

53m1k0l0n commented 4 years ago

i have the gauge https://user-images.githubusercontent.com/28620824/97501199-32403680-1971-11eb-8be3-aa505109d4a9.png

Jericho1060 commented 4 years ago

small update for fixing is done, maybe it will require more and it will be done later

Jericho1060 commented 4 years ago

this should fix the problem, here the change to do if you do not want to recopy the full script https://github.com/Jericho1060/DU-Industry-HUD/commit/18727b0da4e0b002c9a8ea1f3958a5cb2721b8c1#diff-df53d086d5af57998b9eec78280e4cfd3a52a22fabda27f465bd80cfe2e7a37b