ECS dragdrop (#12973)
* ECS dragdrop No more excuses. * AAAAAAAAAAAAAA * kry * events * aaaaaaaaaa * HUH * Fix stripping * aaaaaa * spoike * asease * fix table vaulting * ded * rebiew * aaaaaaaaaaaaa * drag * aeaeae * weh
This commit is contained in:
@@ -17,10 +17,11 @@ using Content.Server.Administration.Logs;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Ensnaring.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Strip;
|
||||
|
||||
namespace Content.Server.Strip
|
||||
{
|
||||
public sealed class StrippableSystem : EntitySystem
|
||||
public sealed class StrippableSystem : SharedStrippableSystem
|
||||
{
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
||||
@@ -104,8 +105,10 @@ namespace Content.Server.Strip
|
||||
TakeItemFromHands(user, handId, component);
|
||||
}
|
||||
|
||||
public void StartOpeningStripper(EntityUid user, StrippableComponent component, bool openInCombat = false)
|
||||
public override void StartOpeningStripper(EntityUid user, StrippableComponent component, bool openInCombat = false)
|
||||
{
|
||||
base.StartOpeningStripper(user, component, openInCombat);
|
||||
|
||||
if (TryComp<SharedCombatModeComponent>(user, out var mode) && mode.IsInCombatMode && !openInCombat)
|
||||
return;
|
||||
|
||||
@@ -446,25 +449,5 @@ namespace Content.Server.Strip
|
||||
// hand update will trigger strippable update
|
||||
_adminLogger.Add(LogType.Stripping, LogImpact.Medium, $"{ToPrettyString(user):user} has stripped the item {ToPrettyString(held):item} from {ToPrettyString(component.Owner):target}");
|
||||
}
|
||||
|
||||
private sealed class OpenStrippingCompleteEvent
|
||||
{
|
||||
public readonly EntityUid User;
|
||||
|
||||
public OpenStrippingCompleteEvent(EntityUid user)
|
||||
{
|
||||
User = user;
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class OpenStrippingCancelledEvent
|
||||
{
|
||||
public readonly EntityUid User;
|
||||
|
||||
public OpenStrippingCancelledEvent(EntityUid user)
|
||||
{
|
||||
User = user;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user