Prevent storing liquids in equipped buckets (#24412)

* Block access to solutions in equipped spillables.

* Stop Drink verb appearing if the solution can't be accessed.
This commit is contained in:
Tayrtahn
2024-03-31 00:40:22 -04:00
committed by GitHub
parent 6b7427e3ee
commit 1b94e01563
4 changed files with 36 additions and 0 deletions

View File

@@ -410,6 +410,10 @@ public sealed class DrinkSystem : EntitySystem
!_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;