Convert spam letters to a LocalizedDataset (#36393)

* Convert spam letters to a LocalizedDataset

* Error -> warning

* Comments

* Add migrations for old spam mail entities
This commit is contained in:
Tayrtahn
2025-04-14 13:38:21 -04:00
committed by GitHub
parent e7dfb66def
commit 110ed2736f
7 changed files with 236 additions and 253 deletions

View File

@@ -0,0 +1,17 @@
using Content.Shared.Dataset;
using Robust.Shared.Prototypes;
namespace Content.Shared.Paper;
/// <summary>
/// If added to an entity that has a <see cref="PaperComponent"/>, the name,
/// description and contents of the paper will be replaced with a random
/// entry from the specified <see cref="LocalizedDatasetPrototype"/>.
/// Requires <see cref="PaperComponent"/>.
/// </summary>
[RegisterComponent]
public sealed partial class RandomPaperContentComponent : Component
{
[DataField(required: true)]
public ProtoId<LocalizedDatasetPrototype> Dataset;
}