mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* the owl * add butchering verb / text * make mobs use butchering verb * comment * awa * change these to use the subscription attributes while we're at it * Update Content.Shared/Tools/Systems/ToolRefinableSystem.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Apply suggestion from @Pok27 Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> --------- Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com>
100 lines
2.9 KiB
C#
100 lines
2.9 KiB
C#
using Content.Shared.Popups;
|
|
using Content.Shared.Storage;
|
|
using Content.Shared.Tools.Systems;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Shared.Tools.Components;
|
|
|
|
/// <summary>
|
|
/// Used for something that can be refined by welder.
|
|
/// For example, glass shard can be refined to glass sheet.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(ToolRefinableSystem))]
|
|
public sealed partial class ToolRefinableComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The items created when the item is refined.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public List<EntitySpawnEntry> RefineResult;
|
|
|
|
/// <summary>
|
|
/// The amount of time it takes to refine a given item.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan RefineTime = TimeSpan.FromSeconds(2);
|
|
|
|
/// <summary>
|
|
/// The amount of fuel it takes to refine a given item.
|
|
/// </summary>
|
|
[DataField]
|
|
public float RefineFuel = 3f;
|
|
|
|
/// <summary>
|
|
/// The tool type needed in order to refine this item.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<ToolQualityPrototype> QualityNeeded = "Welding";
|
|
|
|
/// <summary>
|
|
/// Sound that will be played after refine process finished.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier? Sound;
|
|
|
|
/// <summary>
|
|
/// Refine verb text. If there is no text, verb will not be added.
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? VerbText;
|
|
|
|
/// <summary>
|
|
/// Icon for refine verb.
|
|
/// </summary>
|
|
[DataField]
|
|
public SpriteSpecifier? VerbIcon;
|
|
|
|
/// <summary>
|
|
/// Default tooltip text for refine verb.
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? VerbDefaultTooltip;
|
|
|
|
/// <summary>
|
|
/// Verb tooltip in case currently used tool
|
|
/// is missing required (<see cref="QualityNeeded"/>) quality.
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? ToolMissingQualityTooltip;
|
|
|
|
/// <summary>
|
|
/// Popup text to display for action performer
|
|
/// on refine action performed (end of DoAfter).
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? PopupForUser;
|
|
|
|
/// <summary>
|
|
/// Popup text to display for players near action performer
|
|
/// on action performed (end of DoAfter).
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? PopupForOther;
|
|
|
|
/// <summary>
|
|
/// What type of popup should be used for <see cref="PopupForUser"/> and <see cref="PopupForOther"/>.
|
|
/// </summary>
|
|
[DataField]
|
|
public PopupType PopupType = PopupType.Small;
|
|
|
|
/// <summary>
|
|
/// Text to display on the examine tooltip for a refinable entity.
|
|
/// This has a `$target` parameter, representing the refinable entity,
|
|
/// and a `$quality` parameter, representing the name of the tool quality to use.
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? TooltipQualityHint = "tool-refinable-component-hint";
|
|
}
|