FoodSequence fix (#32034)

Update FoodSequenceSystem.cs
This commit is contained in:
Ed 2024-09-10 16:08:04 +03:00 committed by deltanedas
parent 5599e3cb06
commit 46d4d7d5a6
1 changed files with 2 additions and 8 deletions

View File

@ -116,14 +116,8 @@ public sealed class FoodSequenceSystem : SharedFoodSequenceSystem
return false;
//looking for a suitable FoodSequence prototype
ProtoId<FoodSequenceElementPrototype> elementProto = string.Empty;
foreach (var pair in element.Comp.Entries)
{
if (pair.Key == start.Comp.Key)
{
elementProto = pair.Value;
}
}
if (!element.Comp.Entries.TryGetValue(start.Comp.Key, out var elementProto))
return false;
if (!_proto.TryIndex(elementProto, out var elementIndexed))
return false;