Skip to content

Commit

Permalink
Stop Drink verb appearing if the solution can't be accessed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tayrtahn committed Mar 26, 2024
1 parent fb4dc39 commit 1f62f9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Content.Server/Nutrition/EntitySystems/DrinkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ private void AddDrinkVerb(Entity<DrinkComponent> entity, ref GetVerbsEvent<Alter
!_body.TryGetBodyOrganComponents<StomachComponent>(ev.User, out var stomachs, body))
return;

// Make sure the solution exists
if (!_solutionContainer.TryGetSolution(entity.Owner, entity.Comp.Solution, out var solution))
return;

// no drinking from living drinks, have to kill them first.
if (_mobState.IsAlive(entity))
return;
Expand Down

0 comments on commit 1f62f9e

Please sign in to comment.