Фиксы (#488)

* add material storage component to whitemoose

* fix pickaxe inventory size

* fix free sponsor only races

* invisible aghost no longer visible in ghost warp menu

* add migration for BoxTrashbag

* fix make wizard admin verb

* fixed wizard components swap and new wizard marks as wizard in ghost warp menu now

* Stop eating food if you drop it (#29854)

* Stop eating food if you drop it

* woops, unused param

* comments

---------

Co-authored-by: plykiya <plykiya@protonmail.com>

* Eating and Drinking Doafter Change (#30060)

My lawyer told me to do this

Co-authored-by: plykiya <plykiya@protonmail.com>

* ActivatableUI tweaks (#27448)

* ActivatableUI tweaks

* EntGotRemovedFromContainerMessage

* A

* Revert "ActivatableUI tweaks (#27448)"

This reverts commit 5b311c6fdbf77db6838bdcf9993b98272d4ebeac.

* fix eating food from containers

* fix double captain duffel

* add bible for chaplain loadout

* possible bad fix for double security headsets

---------

Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com>
Co-authored-by: plykiya <plykiya@protonmail.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
This commit is contained in:
ThereDrD0
2024-07-24 02:19:13 +03:00
committed by GitHub
parent a3ce41d6ea
commit 0d99c5afe7
12 changed files with 78 additions and 29 deletions

View File

@@ -16,6 +16,7 @@ using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.DoAfter;
using Content.Shared.FixedPoint;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
@@ -47,6 +48,7 @@ public sealed class DrinkSystem : SharedDrinkSystem
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedHandsSystem _hands = default!;
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly StomachSystem _stomach = default!;
@@ -155,6 +157,9 @@ public sealed class DrinkSystem : SharedDrinkSystem
_appearance.SetData(uid, FoodVisuals.Visual, drainAvailable.Float(), appearance);
}
/// <summary>
/// Tries to feed the drink item to the target entity
/// </summary>
private bool TryDrink(EntityUid user, EntityUid target, DrinkComponent drink, EntityUid item)
{
if (!HasComp<BodyComponent>(target))
@@ -209,9 +214,9 @@ public sealed class DrinkSystem : SharedDrinkSystem
BreakOnDamage = true,
MovementThreshold = 0.01f,
DistanceThreshold = 1.0f,
// Mice and the like can eat without hands.
// TODO maybe set this based on some CanEatWithoutHands event or component?
NeedHand = forceDrink,
// do-after will stop if item is dropped when trying to feed someone else
// or if the item started out in the user's own hands
NeedHand = forceDrink || _hands.IsHolding(user, item),
};
_doAfter.TryStartDoAfter(doAfterEventArgs);