v1.5.7.0 (Summer Update)

This commit is contained in:
Regalis11
2024-06-18 16:49:51 +03:00
parent 4a63dacbce
commit 230d1b6e78
263 changed files with 7792 additions and 2845 deletions
@@ -11,7 +11,7 @@ using Barotrauma.Extensions;
namespace Barotrauma
{
[Flags]
public enum SpawnType { Path = 0, Human = 1, Enemy = 2, Cargo = 4, Corpse = 8, Submarine = 16, ExitPoint = 32 };
public enum SpawnType { Path = 0, Human = 1, Enemy = 2, Cargo = 4, Corpse = 8, Submarine = 16, ExitPoint = 32, Disabled = 64 };
partial class WayPoint : MapEntity
{
@@ -932,6 +932,9 @@ namespace Barotrauma
{
return WayPointList.GetRandom(wp =>
(ignoreSubmarine || wp.Submarine == sub) &&
//checking for the disabled flag is not strictly necessary because we check for equality of the spawn type,
//but lets do that anyway in case we change the handling of the spawn type at some point
!wp.spawnType.HasFlag(SpawnType.Disabled) &&
wp.spawnType == spawnType &&
(spawnPointTag.IsNullOrEmpty() || wp.Tags.Any(t => t == spawnPointTag)) &&
(assignedJob == null || (assignedJob != null && wp.AssignedJob == assignedJob)),