Skip to content

Commit

Permalink
Scale resources when B9PS changes the volume (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
StonesmileGit authored Mar 31, 2024
1 parent ed00517 commit db3ceb9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/Tanks/ModuleFuelTanks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,11 @@ void LoadMFTModuleFromConfigNode(BaseEventDetails data)
UpdateTypesAvailable(types);

// 'volume = x' provided
MFTConfigNode.TryGetValue("volume", ref volume);
var oldVolume = volume;
if (MFTConfigNode.TryGetValue("volume", ref volume) && oldVolume != 0)
{
ChangeResources(volume / oldVolume);
}

// 'basemass = x' provided
ParseBaseMass(MFTConfigNode);
Expand Down

0 comments on commit db3ceb9

Please sign in to comment.