Fixed some Beer Goggles safe throw logic.

This commit is contained in:
Vanessa 2025-12-24 16:53:56 -06:00
parent 89498177ed
commit 70eb07aaf8
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,4 @@
using Content.Shared._DV.Chemistry.Systems; // DeltaV - Beer Goggles Safe Throw
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
@ -17,12 +18,15 @@ using Content.Shared.Weapons.Melee;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Player;
namespace Content.Shared.Fluids;
public abstract partial class SharedPuddleSystem
{
private static readonly FixedPoint2 MeleeHitTransferProportion = 0.25;
[Dependency] protected readonly SafeSolutionThrowerSystem _safeSolutionThrower = default!; // DeltaV - Beer Goggles Safe Throw
protected virtual void InitializeSpillable()
{
SubscribeLocalEvent<SpillableComponent, ExaminedEvent>(OnExamined);
@ -187,6 +191,10 @@ public abstract partial class SharedPuddleSystem
|| solution.Volume <= 0)
return;
// DeltaV - Beer Goggles Safe Throw
if (_safeSolutionThrower.GetSafeThrow(args.PlayerUid))
return;
args.Cancel("pacified-cannot-throw-spill");
}
}

View File

@ -35,7 +35,7 @@ public sealed class SealingCabinetSystem : EntitySystem
if (!ent.Comp.Emaggable)
return;
if (!_cabinet.HasItem(ent.Owner) || _openable.IsOpen(ent))
if (!_cabinet.HasItem(ent.Owner) || !_openable.IsClosed(ent))
return;
_openable.SetOpen(ent, true);