Skip to content

Commit

Permalink
FixMechClothing-Grabber (#2292)
Browse files Browse the repository at this point in the history
  • Loading branch information
21Melkuu authored Dec 5, 2024
1 parent baa6e7c commit 47c508b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Content.Server/SS220/MechClothing/MechClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ private void OnInteract(Entity<MechClothingComponent> ent, ref MechClothingGrabE
if (Transform(args.Target).Anchored)
return;

if (ent.Comp.ItemContainer.ContainedEntities.Count >= ent.Comp.MaxContents)
if(!TryComp<MechGrabberComponent>(ent.Comp.CurrentEquipmentUid, out var grabberComp))
return;

if (grabberComp.ItemContainer.ContainedEntities.Count >= grabberComp.MaxContents)
return;

if (!TryComp<MechComponent>(ent.Comp.MechUid, out var mech))
Expand Down
6 changes: 0 additions & 6 deletions Content.Shared/SS220/MechClothing/MechClothingComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ public sealed partial class MechClothingComponent : Component
[DataField("grabDelay")]
public float GrabDelay = 2.5f;

/// <summary>
/// The maximum amount of items that can be fit in this grabber
/// </summary>
[DataField("maxContents")]
public int MaxContents = 10;

/// <summary>
/// The sound played when a mech is grabbing something
/// </summary>
Expand Down

0 comments on commit 47c508b

Please sign in to comment.