Unstable 1.2.4.0

This commit is contained in:
Markus Isberg
2023-11-30 13:53:00 +02:00
parent 8a2e2ea0ae
commit fb5ea537bf
210 changed files with 4201 additions and 1283 deletions
@@ -733,6 +733,12 @@ namespace Barotrauma
}
}
public override Quad2D GetTransformedQuad()
=> Quad2D.FromSubmarineRectangle(rect).Rotated(
FlippedX != FlippedY
? rotationRad
: -rotationRad);
/// <summary>
/// Checks if there's a structure items can be attached to at the given position and returns it.
/// </summary>
@@ -912,6 +918,12 @@ namespace Barotrauma
return Sections[sectionIndex].damage >= MaxHealth * LeakThreshold;
}
public bool SectionIsLeakingFromOutside(int sectionIndex)
{
if (sectionIndex < 0 || sectionIndex >= Sections.Length) { return false; }
return SectionIsLeaking(sectionIndex) && !Sections[sectionIndex].gap.IsRoomToRoom;
}
public int SectionLength(int sectionIndex)
{
if (sectionIndex < 0 || sectionIndex >= Sections.Length) return 0;
@@ -1304,8 +1316,8 @@ namespace Barotrauma
{
if (damageDiff < 0.0f)
{
attacker.Info?.IncreaseSkillLevel("mechanical".ToIdentifier(),
-damageDiff * SkillSettings.Current.SkillIncreasePerRepairedStructureDamage / Math.Max(attacker.GetSkillLevel("mechanical"), 1.0f));
attacker.Info?.ApplySkillGain(Barotrauma.Tags.MechanicalSkill,
-damageDiff * SkillSettings.Current.SkillIncreasePerRepairedStructureDamage);
}
}
}