scoopable ash and foam, solution transfer prediction (#25832)

* move SolutionTransfer to shared and predict as much as possible

* fully move OpenableSystem to shared now that SolutionTransfer is

* fix imports for everything

* doc for solution transfer system

* trolling

* add scoopable system

* make ash and foam scoopable

* untroll

* untroll real

* make clickable it work

* troll

* the scooping room

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
deltanedas
2024-04-01 06:27:39 +00:00
committed by GitHub
parent d9b6e9f127
commit 1db178b632
23 changed files with 341 additions and 279 deletions

View File

@@ -24,6 +24,7 @@ using Content.Shared.Interaction.Events;
using Content.Shared.Mobs.Systems;
using Content.Shared.Nutrition;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Throwing;
using Content.Shared.Verbs;
using Robust.Shared.Audio;

View File

@@ -23,6 +23,7 @@ using Content.Shared.Interaction.Events;
using Content.Shared.Inventory;
using Content.Shared.Mobs.Systems;
using Content.Shared.Nutrition;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Stacks;
using Content.Shared.Storage;
using Content.Shared.Verbs;

View File

@@ -1,27 +0,0 @@
using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Nutrition.Components;
namespace Content.Server.Nutrition.EntitySystems;
/// <summary>
/// Provides API for openable food and drinks, handles opening on use and preventing transfer when closed.
/// </summary>
public sealed class OpenableSystem : SharedOpenableSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<OpenableComponent, SolutionTransferAttemptEvent>(OnTransferAttempt);
}
private void OnTransferAttempt(EntityUid uid, OpenableComponent comp, SolutionTransferAttemptEvent args)
{
if (!comp.Opened)
{
// message says its just for drinks, shouldn't matter since you typically dont have a food that is openable and can be poured out
args.Cancel(Loc.GetString("drink-component-try-use-drink-not-open", ("owner", uid)));
}
}
}