Validate prototype ids in c# fields (#18224)

This commit is contained in:
Leon Friedrich
2023-07-30 05:34:51 +12:00
committed by GitHub
parent d4a85afb88
commit 385b587cfc
21 changed files with 116 additions and 74 deletions

View File

@@ -404,7 +404,7 @@ namespace Content.Client.Construction.UI
return;
}
if (_selected == null || _selected.Mirror == String.Empty)
if (_selected == null || _selected.Mirror == null)
{
return;
}

View File

@@ -197,7 +197,7 @@ public sealed class DecalPlacementSystem : EntitySystem
public sealed class PlaceDecalActionEvent : WorldTargetActionEvent
{
[DataField("decalId", customTypeSerializer:typeof(PrototypeIdSerializer<DecalPrototype>))]
[DataField("decalId", customTypeSerializer:typeof(PrototypeIdSerializer<DecalPrototype>), required:true)]
public string DecalId = string.Empty;
[DataField("color")]

View File

@@ -1,5 +1,7 @@
using Content.Shared.Salvage;
using Robust.Shared.GameStates;
namespace Content.Client.Salvage;
[NetworkedComponent, RegisterComponent]
public sealed class SalvageMagnetComponent : SharedSalvageMagnetComponent {}