Blindness networking (#36623)

* Blindness networking

Nothing actually sets this.

* Update Content.Shared/Traits/Assorted/PermanentBlindnessComponent.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2025-04-16 20:27:25 +10:00
committed by GitHub
parent 7e3f3a7ca3
commit 0a750fd6db
2 changed files with 7 additions and 4 deletions

View File

@@ -5,10 +5,13 @@ namespace Content.Shared.Traits.Assorted;
/// <summary>
/// This is used for making something blind forever.
/// </summary>
[RegisterComponent, NetworkedComponent]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class PermanentBlindnessComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField]
public int Blindness = 0; // How damaged should their eyes be. Set 0 for maximum damage.
/// <summary>
/// How damaged should their eyes be? Set 0 for maximum damage.
/// </summary>
[DataField, AutoNetworkedField]
public int Blindness = 0;
}

View File

@@ -24,7 +24,7 @@ public sealed class PermanentBlindnessSystem : EntitySystem
private void OnExamined(Entity<PermanentBlindnessComponent> blindness, ref ExaminedEvent args)
{
if (args.IsInDetailsRange && !_net.IsClient && blindness.Comp.Blindness == 0)
if (args.IsInDetailsRange && blindness.Comp.Blindness == 0)
{
args.PushMarkup(Loc.GetString("permanent-blindness-trait-examined", ("target", Identity.Entity(blindness, EntityManager))));
}