v1.4.4.1 (Blood in the Water Update)
This commit is contained in:
+15
-1
@@ -91,7 +91,7 @@ namespace Barotrauma.Items.Components
|
||||
ventList.Clear();
|
||||
foreach (MapEntity entity in item.linkedTo)
|
||||
{
|
||||
if (!(entity is Item linkedItem)) { continue; }
|
||||
if (entity is not Item linkedItem) { continue; }
|
||||
|
||||
Vent vent = linkedItem.GetComponent<Vent>();
|
||||
if (vent?.Item.CurrentHull == null) { continue; }
|
||||
@@ -132,5 +132,19 @@ namespace Barotrauma.Items.Components
|
||||
vent.IsActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
public float GetVentOxygenFlow(Vent targetVent)
|
||||
{
|
||||
if (ventList == null)
|
||||
{
|
||||
GetVents();
|
||||
}
|
||||
foreach ((Vent vent, float hullVolume) in ventList)
|
||||
{
|
||||
if (vent != targetVent) { continue; }
|
||||
return generatedAmount * 100.0f * (hullVolume / totalHullVolume);
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user