Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Эта хуйня работает
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Rubinov committed Jun 19, 2024
1 parent b1a80c4 commit d6ab3d8
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 13 deletions.
7 changes: 1 addition & 6 deletions Content.Shared/LieDown/SharedLieDownSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Content.Shared.Standing;
using Content.Shared.Verbs;
using Robust.Shared.Input.Binding;
using Robust.Shared.IoC;
using Robust.Shared.Player;

namespace Content.Shared.LieDown
Expand Down Expand Up @@ -81,7 +80,7 @@ private void OnRefresh(EntityUid uid, LyingDownComponent component, RefreshMovem
{
if (_standing.IsDown(uid))
{
args.ModifySpeed(0.4f, 0.4f);
args.ModifySpeed(0.1f, 0.1f);
}
else
{
Expand Down Expand Up @@ -158,8 +157,6 @@ public void TryStandUp(EntityUid uid)
if (!_standing.IsDown(uid) || !_standing.Stand(uid))
return;

Logger.Debug("{uid} tried to stand up", uid);

RemCompDeferred<LyingDownComponent>(uid);
}

Expand All @@ -168,8 +165,6 @@ public void TryLieDown(EntityUid uid)
if (_standing.IsDown(uid) || !_standing.Down(uid, false, false))
return;

Logger.Debug("{uid} tried to lie down", uid);

EnsureComp<LyingDownComponent>(uid);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Standing/StandingStateComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed partial class StandingStateComponent : Component
public SoundSpecifier DownSound { get; private set; } = new SoundCollectionSpecifier("BodyFall");

[DataField, AutoNetworkedField]
public bool Standing { get; set; } = true;
public bool Standing = true;

/// <summary>
/// List of fixtures that had their collision mask changed when the entity was downed.
Expand Down
5 changes: 1 addition & 4 deletions Content.Shared/Standing/StandingStateSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed class StandingStateSystem : EntitySystem
[Dependency] private readonly ActionContainerSystem _actionContainer = default!;

// If StandingCollisionLayer value is ever changed to more than one layer, the logic needs to be edited.
private const int StandingCollisionLayer = (int) CollisionGroup.MidImpassable;
private const int StandingCollisionLayer = (int)CollisionGroup.MidImpassable;

public override void Initialize()
{
Expand All @@ -35,9 +35,6 @@ public bool IsDown(EntityUid uid, StandingStateComponent? standingState = null)
if (!Resolve(uid, ref standingState, false))
return false;

if (HasComp<LyingDownComponent>(uid))
RemComp<LyingDownComponent>(uid);

return !standingState.Standing;
}

Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Actions/liedown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
noSpawn: true
components:
- type: InstantAction
priority: -13
icon: Interface/Actions/stand-up-state.png
event: !type:StandUpActionEvent {}

- type: entity
Expand All @@ -15,5 +15,5 @@
noSpawn: true
components:
- type: InstantAction
priority: -13
icon: Interface/Actions/lie-down-state.png
event: !type:LieDownActionEvent {}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d6ab3d8

Please sign in to comment.