mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 16:47:26 +00:00
* add rule filter to feedback popup * fix the dependency * simplify * remove this * deny popups with rules * missed here * new parameter * the server handles the specific feedback prototypes * fix logic * active > added * minor fixes * not needed anymore * now it should be back * not needed * cleaning * create system * forgot to remove this * also remove this * add a I * remove old feedback popups * doesn't actually fix it * maybe this time? * oh well * use whitelists * use gamerule added * update fix comment * simplify * old commentary * default false * add blacklist option * fix helper functions * remove commentary * who needs those * orks hates linq * not needed * Change linq into foreach * remove unwanted popups for next rounds --------- Co-authored-by: beck-thompson <beck314159@hotmail.com>
68 lines
2.3 KiB
C#
68 lines
2.3 KiB
C#
using Content.Shared.Whitelist;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.FeedbackSystem;
|
|
|
|
/// <summary>
|
|
/// Prototype that describes the contents of a feedback popup.
|
|
/// </summary>
|
|
[Prototype]
|
|
public sealed partial class FeedbackPopupPrototype : IPrototype
|
|
{
|
|
/// <inheritdoc/>
|
|
[IdDataField]
|
|
public string ID { get; private set; } = null!;
|
|
|
|
/// <summary>
|
|
/// What server the popup is from, you must edit the ccvar to include this for the popup to appear!
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public string PopupOrigin = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Title of the popup. This supports rich text so you can use colors and stuff.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public string Title = string.Empty;
|
|
|
|
/// <summary>
|
|
/// List of "paragraphs" that are placed in the middle of the popup. Put any relevant information about what to give
|
|
/// feedback on here! [bold]Rich text is allowed[/bold]
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public string Description = string.Empty;
|
|
|
|
/// <summary>
|
|
/// The kind of response the player should expect to give; good examples are "Survey", "Discord Channel", "Feedback Thread" etc.
|
|
/// Will be listed near the "Open Link" button; rich text is not allowed.
|
|
/// </summary>
|
|
[DataField]
|
|
public string? ResponseType;
|
|
|
|
/// <summary>
|
|
/// A link leading to where you want players to give feedback. Discord channel, form etc...
|
|
/// </summary>
|
|
[DataField]
|
|
public string? ResponseLink;
|
|
|
|
/// <summary>
|
|
/// Should this feedback be shown when the round ends.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// If this is false popups have to be shown to players by running the <pre>feedback:add</pre> command.<br />
|
|
/// This allows admins to show popups to only specific people.
|
|
/// </remarks>
|
|
[DataField]
|
|
public bool ShowRoundEnd = true;
|
|
|
|
/// <summary>
|
|
/// Will only show this feedback at round end if there is a rule that fits in the whitelist
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This will only work if <see cref="ShowRoundEnd"/> is true.
|
|
/// If this is null it will show the feedback at round end regardless of the rules present
|
|
/// </remarks>
|
|
[DataField]
|
|
public EntityWhitelist? RuleWhitelist;
|
|
}
|