From 57e50ceed50553c4f79d47d7d8efff34f49bc87c Mon Sep 17 00:00:00 2001 From: Remuchi Date: Sat, 13 Apr 2024 14:15:41 +0700 Subject: [PATCH] shitcode is real --- Content.Server/Antag/AntagSelectionSystem.cs | 4 ++-- Content.Server/Projectiles/ProjectileSystem.cs | 7 ++++--- Content.Server/Weapons/Ranged/Systems/GunSystem.cs | 2 +- Content.Server/_White/Cult/UI/ApocalypseRuneEui.cs | 2 +- .../ExperimentalSyndicateTeleporter.cs | 14 +++++++------- .../_White/TimeBeacon/TimeBeaconSystem.cs | 14 +++++++------- .../Projectiles/SharedProjectileSystem.cs | 2 +- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Content.Server/Antag/AntagSelectionSystem.cs b/Content.Server/Antag/AntagSelectionSystem.cs index b7b469f7bd..f40cfbe6ac 100644 --- a/Content.Server/Antag/AntagSelectionSystem.cs +++ b/Content.Server/Antag/AntagSelectionSystem.cs @@ -109,7 +109,7 @@ public sealed class AntagSelectionSystem : GameRuleSystem 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 return false; // No antag roles for gulaged users - if (_gulag.IsUserGulaged(session.UserId, out _)) + if (_gulag.IsUserGulagged(session.UserId, out _)) { return false; } diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index 2f19cbfa01..a561ca65d4 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -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. /// /// True if the target isn't deleted. - public bool TryHandleProjectile(EntityUid target, Entity projectile) + public bool TryHandleProjectile(EntityUid target, Entity 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) diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index d99d25bea8..f77e61f06d 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -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); } diff --git a/Content.Server/_White/Cult/UI/ApocalypseRuneEui.cs b/Content.Server/_White/Cult/UI/ApocalypseRuneEui.cs index 1dee78d18a..a8d79b5563 100644 --- a/Content.Server/_White/Cult/UI/ApocalypseRuneEui.cs +++ b/Content.Server/_White/Cult/UI/ApocalypseRuneEui.cs @@ -41,7 +41,7 @@ public sealed class ApocalypseRuneEui : BaseEui var argsDoAfterEvent = new DoAfterArgs(_entityManager, _whoCalled, 120f, ev, _whoCalled) { - BreakOnUserMove = true, + BreakOnMove = true, NeedHand = true }; diff --git a/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs b/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs index 8e161d9df3..60a55c9dbb 100644 --- a/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs +++ b/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs @@ -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(args.User, out var xform)) return; - if (TryComp(args.User, out var pullable) && pullable.BeingPulled) + if (TryComp(args.User, out var pullable) && pullable.BeingPulled) { - _pullingSystem.TryStopPull(pullable); + _pullingSystem.TryStopPull(args.User, pullable); } - if (TryComp(args.User, out var pulling) + if (TryComp(args.User, out var pulling) && pulling.Pulling != null && - TryComp(pulling.Pulling.Value, out var subjectPulling)) + TryComp(pulling.Pulling.Value, out var subjectPulling)) { - _pullingSystem.TryStopPull(subjectPulling); + _pullingSystem.TryStopPull(pulling.Pulling.Value, subjectPulling); } if (_containerSystem.IsEntityInContainer(args.User)) diff --git a/Content.Server/_White/TimeBeacon/TimeBeaconSystem.cs b/Content.Server/_White/TimeBeacon/TimeBeaconSystem.cs index 9467353f89..65915263db 100644 --- a/Content.Server/_White/TimeBeacon/TimeBeaconSystem.cs +++ b/Content.Server/_White/TimeBeacon/TimeBeaconSystem.cs @@ -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(entity, out var pullable) && pullable.BeingPulled) + if (TryComp(entity, out var pullable) && pullable.BeingPulled) { - _pulling.TryStopPull(pullable); + _pulling.TryStopPull(entity, pullable); } - if (TryComp(entity, out var pulling) + if (TryComp(entity, out var pulling) && pulling.Pulling != null && - TryComp(pulling.Pulling.Value, out var subjectPulling)) + TryComp(pulling.Pulling.Value, out var subjectPulling)) { - _pulling.TryStopPull(subjectPulling); + _pulling.TryStopPull(pulling.Pulling.Value, subjectPulling); } _transform.SetCoordinates(entity, entXform, xform.Coordinates); diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index 23954b193f..97330f598f 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -313,4 +313,4 @@ public record struct ProjectileHitEvent(DamageSpecifier Damage, EntityUid Target /// Raised after a projectile has dealt it's damage. /// [ByRefEvent] -public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture Fixture); +public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture? Fixture);