Remove contests (#25425)

- Not mentioned anywhere ingame.
- Stupid.
This commit is contained in:
metalgearsloth
2024-02-21 17:39:52 +11:00
committed by GitHub
parent b98450a3ef
commit 012e6e6c86
3 changed files with 3 additions and 163 deletions

View File

@@ -1,4 +1,3 @@
using Content.Server.Contests;
using Content.Server.Popups;
using Content.Server.Storage.Components;
using Content.Shared.ActionBlocker;
@@ -7,7 +6,6 @@ using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction.Events;
using Content.Shared.Inventory;
using Content.Shared.Movement.Events;
using Content.Shared.Movement.Systems;
using Content.Shared.Resist;
using Content.Shared.Storage;
using Robust.Shared.Containers;
@@ -21,12 +19,6 @@ public sealed class EscapeInventorySystem : EntitySystem
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly ContestsSystem _contests = default!;
/// <summary>
/// You can't escape the hands of an entity this many times more massive than you.
/// </summary>
public const float MaximumMassDisadvantage = 6f;
public override void Initialize()
{
@@ -53,23 +45,9 @@ public sealed class EscapeInventorySystem : EntitySystem
}
// Contested
if (_handsSystem.IsHolding(container.Owner, uid, out var inHand))
if (_handsSystem.IsHolding(container.Owner, uid, out _))
{
var contestResults = _contests.MassContest(uid, container.Owner);
// Inverse if we aren't going to divide by 0, otherwise just use a default multiplier of 1.
if (contestResults != 0)
contestResults = 1 / contestResults;
else
contestResults = 1;
if (contestResults >= MaximumMassDisadvantage)
{
_popupSystem.PopupEntity(Loc.GetString("escape-inventory-component-failed-resisting"), uid, uid);
return;
}
AttemptEscape(uid, container.Owner, component, contestResults);
AttemptEscape(uid, container.Owner, component);
return;
}