Files
tbd-station-14/Content.Shared/Chemistry/Components/SolutionManager/ExaminableSolutionComponent.cs
āda 49c4aab489 Move solution examine subscription from DrinkComponent to ExaminableSolutionComponent (#39362)
* initial it works

* clean it up

* yml

* datafield the LocIds

* move from the other branch

* no max vol on puddles and anoms

* closed

* Changes inspired by #39008

* small bug and more color range

* puddle changes and more examinable solutions

* lint

* small change

* requested changes

* un-delete

* tiny comment

* 1 less loc id in this world

* request and last second change

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
2025-08-06 09:11:19 -07:00

71 lines
2.0 KiB
C#

using Content.Shared.Nutrition.Components;
using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry.Components.SolutionManager;
/// <summary>
/// Component for examining a solution with shift click or through <see cref="SolutionScanEvent"/>.
/// </summary>
[RegisterComponent]
public sealed partial class ExaminableSolutionComponent : Component
{
/// <summary>
/// The solution being examined.
/// </summary>
[DataField]
public string Solution = "default";
/// <summary>
/// If true, the solution must be held to be examined.
/// </summary>
[DataField]
public bool HeldOnly;
/// <summary>
/// If false, the examine text will give an approximation of the remaining solution.
/// If true, the exact unit count will be shown.
/// </summary>
[DataField]
public bool ExactVolume;
/// <summary>
/// If false, the solution can't be examined when this entity is closed by <see cref="OpenableComponent"/>.
/// </summary>
[DataField]
public bool ExaminableWhileClosed = true;
/// <summary>
/// Examine text for the amount of solution.
/// </summary>
/// <seealso cref="ExaminedVolumeDisplay"/>
[DataField]
public LocId LocVolume = "examinable-solution-on-examine-volume";
/// <summary>
/// Examine text for the physical description of the primary reagent.
/// </summary>
[DataField]
public LocId LocPhysicalQuality = "shared-solution-container-component-on-examine-main-text";
/// <summary>
/// Examine text for reagents that are obvious like water.
/// </summary>
[DataField]
public LocId LocRecognizableReagents = "examinable-solution-has-recognizable-chemicals";
}
/// <summary>
/// Used to choose how to display a volume.
/// </summary>
[Serializable, NetSerializable]
public enum ExaminedVolumeDisplay
{
Exact,
Full,
MostlyFull,
HalfFull,
HalfEmpty,
MostlyEmpty,
Empty,
}