Don't play storage fill sounds on mapinit (#10653)
This commit is contained in:
@@ -8,7 +8,6 @@ public sealed partial class StorageSystem
|
||||
private void OnStorageFillMapInit(EntityUid uid, StorageFillComponent component, MapInitEvent args)
|
||||
{
|
||||
if (component.Contents.Count == 0) return;
|
||||
if (!EntityManager.EntitySysManager.TryGetEntitySystem<EntityStorageSystem>(out var entityStorage)) return;
|
||||
|
||||
TryComp<ServerStorageComponent>(uid, out var serverStorageComp);
|
||||
TryComp<EntityStorageComponent>(uid, out var entityStorageComp);
|
||||
@@ -27,10 +26,10 @@ public sealed partial class StorageSystem
|
||||
var ent = EntityManager.SpawnEntity(item, coordinates);
|
||||
|
||||
// handle depending on storage component, again this should be unified after ECS
|
||||
if (entityStorageComp != null && entityStorage.Insert(ent, uid))
|
||||
if (entityStorageComp != null && _entityStorage.Insert(ent, uid))
|
||||
continue;
|
||||
|
||||
if (serverStorageComp != null && Insert(uid, ent, serverStorageComp))
|
||||
if (serverStorageComp != null && Insert(uid, ent, serverStorageComp, false))
|
||||
continue;
|
||||
|
||||
Logger.ErrorS("storage", $"Tried to StorageFill {item} inside {ToPrettyString(uid)} but can't.");
|
||||
|
||||
Reference in New Issue
Block a user