Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FaDeOkno committed Aug 12, 2024
1 parent dbdfa5f commit bdea345
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 32 deletions.
32 changes: 1 addition & 31 deletions Content.Shared/ADT/Quirks/EntitySystems/SharedQuirksSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Content.Shared.Throwing;
using Content.Shared.Verbs;
using Content.Shared.Tools.Components;
using Content.Shared.Storage.Components;
using Content.Shared.StepTrigger.Systems;
using Content.Shared.Storage.EntitySystems;
using Content.Shared.Popups;
using Content.Shared.Tag;
Expand All @@ -25,10 +25,6 @@ public abstract class SharedQuirksSystem : EntitySystem

public override void Initialize()
{
//SubscribeLocalEvent<SharedEntityStorageComponent, GetVerbsEvent<AlternativeVerb>>(OnGetHideVerbs);

SubscribeLocalEvent<SoftWalkComponent, MapInitEvent>(OnSoftWalkMapInit);

SubscribeLocalEvent<FreerunningComponent, CheckClimbSpeedModifiersEvent>(OnFreerunningClimbTimeModify);

SubscribeLocalEvent<SprinterComponent, MapInitEvent>(OnSprinterMapInit);
Expand All @@ -37,27 +33,6 @@ public override void Initialize()
SubscribeLocalEvent<HardThrowerComponent, CheckThrowRangeModifiersEvent>(OnThrowerRangeModify);
}

//private void OnGetHideVerbs(EntityUid uid, SharedEntityStorageComponent comp, GetVerbsEvent<AlternativeVerb> args)
//{
// if (!args.CanAccess || !args.CanInteract)
// return;

// if (!HasComp<FastLockersComponent>(args.User))
// return;
// if (TryComp<WeldableComponent>(uid, out var weldable) && weldable.IsWelded)
// return;
// if (!comp.ItemCanStoreMobs)
// return;

// AlternativeVerb verb = new()
// {
// Act = () => TryHide(args.User, uid),
// Text = Loc.GetString("quirk-fast-locker-hide-verb"),
// };
// args.Verbs.Add(verb);

//}

public void TryHide(EntityUid uid, EntityUid closet)
{
if (_storage.Insert(uid, closet))
Expand All @@ -68,11 +43,6 @@ public void TryHide(EntityUid uid, EntityUid closet)
_popup.PopupCursor(Loc.GetString("quirk-fast-locker-hide-fail"), uid);
}

private void OnSoftWalkMapInit(EntityUid uid, SoftWalkComponent comp, MapInitEvent args)
{
EnsureComp<StepTriggerImmuneComponent>(uid, out _);
}

private void OnFreerunningClimbTimeModify(EntityUid uid, FreerunningComponent comp, ref CheckClimbSpeedModifiersEvent args)
{
if (args.User == args.Climber)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Shared.Examine;
using Content.Shared.ADT.Traits;
using Content.Shared.Examine;
using Content.Shared.Inventory;
using Content.Shared.StepTrigger.Components;
using Content.Shared.Tag;
Expand All @@ -24,6 +25,9 @@ private void OnStepTriggerAttempt(Entity<StepTriggerImmuneComponent> ent, ref St

private void OnStepTriggerClothingAttempt(EntityUid uid, ClothingRequiredStepTriggerComponent component, ref StepTriggerAttemptEvent args)
{
if (HasComp<SoftWalkComponent>(args.Tripper)) // ADT Quirks
args.Cancelled = true;

if (_inventory.TryGetInventoryEntity<ClothingRequiredStepTriggerImmuneComponent>(args.Tripper, out _))
{
args.Cancelled = true;
Expand Down

0 comments on commit bdea345

Please sign in to comment.