* Silicon Law Sound cue refactor - Added CueEntityMind to Silicon Law system to more uniformally send sounds to minds - Switch all previous MindPlaySound to instead call to the new method * Change SiliconLawEui to cue the mind * CR: TryGetComponent and Change the Documentation - Remove GetComponentOrNull for _entityManager.TryGetComponent - Change SiliconLawProviderComponent.LawUploadSound to be more general rather than just referencing lawboards * Update Content.Server/Silicons/Laws/SiliconLawEui.cs * Update Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs * Silicon-law-cue-refactor - CR: - Roll the cuing into NotifyLawsChanged via an optional variable for the cue - Modify "SetLaws" to take in an optional soundProvider for the cue - modify Emagged, Ion, Eui and SetLaws to instead send the sound cue via NotifyLawsChanged --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Audio;
|
|
|
|
namespace Content.Shared.Silicons.Laws.Components;
|
|
|
|
/// <summary>
|
|
/// This is used for an entity which grants laws to a <see cref="SiliconLawBoundComponent"/>
|
|
/// </summary>
|
|
[RegisterComponent, Access(typeof(SharedSiliconLawSystem))]
|
|
public sealed partial class SiliconLawProviderComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The id of the lawset that is being provided.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public ProtoId<SiliconLawsetPrototype> Laws = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Lawset created from the prototype id.
|
|
/// Cached when getting laws and modified during an ion storm event and when emagged.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public SiliconLawset? Lawset;
|
|
|
|
/// <summary>
|
|
/// The sound that plays for the Silicon player
|
|
/// when the law change is processed for the provider.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier? LawUploadSound = new SoundPathSpecifier("/Audio/Misc/cryo_warning.ogg");
|
|
|
|
}
|