]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix borgs being able to drink from buckets and spray bottles. (#32964)
authoramatwiedle <amatwiedle@gmail.com>
Mon, 23 Dec 2024 19:54:18 +0000 (13:54 -0600)
committerGitHub <noreply@github.com>
Mon, 23 Dec 2024 19:54:18 +0000 (13:54 -0600)
* 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 <andrewjdanke@gmail.com>
Content.Server/Nutrition/EntitySystems/DrinkSystem.cs

index 90a925e39f145cc7c46973600e02ab35aa277138..44e90537b5dc47d9bba24ab9091a0347ea3b6275 100644 (file)
@@ -165,6 +165,9 @@ public sealed class DrinkSystem : SharedDrinkSystem
         if (!HasComp<BodyComponent>(target))
             return false;
 
+        if (!_body.TryGetBodyOrganEntityComps<StomachComponent>(target, out var stomachs))
+            return false;
+
         if (_openable.IsClosed(item, user))
             return true;