Prevent mice from spilling containers. (#22812)

Added component on mouse prototype to prevent spill verb from being added
This commit is contained in:
Repo
2023-12-21 23:23:01 +13:00
committed by GitHub
parent 174dcac683
commit af76a4a76b
3 changed files with 13 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ namespace Content.Server.Fluids.EntitySystems;
public sealed partial class PuddleSystem
{
[Dependency] private readonly OpenableSystem _openable = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
private void InitializeSpillable()
{
@@ -184,6 +185,10 @@ public sealed partial class PuddleSystem
if (solution.Volume == FixedPoint2.Zero)
return;
if (_entityManager.HasComponent<PreventSpillerComponent>(args.User))
return;
Verb verb = new()
{
Text = Loc.GetString("spill-target-verb-get-data-text")