using Content.Shared.Chat;
using Content.Shared.Popups;
using Robust.Shared.Prototypes;
namespace Content.Shared.InteractionVerbs;
///
/// Specifies how popups should be shown.
/// Popup locales follow the format "interaction-[verb id]-[prefix]-[kind suffix]-popup", where:
/// - [prefix] is , which is one of: "success", "fail", "delayed".
/// - [kind suffix] is one of the respective suffix properties, typically "self", "target", or "others"
///
///
/// The following parameters may be used in the locale:
/// - {$user} - The performer of the action.
/// - {$target} - The target of the action.
/// - {$used} - The active-hand item used in the action. May be null, then "0" is used instead.
/// - {$selfTarget} - A boolean value that indicates whether the action is used on the user itself.
/// - {$hasUsed} - A boolean value that indicates whether the user is holding an item ($used is not null).
///
[Prototype("InteractionPopup"), Serializable]
public sealed partial class InteractionPopupPrototype : IPrototype
{
[IdDataField]
public string ID { get; } = default!;
[DataField]
public PopupType PopupType = PopupType.Medium;
///
/// If true, the respective success/fail popups will be logged into chat, as players perceive them.
///
[DataField]
public bool LogPopup = true;
///
/// Chat channel to which popups will be logged if is true.
///
[DataField]
public ChatChannel LogChannel = ChatChannel.Emotes;
///
/// Color of the chat message sent if is true. If null, defaults based on .
///
[DataField]
public Color? LogColor = null;
///
/// If true, entities who cannot directly see the popup target will not chat log. Only has effect if is true.
///
[DataField]
public bool DoClipping = true;
///
/// Range in which other entities, given that they can directly see the performer, see the chat log.
/// This does not affect the user and target. Only has effect if is true.
///
[DataField]
public float VisibilityRange = 20f;
///
/// Loc prefix for popups shown for the performer of the verb. If set to null, defaults to .
///
[DataField("self")]
public string? SelfSuffix = "self";
///
/// Loc prefix for popups shown for the target of the verb. If set to null, defaults to .
///
[DataField("target")]
public string? TargetSuffix = "target";
///
/// Loc prefix for popups shown for other people observing the verb. If null, no popup will be shown for others.
///
[DataField("others")]
public string? OthersSuffix = "others";
public enum Prefix : byte
{
Success,
Fail,
Delayed
}
}