Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Numerics;
|
||||
using Content.Shared._White.Events;
|
||||
using Content.Shared._White.WeaponModules;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Actions;
|
||||
@@ -353,6 +354,7 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
RaiseLocalEvent(user, new EnergyDomeClothesTurnOffEvent()); // WD
|
||||
// Shoot confirmed - sounds also played here in case it's invalid (e.g. cartridge already spent).
|
||||
Shoot(gunUid, gun, ev.Ammo, fromCoordinates, toCoordinates.Value, out var userImpulse, user, throwItems: attemptEv.ThrowItems);
|
||||
var shotEv = new GunShotEvent(user, ev.Ammo);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Content.Shared._White.Knockdown;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class KnockdownOnCollideComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public float BlurTime = 20f;
|
||||
}
|
||||
30
Content.Shared/_White/Knockdown/KnockdownOnCollideSystem.cs
Normal file
30
Content.Shared/_White/Knockdown/KnockdownOnCollideSystem.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Content.Shared.Eye.Blinding.Components;
|
||||
using Content.Shared.Projectiles;
|
||||
using Content.Shared.Standing.Systems;
|
||||
using Content.Shared.StatusEffect;
|
||||
|
||||
namespace Content.Shared._White.Knockdown;
|
||||
|
||||
public sealed class KnockdownOnCollideSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedStandingStateSystem _standing = default!;
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffects = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<KnockdownOnCollideComponent, ProjectileHitEvent>(OnProjectileHit);
|
||||
}
|
||||
|
||||
private void OnProjectileHit(Entity<KnockdownOnCollideComponent> ent, ref ProjectileHitEvent args)
|
||||
{
|
||||
_standing.TryLieDown(args.Target, null, true);
|
||||
|
||||
if (ent.Comp.BlurTime <= 0f)
|
||||
return;
|
||||
|
||||
_statusEffects.TryAddStatusEffect<BlurryVisionComponent>(args.Target, "BlurryVision",
|
||||
TimeSpan.FromSeconds(ent.Comp.BlurTime), true);
|
||||
}
|
||||
}
|
||||
@@ -178,4 +178,10 @@ public sealed partial class TeleportSpellEvent : InstantActionEvent, ISpeakSpell
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class MindswapSpellEvent : EntityTargetActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user