Skip to content

Commit 863bef7

Browse files
committed
protoid now contains validateprototypeattribute features
1 parent b91f1d4 commit 863bef7

File tree

83 files changed

+174
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+174
-297
lines changed

Content.Client/Backmen/Blob/BlobChemSwapMenu.xaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ protected override void ExitedTree()
4646
ClearGrid();
4747
}
4848

49-
[ValidatePrototypeId<EntityPrototype>]
50-
private const string NormalBlobTile = "NormalBlobTile";
49+
private readonly EntProtoId NormalBlobTile = "NormalBlobTile";
5150

5251
private void UpdateGrid()
5352
{

Content.Client/Backmen/Blob/BlobCoreActionSystem.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public override void Initialize()
1717
SubscribeNetworkEvent<BlobAttackEvent>(OnBlobAttack);
1818
}
1919

20-
[ValidatePrototypeId<EntityPrototype>]
21-
private const string Animation = "WeaponArcPunch";
20+
private readonly EntProtoId Animation = "WeaponArcPunch";
2221

2322
private void OnBlobAttack(BlobAttackEvent ev)
2423
{

Content.Client/Backmen/Blob/BlobObserverSystem.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public override void Initialize()
3232
SubscribeNetworkEvent<RoundRestartCleanupEvent>(RoundRestartCleanup);
3333
}
3434

35-
[ValidatePrototypeId<FactionIconPrototype>]
36-
private const string BlobFaction = "BlobFaction";
35+
private readonly ProtoId<FactionIconPrototype> BlobFaction = "BlobFaction";
3736

3837
private void OnShowBlobIcon<T>(Entity<T> ent, ref GetStatusIconsEvent args) where T : Component
3938
{

Content.Client/Backmen/Flesh/FleshCultist.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ public override void Initialize()
1818
SubscribeLocalEvent<FleshCultistComponent, GetStatusIconsEvent>(OnShowCultIcon);
1919
}
2020

21-
[ValidatePrototypeId<FactionIconPrototype>]
22-
private const string FleshcultistFaction = "FleshcultistFaction";
21+
private readonly ProtoId<FactionIconPrototype> FleshcultistFaction = "FleshcultistFaction";
2322

2423
private void OnShowCultIcon(Entity<FleshCultistComponent> ent, ref GetStatusIconsEvent args)
2524
{

Content.Client/Backmen/GhostTheme/GhostThemeSystem.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ private void OnInit(EntityUid uid, GhostThemeComponent component, ref AfterAutoH
2828
Apply(uid, ghostThemePrototype);
2929
}
3030

31-
[ValidatePrototypeId<EntityPrototype>]
32-
private const string MobObserver = "MobObserver";
31+
private readonly EntProtoId MobObserver = "MobObserver";
3332

3433
public void Apply(EntityUid uid, GhostThemePrototype ghostThemePrototype)
3534
{

Content.Client/Backmen/Overlays/Shaders/EtherealOverlay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public sealed class EtherealOverlay : Overlay
1515
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
1616
private readonly ShaderInstance _shader;
1717

18-
[ValidatePrototypeId<ShaderPrototype>] private const string Ethereal = "Ethereal";
18+
private readonly ProtoId<ShaderPrototype> Ethereal = "Ethereal";
1919

2020
public EtherealOverlay()
2121
{

Content.Client/Backmen/Overlays/Systems/NearsightedSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Robust.Shared.Network;
44
using Content.Shared.Tag;
55
using Content.Shared.Backmen.Traits;
6+
using Robust.Shared.Prototypes;
67

78
namespace Content.Client.Backmen.Overlays;
89
public sealed class NearsightedSystem : EntitySystem
@@ -19,8 +20,7 @@ public override void Initialize()
1920
_overlay = new Overlays.NearsightedOverlay();
2021
}
2122

22-
[ValidatePrototypeId<TagPrototype>]
23-
private const string TagName = "GlassesNearsight";
23+
private readonly ProtoId<TagPrototype> TagName = "GlassesNearsight";
2424

2525
public override void Update(float frameTime)
2626
{

Content.Client/Backmen/SponsorManager/UI/SponsorWindow.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public SponsorWindow()
3636

3737
private List<GhostThemePrototype>? _ghostThemePrototypes;
3838

39-
[ValidatePrototypeId<EntityPrototype>]
40-
private const string ObserverPrototypeName = "MobObserver";
39+
private readonly EntProtoId ObserverPrototypeName = "MobObserver";
4140

4241
protected override void Opened()
4342
{

Content.Client/Backmen/StationAI/AiEnemySystem.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public override void Initialize()
2222
_ghostQuery = GetEntityQuery<GhostComponent>();
2323
}
2424

25-
[ValidatePrototypeId<SecurityIconPrototype>]
26-
private const string AiEnemyStatus = "AiIconEnemyTarget";
25+
private readonly ProtoId<SecurityIconPrototype> AiEnemyStatus = "AiIconEnemyTarget";
2726
private void GetIcon(Entity<AIEnemyNTComponent> target, ref GetStatusIconsEvent args)
2827
{
2928
var ent = _player.LocalSession?.AttachedEntity ?? EntityUid.Invalid;

Content.Client/Backmen/Teams/TdmTeamSystem.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ protected override void SetTeam(Entity<TdmMemberComponent?> target, StationTeamM
2222
// do nothing on client
2323
}
2424

25-
[ValidatePrototypeId<FactionIconPrototype>]
26-
private const string TeamA = "TeamAFaction";
27-
[ValidatePrototypeId<FactionIconPrototype>]
28-
private const string TeamB = "TeamBFaction";
29-
[ValidatePrototypeId<FactionIconPrototype>]
30-
private const string TeamNoTeam = "Team0Faction";
25+
private readonly ProtoId<FactionIconPrototype> TeamA = "TeamAFaction";
26+
private readonly ProtoId<FactionIconPrototype> TeamB = "TeamBFaction";
27+
private readonly ProtoId<FactionIconPrototype> TeamNoTeam = "Team0Faction";
3128

3229
private void OnGetTeamIcon(Entity<TdmMemberComponent> ent, ref GetStatusIconsEvent args)
3330
{

0 commit comments

Comments
 (0)