Call goat protective services (#18812)

* Limit reproductivecomponent in confined areas

* Slight bump
This commit is contained in:
metalgearsloth
2023-08-07 19:48:47 +10:00
committed by GitHub
parent 61b4ee080e
commit 649295dcd2
2 changed files with 12 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Storage;
using Robust.Server.GameObjects;
using Robust.Shared.Collections;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@@ -83,7 +84,12 @@ public sealed class AnimalHusbandrySystem : EntitySystem
return false;
var xform = Transform(uid);
var partners = _entityLookup.GetComponentsInRange<ReproductivePartnerComponent>(xform.Coordinates, component.BreedRange);
if (partners.Count >= component.Capacity)
return false;
foreach (var comp in partners)
{
var partner = comp.Owner;