-
Notifications
You must be signed in to change notification settings - Fork 66
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
Unmanaged Resource feature discussion #218
Comments
// The UNMANAGED_RESOURCE reserves a portion of a resource that will not be touched by MFS/RF. @part[Mk2Pod]
{
RESOURCE
{
name = Oxygen
amount = 5100
maxAmount = 5100
}
MODULE
{
name = ModuleFuelTanks
basemass = -1
volume = 665
type = ServiceModule
UNMANAGED_RESOURCE
{
name = Oxygen
amount = 5100
maxAmount = 5100
}
}
} |
Great stuff! |
That build should be mostly bug free - but you know how that goes. If I were totally sure it were bug free then I'd just push the changes live and call it a day. A couple of issues: If there is a discrepancy between how FuelTank treats an amount of resource and what the UNMANAGED_RESOURCE says there is then FuelTank wins. For instance if I say there is unmanaged CarbonDioxide with amounts of 1000/1000 and the player were to add CarbonDioxide, then the actual amount will be 0/1000 because CarbonDioxide amount always defaults to 0 in the TANK node. And that's really how it should be as far as life support mods go so it's probably a non-issue The other thing is that the code doesn't currently guard against defining multiple UNMANAGED_RESOURCE of the same named resource, and it should. If the author were to define multiples of a single resource, only one would be used which might result in unintended behavior that wouldn't be reported or logged, so that's something I intend to take care of before this goes live. |
(this was implemented in 6efb387) |
Creating this to have a place to discuss and track an upcoming feature: Unmanaged Resources. Put simply, this is the ability to define in a part config resources that will not be touched by Modular Fuel System or Real Fuels.
This primarily has life support mods in mind which might (for example) define Oxygen on a command pod which will also likely have ModuleFuelTanks defined on it. Typically we would define a number of TANK nodes with the life support resources so that they will not be deleted by MFS along with other resources. However, they can still be accidentally deleted by the player and there is no way to exempt those resources.
Now it is possible to do that. We can define as part of the ModuleFuelTanks config any number of UNMANAGED_RESOURCE nodes which will define a quantity of a given resource that will exist on the part separate from any tanks that it might have been configured with or that the player might have added. Details to follow but basically, if we define 5000 units of unmanaged Oxygen on a part, then the amount of Oxygen resource will be 5000 plus any Oxygen the player might have added via MFT. Attached is a build for KSP 1.3.1 (ignore any version errors)
RealFuels_for_1.3.1_unmanaged_resources.zip
The text was updated successfully, but these errors were encountered: