MessyDrinker for dogs (#38852)

This commit is contained in:
ScarKy0
2025-08-06 15:00:32 +02:00
committed by GitHub
parent 5181219f89
commit 3d0a506f6d
6 changed files with 89 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ using Content.Server.Body.Systems;
using Content.Server.Fluids.EntitySystems;
using Content.Server.Forensics;
using Content.Server.Inventory;
using Content.Server.Nutrition.Events;
using Content.Server.Popups;
using Content.Shared.Administration.Logs;
using Content.Shared.Body.Components;
@@ -242,11 +243,18 @@ public sealed class DrinkSystem : SharedDrinkSystem
_audio.PlayPvs(entity.Comp.UseSound, args.Target.Value, AudioParams.Default.WithVolume(-2f).WithVariation(0.25f));
_reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion);
_stomach.TryTransferSolution(firstStomach.Value.Owner, drained, firstStomach.Value.Comp1);
var beforeDrinkEvent = new BeforeIngestDrinkEvent(entity.Owner, drained, forceDrink);
RaiseLocalEvent(args.Target.Value, ref beforeDrinkEvent);
_forensics.TransferDna(entity, args.Target.Value);
_reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion);
if (drained.Volume == 0)
return;
_stomach.TryTransferSolution(firstStomach.Value.Owner, drained, firstStomach.Value.Comp1);
if (!forceDrink && solution.Volume > 0)
args.Repeat = true;
}