1
0

CursedMaskComponent.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using Content.Shared.Damage;
  2. using Content.Shared.NPC.Prototypes;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes;
  5. using Robust.Shared.Serialization;
  6. namespace Content.Shared.Clothing.Components;
  7. /// <summary>
  8. /// This is used for a mask that takes over the host when worn.
  9. /// </summary>
  10. [RegisterComponent, NetworkedComponent, Access(typeof(SharedCursedMaskSystem))]
  11. public sealed partial class CursedMaskComponent : Component
  12. {
  13. /// <summary>
  14. /// The current expression shown. Used to determine which effect is applied.
  15. /// </summary>
  16. [DataField]
  17. public CursedMaskExpression CurrentState = CursedMaskExpression.Neutral;
  18. /// <summary>
  19. /// Speed modifier applied when the "Joy" expression is present.
  20. /// </summary>
  21. [DataField]
  22. public float JoySpeedModifier = 1.15f;
  23. /// <summary>
  24. /// Damage modifier applied when the "Despair" expression is present.
  25. /// </summary>
  26. [DataField]
  27. public DamageModifierSet DespairDamageModifier = new();
  28. /// <summary>
  29. /// Whether or not the mask is currently attached to an NPC.
  30. /// </summary>
  31. [DataField]
  32. public bool HasNpc;
  33. /// <summary>
  34. /// The mind that was booted from the wearer when the mask took over.
  35. /// </summary>
  36. [DataField]
  37. public EntityUid? StolenMind;
  38. [DataField]
  39. public ProtoId<NpcFactionPrototype> CursedMaskFaction = "SimpleHostile";
  40. [DataField]
  41. public HashSet<ProtoId<NpcFactionPrototype>> OldFactions = new();
  42. }
  43. [Serializable, NetSerializable]
  44. public enum CursedMaskVisuals : byte
  45. {
  46. State
  47. }
  48. [Serializable, NetSerializable]
  49. public enum CursedMaskExpression : byte
  50. {
  51. Neutral,
  52. Joy,
  53. Despair,
  54. Anger
  55. }