[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

@@ -586,10 +586,11 @@ public sealed partial class ShuttleSystem
{
foreach (var child in toKnock)
{
if (!_statusQuery.TryGetComponent(child, out var status))
/*if (!_statusQuery.TryGetComponent(child, out var status))
continue;
_stuns.TryParalyze(child, _hyperspaceKnockdownTime, true, status);
_stuns.TryParalyze(child, _hyperspaceKnockdownTime, true, status);*/
_standing.TryLieDown(child, dropHeldItems: true);
// If the guy we knocked down is on a spaced tile, throw them too
if (grid != null)
@@ -791,8 +792,8 @@ public sealed partial class ShuttleSystem
spawnPos = _transform.GetWorldPosition(targetXform, xformQuery);
}
angle = !HasComp<MapComponent>(targetXform.GridUid)
? _random.NextAngle()
angle = !HasComp<MapComponent>(targetXform.GridUid)
? _random.NextAngle()
: Angle.Zero;
coordinates = new EntityCoordinates(targetXform.MapUid.Value, spawnPos);