Fix ambiguous Dumpable behaviour (#13736)
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Content.Server.Storage.EntitySystems
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
SubscribeLocalEvent<DumpableComponent, AfterInteractEvent>(OnAfterInteract);
|
SubscribeLocalEvent<DumpableComponent, AfterInteractEvent>(OnAfterInteract, after: new[]{ typeof(StorageSystem) });
|
||||||
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<AlternativeVerb>>(AddDumpVerb);
|
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<AlternativeVerb>>(AddDumpVerb);
|
||||||
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<UtilityVerb>>(AddUtilityVerbs);
|
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<UtilityVerb>>(AddUtilityVerbs);
|
||||||
SubscribeLocalEvent<DumpCompletedEvent>(OnDumpCompleted);
|
SubscribeLocalEvent<DumpCompletedEvent>(OnDumpCompleted);
|
||||||
@@ -36,7 +36,7 @@ namespace Content.Server.Storage.EntitySystems
|
|||||||
if (!TryComp<ServerStorageComponent>(args.Used, out var storage))
|
if (!TryComp<ServerStorageComponent>(args.Used, out var storage))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (storage.StoredEntities == null || storage.StoredEntities.Count == 0)
|
if (storage.StoredEntities == null || storage.StoredEntities.Count == 0 || storage.CancelToken != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (HasComp<DisposalUnitComponent>(args.Target) || HasComp<PlaceableSurfaceComponent>(args.Target))
|
if (HasComp<DisposalUnitComponent>(args.Target) || HasComp<PlaceableSurfaceComponent>(args.Target))
|
||||||
|
|||||||
@@ -316,6 +316,7 @@ namespace Content.Server.Storage.EntitySystems
|
|||||||
{
|
{
|
||||||
if (entity == args.User
|
if (entity == args.User
|
||||||
|| !itemQuery.HasComponent(entity)
|
|| !itemQuery.HasComponent(entity)
|
||||||
|
|| !CanInsert(uid, entity, out _, storageComp)
|
||||||
|| !_interactionSystem.InRangeUnobstructed(args.User, entity))
|
|| !_interactionSystem.InRangeUnobstructed(args.User, entity))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user