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
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Voronoi2;
namespace Barotrauma
{
@@ -27,9 +28,10 @@ namespace Barotrauma
UpdateMoney = 13,
UpdatePermanentStats = 14,
RemoveFromCrew = 15,
LatchOntoTarget = 16,
MinValue = 0,
MaxValue = 15
MaxValue = 16
}
private interface IEventData : NetEntityEvent.IData
@@ -135,7 +137,56 @@ namespace Barotrauma
ObjectiveType = objectiveType;
}
}
public readonly struct LatchedOntoTargetEventData : IEventData
{
public EventType EventType => EventType.LatchOntoTarget;
public readonly bool IsLatched;
public readonly UInt16 TargetCharacterID = NullEntityID;
public readonly UInt16 TargetStructureID = NullEntityID;
public readonly int TargetLevelWallIndex = -1;
public readonly Vector2 AttachSurfaceNormal = Vector2.Zero;
public readonly Vector2 AttachPos = Vector2.Zero;
public readonly Vector2 CharacterSimPos;
private LatchedOntoTargetEventData(Character character, Vector2 attachSurfaceNormal, Vector2 attachPos)
{
CharacterSimPos = character.SimPosition;
IsLatched = true;
AttachSurfaceNormal = attachSurfaceNormal;
AttachPos = attachPos;
}
public LatchedOntoTargetEventData(Character character, Character targetCharacter, Vector2 attachSurfaceNormal, Vector2 attachPos)
: this(character, attachSurfaceNormal, attachPos)
{
TargetCharacterID = targetCharacter.ID;
}
public LatchedOntoTargetEventData(Character character, Structure targetStructure, Vector2 attachSurfaceNormal, Vector2 attachPos)
: this(character, attachSurfaceNormal, attachPos)
{
TargetStructureID = targetStructure.ID;
}
public LatchedOntoTargetEventData(Character character, VoronoiCell levelWall, Vector2 attachSurfaceNormal, Vector2 attachPos)
: this(character, attachSurfaceNormal, attachPos)
{
TargetLevelWallIndex = Level.Loaded.GetAllCells().IndexOf(levelWall);
}
/// <summary>
/// Signifies detaching (not attached to any target)
/// </summary>
public LatchedOntoTargetEventData()
{
CharacterSimPos = Vector2.Zero;
IsLatched = false;
}
}
private struct TeamChangeEventData : IEventData
{
public EventType EventType => EventType.TeamChange;