-
-
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
Lua function GetEquipFree("cargo") is not behaving as expected #3450
Comments
I don't have the code in front of me right now, but this issue sounds The thing is, we have a slightly schizophrenic approach to the cargo So, there is two things to do to makes things a bit more clear: First, Second, we'd scrap the mass limit entirely. It doesn't make much sense, tl;dr: it's not a bug, it's a legacy feature combined with possibly On Fri, Sep 11, 2015 at 5:46 PM, clausimu notifications@github.com wrote:
|
Yes, we had an issue with this, #3117, where the fix was to change what the "free cargo bar" showed. As I understand it, I don't think there's much to do in this issue, other than get cracking on fixing the inconsistencies in our schizophrenic volume vs. mass system. This is not a small task, and should be planned out first. Like what happens if you land on a planet with too much mass to take off? Are there spaceports whith such high gravity that even an empty ship can't take off? These things are discussed on the dev-forum: Equipment, cargo, mass and volume. I don't see anyone of "us" (dev team) working on this anytime even remotely "soon" at all, so this requires a volunteer to work on. |
(note that even if it were one of the core team, they'd still be volunteers On Sat, Sep 12, 2015 at 1:03 PM, Karl F notifications@github.com wrote:
|
Okay, let's call this a feature for now then. But for the non-core, still-needing-to-come-up-for-air-after-diving-into-pioneer-code people like me :-) - what is a way to determine the free commodity-cargo space available if I want to check if a certain tonnage of, say, hydrogen fuel can be loaded? |
|
I think the lua functions that return the space available for loading commodities don't take into account the loaded "extra" equipment that eats into the available space. The following is the output for a Xylophis outfitted with autospheric shielding and an autopilot (using up 1t of mass each), without any commodity cargo loaded. Real, in-game space to buy/load commodities is 8t.
Output expected => 10 (maximal capacity of the "cargo" slot)
Output provided => 10
Output expected => 2
Output provided => 0
Output expected => 8
Output provided => 10
I think either the "cargo" slot should be used only to describe the space that is available for commodity type cargo, in which case the ship:GetEquipSlotCapacity("cargo") function should take into account the equipment that has already eaten into this space. Or this equipment should be taken into account when returning occupied and/or free space.
A way to tell how much a given ship can load is important as safeguard. I know that trying to load more than what a ship can load will just return "0" and not load the item in question. But I think it would be cleaner if we could test for available space beforehand.
The text was updated successfully, but these errors were encountered: