From b82605b18530c0d4398b9ad41a108868613cf81e Mon Sep 17 00:00:00 2001 From: amatwiedle Date: Mon, 23 Dec 2024 13:54:18 -0600 Subject: [PATCH] Fix borgs being able to drink from buckets and spray bottles. (#32964) * Added a check for if the entity trying to drink is a borg. * Fixed missing namespace issue. * Improved code conciseness. * Removed borg chassis check, added stomach check. * Removed unused namespace --------- Co-authored-by: dankeaj --- Content.Server/Nutrition/EntitySystems/DrinkSystem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs index 90a925e39f1..44e90537b5d 100644 --- a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs @@ -165,6 +165,9 @@ private bool TryDrink(EntityUid user, EntityUid target, DrinkComponent drink, En if (!HasComp(target)) return false; + if (!_body.TryGetBodyOrganEntityComps(target, out var stomachs)) + return false; + if (_openable.IsClosed(item, user)) return true;