Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Возможность брать людей на руки #31

Merged
merged 5 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Server/Resist/EscapeInventorySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void OnRelayMovement(EntityUid uid, CanEscapeInventoryComponent componen
AttemptEscape(uid, container.Owner, component);
}

private void AttemptEscape(EntityUid user, EntityUid container, CanEscapeInventoryComponent component, float multiplier = 1f)
public void AttemptEscape(EntityUid user, EntityUid container, CanEscapeInventoryComponent component, float multiplier = 1f)
{
if (component.IsEscaping)
return;
Expand Down
11 changes: 11 additions & 0 deletions Content.Server/_Sunrise/Carrying/BeingCarriedComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Content.Server.Carrying
{
/// <summary>
/// Stores the carrier of an entity being carried.
/// </summary>
[RegisterComponent]
public sealed partial class BeingCarriedComponent : Component
{
public EntityUid Carrier = default!;
}
}
17 changes: 17 additions & 0 deletions Content.Server/_Sunrise/Carrying/CarriableComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Threading;

namespace Content.Server.Carrying
{
[RegisterComponent]
public sealed partial class CarriableComponent : Component
{
/// <summary>
/// необходимое количество свободных рук
/// что-бы взять сущность
/// </summary>
[DataField("freeHandsRequired")]
public int FreeHandsRequired = 2;

public CancellationTokenSource? CancelToken;
}
}
11 changes: 11 additions & 0 deletions Content.Server/_Sunrise/Carrying/CarryingComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Content.Server.Carrying
{
/// <summary>
/// Added to an entity when they are carrying somebody.
/// </summary>
[RegisterComponent]
public sealed partial class CarryingComponent : Component
{
public EntityUid Carried = default!;
}
}
Loading
Loading