diff --git a/Content.Server/Fluids/EntitySystems/MoppingSystem.cs b/Content.Server/Fluids/EntitySystems/MoppingSystem.cs index eb98c103df75..4f7304ee6c47 100644 --- a/Content.Server/Fluids/EntitySystems/MoppingSystem.cs +++ b/Content.Server/Fluids/EntitySystems/MoppingSystem.cs @@ -35,6 +35,7 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnAbsorbentInit); SubscribeLocalEvent(OnAfterInteract); + SubscribeLocalEvent(OnAbsorbentSolutionChange); SubscribeLocalEvent>(OnDoAfter); } diff --git a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs index b611ccdf7bf7..678875d61e2d 100644 --- a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs @@ -267,8 +267,8 @@ private bool TryDrink(EntityUid user, EntityUid target, DrinkComponent drink, En var doAfterEventArgs = new DoAfterEventArgs(user, drink.ForceDrink ? drink.ForceFeedDelay : drink.Delay, target: target, used: item) { - RaiseOnTarget = drink.ForceDrink, - RaiseOnUser = !drink.ForceDrink, + RaiseOnTarget = user != target, + RaiseOnUser = false, BreakOnUserMove = drink.ForceDrink, BreakOnDamage = true, BreakOnStun = true, @@ -295,17 +295,17 @@ private void OnDoAfter(EntityUid uid, DrinkComponent component, DoAfterEvent(args.Args.Target, out var body)) return; + component.Drinking = false; + var transferAmount = FixedPoint2.Min(component.TransferAmount, args.AdditionalData.DrinkSolution.Volume); var drained = _solutionContainerSystem.Drain(uid, args.AdditionalData.DrinkSolution, transferAmount); - //var forceDrink = args.Args.Target.Value != args.Args.User; - if (!_bodySystem.TryGetBodyOrganComponents(args.Args.Target.Value, out var stomachs, body)) { _popupSystem.PopupEntity(component.ForceDrink ? Loc.GetString("drink-component-try-use-drink-cannot-drink-other") : Loc.GetString("drink-component-try-use-drink-had-enough"), args.Args.Target.Value, args.Args.User); @@ -375,7 +375,6 @@ private void OnDoAfter(EntityUid uid, DrinkComponent component, DoAfterEvent(args.Args.Target.Value, out var body)) @@ -202,6 +202,7 @@ private void OnDoAfter(EntityUid uid, FoodComponent component, DoAfterEvent