Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
PipeSystem: Option to set the amount transferred from tanks to tanks
Browse files Browse the repository at this point in the history
  • Loading branch information
KylianB committed Jul 19, 2022
1 parent 89fd68f commit 26f53ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Binary file modified 1.3/Assemblies/PipeSystem.dll
Binary file not shown.
2 changes: 2 additions & 0 deletions Source/PipeSystem/PipeSystem/Def/PipeNetDef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class PipeNetDef : Def

public List<LinkOption> linkToRefuelables;

public float transferAmount = 100f;

internal Material offMat; // Off material

public override IEnumerable<string> ConfigErrors()
Expand Down
2 changes: 1 addition & 1 deletion Source/PipeSystem/PipeSystem/PipeNet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public virtual void PipeSystemTick()
// Actual transfer we will do
float availableCapacity = AvailableCapacity;
float toTransfer = availableCapacity > canTransfer ? canTransfer : availableCapacity;
float willTransfer = toTransfer > 100 ? 100 : toTransfer;
float willTransfer = toTransfer > def.transferAmount ? def.transferAmount : toTransfer;
// Draw from marked and distribute to others
DrawAmongStorage(willTransfer, markedForTransfer);
DistributeAmongStorage(willTransfer);
Expand Down

0 comments on commit 26f53ea

Please sign in to comment.