Skip to content

Commit

Permalink
Fine
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Jun 24, 2024
1 parent a838e2e commit 82b0d65
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Content.Server/Nyanotrasen/Carrying/CarryingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public sealed class CarryingSystem : EntitySystem
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!;
[Dependency] private readonly RespiratorSystem _respirator = default!;
[Dependency] private readonly PseudoItemSystem _pseudoItem = default!; // Needed for fitting check
[Dependency] private readonly PseudoItemSystem _pseudoItem = default!;

public override void Initialize()
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Resist/CanEscapeInventoryComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed partial class CanEscapeInventoryComponent : Component
public DoAfterId? DoAfter;

/// <summary>
/// DeltaV - action to cancel inventory escape. Added dynamically.
/// Action to cancel inventory escape.
/// </summary>
[DataField]
public EntityUid? EscapeCancelAction;
Expand Down
11 changes: 5 additions & 6 deletions Content.Server/Resist/EscapeInventorySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public sealed class EscapeInventorySystem : EntitySystem
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly CarryingSystem _carryingSystem = default!; // Carrying system from Nyanotrasen.
[Dependency] private readonly SharedActionsSystem _actions = default!; // DeltaV
[Dependency] private readonly SharedActionsSystem _actions = default!;

/// <summary>
/// You can't escape the hands of an entity this many times more massive than you.
/// </summary>
public const float MaximumMassDisadvantage = 6f;
/// <summary>
/// DeltaV - action to cancel inventory escape
/// Action to cancel inventory escape
/// </summary>
[ValidatePrototypeId<EntityPrototype>]
private readonly string _escapeCancelAction = "ActionCancelEscape";
Expand All @@ -45,7 +45,7 @@ public override void Initialize()
SubscribeLocalEvent<CanEscapeInventoryComponent, MoveInputEvent>(OnRelayMovement);
SubscribeLocalEvent<CanEscapeInventoryComponent, EscapeInventoryEvent>(OnEscape);
SubscribeLocalEvent<CanEscapeInventoryComponent, DroppedEvent>(OnDropped);
SubscribeLocalEvent<CanEscapeInventoryComponent, EscapeInventoryCancelActionEvent>(OnCancelEscape); // DeltaV
SubscribeLocalEvent<CanEscapeInventoryComponent, EscapeInventoryCancelActionEvent>(OnCancelEscape);
}

private void OnRelayMovement(EntityUid uid, CanEscapeInventoryComponent component, ref MoveInputEvent args)
Expand Down Expand Up @@ -94,7 +94,7 @@ private void OnRelayMovement(EntityUid uid, CanEscapeInventoryComponent componen
_popupSystem.PopupEntity(Loc.GetString("escape-inventory-component-start-resisting"), user, user);
_popupSystem.PopupEntity(Loc.GetString("escape-inventory-component-start-resisting-target"), container, container);

// DeltaV - escape cancel action
// Add an escape cancel action
if (component.EscapeCancelAction is not { Valid: true })
_actions.AddAction(user, ref component.EscapeCancelAction, _escapeCancelAction);
}
Expand All @@ -103,7 +103,7 @@ private void OnEscape(EntityUid uid, CanEscapeInventoryComponent component, Esca
{
component.DoAfter = null;

// DeltaV - remove cancel action regardless of do-after result
// Remove the cancel action regardless of do-after result
_actions.RemoveAction(uid, component.EscapeCancelAction);
component.EscapeCancelAction = null;

Expand All @@ -127,7 +127,6 @@ private void OnDropped(EntityUid uid, CanEscapeInventoryComponent component, Dro
_doAfterSystem.Cancel(component.DoAfter);
}

// DeltaV
private void OnCancelEscape(EntityUid uid, CanEscapeInventoryComponent component, EscapeInventoryCancelActionEvent args)
{
if (component.DoAfter != null)
Expand Down
1 change: 0 additions & 1 deletion Content.Shared/Resist/EscapeInventoryCancelEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

namespace Content.Shared.Resist;

// DeltaV
public sealed partial class EscapeInventoryCancelActionEvent : InstantActionEvent;
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/actions/actions/sleep.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ sleep-examined = [color=lightblue]{CAPITALIZE(SUBJECT($target))} {CONJUGATE-BE($
wake-other-success = You shake {THE($target)} awake.
wake-other-failure = You shake {THE($target)}, but {SUBJECT($target)} {CONJUGATE-BE($target)} not waking up.
popup-sleep-in-bag = {THE($entity)} curls up and falls asleep.
1 change: 0 additions & 1 deletion Resources/Locale/en-US/deltav/actions/sleep.ftl

This file was deleted.

File renamed without changes.

0 comments on commit 82b0d65

Please sign in to comment.