v1.4.4.1 (Blood in the Water Update)

This commit is contained in:
Regalis11
2024-04-24 18:09:05 +03:00
parent 89b91d1c3e
commit ff1b8951a7
397 changed files with 15250 additions and 6479 deletions
@@ -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;
}
}
}