Skip to content

Commit

Permalink
Force unbuckle, Frontier comments
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 committed Sep 14, 2024
1 parent 4669a5d commit 7157615
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
12 changes: 9 additions & 3 deletions Content.Server/Mech/Equipment/EntitySystems/MechGrabberSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed class MechGrabberSystem : EntitySystem
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!; // Frontier
[Dependency] private readonly SharedBuckleSystem _buckle = default!;
[Dependency] private readonly SharedBuckleSystem _buckle = default!; // Frontier

/// <inheritdoc/>
public override void Initialize()
Expand Down Expand Up @@ -190,9 +190,15 @@ private void OnMechGrab(EntityUid uid, MechGrabberComponent component, DoAfterEv
if (!_mech.TryChangeEnergy(equipmentComponent.EquipmentOwner.Value, component.GrabEnergyDelta))
return;

if (TryComp<StrapComponent>(args.Args.Target, out var strapComp) && strapComp.BuckledEntities != null) // Frontier: Remove people from chairs
// Frontier: Remove people from chairs
if (TryComp<StrapComponent>(args.Args.Target, out var strapComp) && strapComp.BuckledEntities != null)
{
foreach (var buckleUid in strapComp.BuckledEntities)
_buckle.TryUnbuckle(buckleUid, buckleUid, true);
{
_buckle.Unbuckle(buckleUid, args.Args.Target);
}
}
// End Frontier

_container.Insert(args.Args.Target.Value, component.ItemContainer);
_mech.UpdateUserInterface(equipmentComponent.EquipmentOwner.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
state: mecha_clamp
- type: MechGrabber
blacklist: # Frontier
components:
- Anomaly
- Mech
components: # Frontier
- Anomaly # Frontier
- Mech # Frontier
maxContents: 8
- type: UIFragment
ui: !type:MechGrabberUi
Expand All @@ -43,9 +43,9 @@
state: mecha_clamp_small
- type: MechGrabber
blacklist: # Frontier
components:
- Anomaly
- Mech
components: # Frontier
- Anomaly # Frontier
- Mech # Frontier
maxContents: 4
grabDelay: 3
grabEnergyDelta: 20
Expand Down

0 comments on commit 7157615

Please sign in to comment.