[Feat&Fix] Система лежания (#288)

* лежать

* лучше так сделать

* - remove: Gravity is fine.

* - add: Hit moving lying targets.

* - tweak: Lie down insted of stun on FTL.

* - fix: Fix double component.

* - remove: Disable recoil.

---------

Co-authored-by: Aviu00 <aviu00@protonmail.com>
This commit is contained in:
Remuchi
2024-04-22 22:14:23 +07:00
committed by GitHub
parent 026ab3b445
commit 9565de0262
30 changed files with 237 additions and 139 deletions

View File

@@ -12,6 +12,7 @@ using Content.Shared.Mobs.Components;
using Content.Shared.Movement.Events;
using Content.Shared.Movement.Systems;
using Content.Shared.Standing;
using Content.Shared.Standing.Systems;
using Content.Shared.StatusEffect;
using Content.Shared.Throwing;
using Robust.Shared.Audio.Systems;
@@ -24,7 +25,7 @@ public abstract class SharedStunSystem : EntitySystem
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifier = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly StandingStateSystem _standingState = default!;
[Dependency] private readonly SharedStandingStateSystem _standingState = default!;
[Dependency] private readonly StatusEffectsSystem _statusEffect = default!;
/// <summary>
@@ -36,7 +37,6 @@ public abstract class SharedStunSystem : EntitySystem
public override void Initialize()
{
SubscribeLocalEvent<KnockedDownComponent, ComponentInit>(OnKnockInit);
SubscribeLocalEvent<KnockedDownComponent, ComponentShutdown>(OnKnockShutdown);
SubscribeLocalEvent<KnockedDownComponent, StandAttemptEvent>(OnStandAttempt);
SubscribeLocalEvent<SlowedDownComponent, ComponentInit>(OnSlowInit);
@@ -106,11 +106,6 @@ public abstract class SharedStunSystem : EntitySystem
_standingState.Down(uid);
}
private void OnKnockShutdown(EntityUid uid, KnockedDownComponent component, ComponentShutdown args)
{
_standingState.Stand(uid);
}
private void OnStandAttempt(EntityUid uid, KnockedDownComponent component, StandAttemptEvent args)
{
if (component.LifeStage <= ComponentLifeStage.Running)