Merge remote-tracking branch 'upstream/master' into ed-21-06-2024-upstream-sync

# Conflicts:
#	Resources/Prototypes/Maps/europa.yml
#	Resources/Prototypes/Maps/train.yml
This commit is contained in:
Ed
2024-06-21 18:30:31 +03:00
443 changed files with 8337 additions and 2540 deletions

View File

@@ -1391,7 +1391,12 @@ public abstract class SharedStorageSystem : EntitySystem
// If we specify a max item size, use that
if (uid.Comp.MaxItemSize != null)
return _prototype.Index(uid.Comp.MaxItemSize.Value);
{
if (_prototype.TryIndex(uid.Comp.MaxItemSize.Value, out var proto))
return proto;
Log.Error($"{ToPrettyString(uid.Owner)} tried to get invalid item size prototype: {uid.Comp.MaxItemSize.Value}. Stack trace:\\n{Environment.StackTrace}");
}
if (!_itemQuery.TryGetComponent(uid, out var item))
return _defaultStorageMaxItemSize;