Fix SOME test fails (#4588)

* Increase SpawnAndDeleteAllEntitiesOnDifferentMaps test simulation time (#38901)

wait longer

* Reduce LevelOfParallelism to 2 for integration tests (#39566)

less paralelliism

* Fix Assumption of Nullable to have value (#41220)

* Fix Potential Test Fail

* Please the maintainer gods

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Sir Warock 2025-11-13 13:21:38 +01:00 committed by GitHub
parent 94aeb47feb
commit 63eb235e94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 9 deletions

View File

@ -5,4 +5,4 @@
// https://github.com/dotnet/runtime/issues/107197
// So we can't really parallelize integration tests harder either until the runtime fixes that,
// *or* we fix serv3 to not spam expression trees.
[assembly: LevelOfParallelism(3)]
[assembly: LevelOfParallelism(2)]

View File

@ -4,4 +4,4 @@ namespace Content.Shared.Projectiles;
/// Raised directed on an entity when it embeds into something.
/// </summary>
[ByRefEvent]
public readonly record struct ProjectileEmbedEvent(EntityUid? Shooter, EntityUid Weapon, EntityUid Embedded);
public readonly record struct ProjectileEmbedEvent(EntityUid? Shooter, EntityUid? Weapon, EntityUid Embedded);

View File

@ -94,11 +94,11 @@ public abstract partial class SharedProjectileSystem : EntitySystem
EmbedAttach(embeddable, args.Target, args.Shooter, embeddable.Comp);
// Raise a specific event for projectiles.
if (TryComp(embeddable, out ProjectileComponent? projectile))
{
var ev = new ProjectileEmbedEvent(projectile.Shooter!.Value, projectile.Weapon!.Value, args.Target);
RaiseLocalEvent(embeddable, ref ev);
}
if (!TryComp<ProjectileComponent>(embeddable, out var projectile))
return;
var ev = new ProjectileEmbedEvent(projectile.Shooter, projectile.Weapon, args.Target);
RaiseLocalEvent(embeddable, ref ev);
}
private void EmbedAttach(EntityUid uid, EntityUid target, EntityUid? user, EmbeddableProjectileComponent component)

View File

@ -205,11 +205,11 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
private void OnGrappleCollide(EntityUid uid, GrapplingProjectileComponent component, ref ProjectileEmbedEvent args)
{
if (!Timing.IsFirstTimePredicted)
if (!Timing.IsFirstTimePredicted || !args.Weapon.HasValue)
return;
var jointComp = EnsureComp<JointComponent>(uid);
var joint = _joints.CreateDistanceJoint(uid, args.Weapon, anchorA: new Vector2(0f, 0.5f), id: GrapplingJoint);
var joint = _joints.CreateDistanceJoint(uid, args.Weapon.Value, anchorA: new Vector2(0f, 0.5f), id: GrapplingJoint);
joint.MaxLength = joint.Length + 0.2f;
joint.Stiffness = 1f;
joint.MinLength = 0.35f;