-
-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selling class 1 hyperdrive 4t only frees up 1t. #3117
Comments
OK, I'm not familiar with data/ships/*.lua, but changing |
OK. After investigation, I should say that the bug is NOT in the code. What happens is that the "cargo capacity" gauge doesn't directly use the capacity, but the totalCargo property. if slot == "cargo" then -- TODO: build a proper property system for the slots
ship:setprop("usedCargo", self.slots.cargo.__occupied)
else
ship:setprop("totalCargo", math.min(self.slots.cargo.__limit, self.slots.cargo.__occupied+ship.freeCapacity))
end So when you have the 4t drive, plus all the goodies, totalCargo is the m_stats.free_capacity + usedCargo, but when you remove it, bam, the slot size becomes the new limit. |
AKA: It's not a bug, it's a feature ;-) |
The conclusions from IRC seem to be
Possible resolution: Split the display of free tonnage in two numbers:
Now we need a volunteer implementing it ;) |
Hi, |
Glad to see you're interested @PVJeltz feel free to work on it and ask us anything you need to know either here or on our devloper forum |
Start at New Hope.
7t free.
Sell Class 1 hyperdrive (4t)
now "free: 8t" displayed in the footer, but I can still fill it with 10t.
Strangeness: This doesn't happen with class 3 hyperdrive (20t) on Earth starting ship.
Stranger than strange: Sell any and all equipment from New Hope starting ship: First item frees up 1t (no matter how big), rest of it frees up 0t. However, sell any and all equipemnt from Earth starting ship, and all works fine!
EDIT: Change startup ship on Earth to Pumpkinseed and same strangeness happens there.
The text was updated successfully, but these errors were encountered: