Emergency revert for pulling (#24923)
Revert "Pulling rework (#20906)"
This reverts commit 0d8254b2a2.
This commit is contained in:
@@ -6,10 +6,11 @@ using Content.Shared.Objectives.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Objectives;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Movement.Pulling.Components;
|
||||
|
||||
namespace Content.Server.Objectives.Systems;
|
||||
|
||||
@@ -99,19 +100,19 @@ public sealed class StealConditionSystem : EntitySystem
|
||||
var count = 0;
|
||||
|
||||
//check pulling object
|
||||
if (TryComp<PullerComponent>(mind.OwnedEntity, out var pull)) //TO DO: to make the code prettier? don't like the repetition
|
||||
if (TryComp<SharedPullerComponent>(mind.OwnedEntity, out var pull)) //TO DO: to make the code prettier? don't like the repetition
|
||||
{
|
||||
var pulledEntity = pull.Pulling;
|
||||
if (pulledEntity != null)
|
||||
var pullid = pull.Pulling;
|
||||
if (pullid != null)
|
||||
{
|
||||
// check if this is the item
|
||||
if (CheckStealTarget(pulledEntity.Value, condition)) count++;
|
||||
if (CheckStealTarget(pullid.Value, condition)) count++;
|
||||
|
||||
//we don't check the inventories of sentient entity
|
||||
if (!HasComp<MindContainerComponent>(pulledEntity))
|
||||
if (!TryComp<MindContainerComponent>(pullid, out var pullMind))
|
||||
{
|
||||
// if it is a container check its contents
|
||||
if (_containerQuery.TryGetComponent(pulledEntity, out var containerManager))
|
||||
if (_containerQuery.TryGetComponent(pullid, out var containerManager))
|
||||
stack.Push(containerManager);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user