mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix AudioParams deserialization (#3191)
This commit is contained in:
@@ -82,7 +82,7 @@ namespace Robust.Shared.Audio
|
||||
/// If not null, this will randomly modify the pitch scale by adding a number drawn from a normal distribution with this deviation.
|
||||
/// </summary>
|
||||
[DataField("variation")]
|
||||
public float? Variation { get; set; }
|
||||
public float? Variation { get; set; } = null;
|
||||
|
||||
// For the max distance value: it's 2000 in Godot, but I assume that's PIXELS due to the 2D positioning,
|
||||
// so that's divided by 32 (EyeManager.PIXELSPERMETER).
|
||||
@@ -91,6 +91,9 @@ namespace Robust.Shared.Audio
|
||||
/// </summary>
|
||||
public static readonly AudioParams Default = new(0, 1, "Master", SharedAudioSystem.DefaultSoundRange, 1, 1, false, 0f);
|
||||
|
||||
// explicit parameterless constructor required so that default values get set properly.
|
||||
public AudioParams() { }
|
||||
|
||||
public AudioParams(
|
||||
float volume,
|
||||
float pitchScale,
|
||||
|
||||
@@ -222,7 +222,10 @@ namespace Robust.Shared.Containers
|
||||
{
|
||||
[DataField("entities")] public List<EntityUid> Entities = new ();
|
||||
|
||||
[DataField("type")] public string? Type;
|
||||
[DataField("type")] public string? Type = null;
|
||||
|
||||
// explicit parameterless constructor is required.
|
||||
public ContainerPrototypeData() { }
|
||||
|
||||
public ContainerPrototypeData(List<EntityUid> entities, string type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user