shitcode is real

This commit is contained in:
Remuchi
2024-04-13 14:15:41 +07:00
parent e2b6002076
commit 57e50ceed5
7 changed files with 23 additions and 22 deletions

View File

@@ -109,7 +109,7 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
if (!IsSessionEligible(session, antagPrototype, ignorePreferences))
return false;
if (_gulag.IsUserGulaged(session.UserId, out _)) // WD
if (_gulag.IsUserGulagged(session.UserId, out _)) // WD
return false;
//Ensure the player has a mind
@@ -178,7 +178,7 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
return false;
// No antag roles for gulaged users
if (_gulag.IsUserGulaged(session.UserId, out _))
if (_gulag.IsUserGulagged(session.UserId, out _))
{
return false;
}

View File

@@ -7,6 +7,7 @@ using Content.Shared.Database;
using Content.Shared.Projectiles;
using Content.Shared._White;
using Robust.Shared.Configuration;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Player;
using Robust.Shared.Physics.Events;
@@ -61,7 +62,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem
return;
}
if (TryHandleProjectile(target, (uid, component)))
if (TryHandleProjectile(target, (uid, component), args.OtherFixture))
{
var direction = args.OurBody.LinearVelocity.Normalized();
_sharedCameraRecoil.KickCamera(target, direction);
@@ -72,7 +73,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem
/// Tries to handle a projectile interacting with the target.
/// </summary>
/// <returns>True if the target isn't deleted.</returns>
public bool TryHandleProjectile(EntityUid target, Entity<ProjectileComponent> projectile)
public bool TryHandleProjectile(EntityUid target, Entity<ProjectileComponent> projectile, Fixture? otherFixture)
{
var uid = projectile.Owner;
var component = projectile.Comp;
@@ -103,7 +104,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem
component.DamagedEntity = true;
var afterProjectileHitEvent = new AfterProjectileHitEvent(component.Damage, target);
var afterProjectileHitEvent = new AfterProjectileHitEvent(component.Damage, target, otherFixture);
RaiseLocalEvent(uid, ref afterProjectileHitEvent);
if (component.DeleteOnCollide)

View File

@@ -187,7 +187,7 @@ public sealed partial class GunSystem : SharedGunSystem
continue;
}
_projectile.TryHandleProjectile(target, (ammoUid, projectileComponent));
_projectile.TryHandleProjectile(target, (ammoUid, projectileComponent), null);
// Even this deletion handling is mega sussy.
Del(ammoUid);
}

View File

@@ -41,7 +41,7 @@ public sealed class ApocalypseRuneEui : BaseEui
var argsDoAfterEvent = new DoAfterArgs(_entityManager, _whoCalled, 120f, ev, _whoCalled)
{
BreakOnUserMove = true,
BreakOnMove = true,
NeedHand = true
};

View File

@@ -3,13 +3,13 @@ using System.Numerics;
using Content.Server._White.Other;
using Content.Server.Body.Systems;
using Content.Server.Popups;
using Content.Server.Pulling;
using Content.Shared.Coordinates.Helpers;
using Content.Shared.Examine;
using Content.Shared.Interaction.Events;
using Content.Shared.Maps;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Pulling.Systems;
using Content.Shared.Popups;
using Content.Shared.Pulling.Components;
using Robust.Server.Audio;
using Robust.Server.Containers;
using Robust.Server.GameObjects;
@@ -80,16 +80,16 @@ public sealed class ExperimentalSyndicateTeleporter : EntitySystem
if (!TryComp<TransformComponent>(args.User, out var xform))
return;
if (TryComp<SharedPullableComponent>(args.User, out var pullable) && pullable.BeingPulled)
if (TryComp<PullableComponent>(args.User, out var pullable) && pullable.BeingPulled)
{
_pullingSystem.TryStopPull(pullable);
_pullingSystem.TryStopPull(args.User, pullable);
}
if (TryComp<SharedPullerComponent>(args.User, out var pulling)
if (TryComp<PullerComponent>(args.User, out var pulling)
&& pulling.Pulling != null &&
TryComp<SharedPullableComponent>(pulling.Pulling.Value, out var subjectPulling))
TryComp<PullableComponent>(pulling.Pulling.Value, out var subjectPulling))
{
_pullingSystem.TryStopPull(subjectPulling);
_pullingSystem.TryStopPull(pulling.Pulling.Value, subjectPulling);
}
if (_containerSystem.IsEntityInContainer(args.User))

View File

@@ -1,9 +1,9 @@
using Content.Server.Popups;
using Content.Server.Pulling;
using Content.Shared.Examine;
using Content.Shared.Interaction.Events;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Pulling.Systems;
using Content.Shared.Popups;
using Content.Shared.Pulling.Components;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
using Robust.Shared.Timing;
@@ -46,16 +46,16 @@ public sealed class TimeBeaconSystem : EntitySystem
return;
// break pulls before portal enter so we dont break shit
if (TryComp<SharedPullableComponent>(entity, out var pullable) && pullable.BeingPulled)
if (TryComp<PullableComponent>(entity, out var pullable) && pullable.BeingPulled)
{
_pulling.TryStopPull(pullable);
_pulling.TryStopPull(entity, pullable);
}
if (TryComp<SharedPullerComponent>(entity, out var pulling)
if (TryComp<PullerComponent>(entity, out var pulling)
&& pulling.Pulling != null &&
TryComp<SharedPullableComponent>(pulling.Pulling.Value, out var subjectPulling))
TryComp<PullableComponent>(pulling.Pulling.Value, out var subjectPulling))
{
_pulling.TryStopPull(subjectPulling);
_pulling.TryStopPull(pulling.Pulling.Value, subjectPulling);
}
_transform.SetCoordinates(entity, entXform, xform.Coordinates);

View File

@@ -313,4 +313,4 @@ public record struct ProjectileHitEvent(DamageSpecifier Damage, EntityUid Target
/// Raised after a projectile has dealt it's damage.
/// </summary>
[ByRefEvent]
public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture Fixture);
public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture? Fixture);