Make more uids nullable (#5794)
This commit is contained in:
@@ -13,8 +13,8 @@ namespace Content.Server.AI.Utility.Considerations.Nutrition.Food
|
||||
{
|
||||
var target = context.GetState<TargetEntityState>().GetValue();
|
||||
|
||||
if (target == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent<FoodComponent?>(target, out var foodComp)
|
||||
|| !EntitySystem.Get<SolutionContainerSystem>().TryGetSolution(target, foodComp.SolutionName, out var food))
|
||||
if (target == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent<FoodComponent?>(target.Value, out var foodComp)
|
||||
|| !EntitySystem.Get<SolutionContainerSystem>().TryGetSolution(target.Value, foodComp.SolutionName, out var food))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user