Fixed some Beer Goggles safe throw logic.
This commit is contained in:
parent
89498177ed
commit
70eb07aaf8
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue