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

View File

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

View File

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

View File

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

View File

@@ -3,13 +3,13 @@ using System.Numerics;
using Content.Server._White.Other; using Content.Server._White.Other;
using Content.Server.Body.Systems; using Content.Server.Body.Systems;
using Content.Server.Popups; using Content.Server.Popups;
using Content.Server.Pulling;
using Content.Shared.Coordinates.Helpers; using Content.Shared.Coordinates.Helpers;
using Content.Shared.Examine; using Content.Shared.Examine;
using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Events;
using Content.Shared.Maps; using Content.Shared.Maps;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Pulling.Systems;
using Content.Shared.Popups; using Content.Shared.Popups;
using Content.Shared.Pulling.Components;
using Robust.Server.Audio; using Robust.Server.Audio;
using Robust.Server.Containers; using Robust.Server.Containers;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
@@ -80,16 +80,16 @@ public sealed class ExperimentalSyndicateTeleporter : EntitySystem
if (!TryComp<TransformComponent>(args.User, out var xform)) if (!TryComp<TransformComponent>(args.User, out var xform))
return; 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 && && 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)) if (_containerSystem.IsEntityInContainer(args.User))

View File

@@ -1,9 +1,9 @@
using Content.Server.Popups; using Content.Server.Popups;
using Content.Server.Pulling;
using Content.Shared.Examine; using Content.Shared.Examine;
using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Events;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Pulling.Systems;
using Content.Shared.Popups; using Content.Shared.Popups;
using Content.Shared.Pulling.Components;
using Robust.Server.Audio; using Robust.Server.Audio;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Timing; using Robust.Shared.Timing;
@@ -46,16 +46,16 @@ public sealed class TimeBeaconSystem : EntitySystem
return; return;
// break pulls before portal enter so we dont break shit // 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 && && 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); _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. /// Raised after a projectile has dealt it's damage.
/// </summary> /// </summary>
[ByRefEvent] [ByRefEvent]
public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture Fixture); public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture? Fixture);