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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user