Skip to content

Commit

Permalink
Fix borgs being able to drink from buckets and spray bottles. (space-…
Browse files Browse the repository at this point in the history
…wizards#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 <[email protected]>
  • Loading branch information
amatwiedle and dankeaj authored Dec 23, 2024
1 parent f98192d commit b82605b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Content.Server/Nutrition/EntitySystems/DrinkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ private bool TryDrink(EntityUid user, EntityUid target, DrinkComponent drink, En
if (!HasComp<BodyComponent>(target))
return false;

if (!_body.TryGetBodyOrganEntityComps<StomachComponent>(target, out var stomachs))
return false;

if (_openable.IsClosed(item, user))
return true;

Expand Down

0 comments on commit b82605b

Please sign in to comment.