BibleComponent.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using Content.Shared.Damage;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.Bible.Components
  5. {
  6. [RegisterComponent]
  7. public sealed partial class BibleComponent : Component
  8. {
  9. /// <summary>
  10. /// Default sound when bible hits somebody.
  11. /// </summary>
  12. private static readonly ProtoId<SoundCollectionPrototype> DefaultBibleHit = new("BibleHit");
  13. /// <summary>
  14. /// Sound to play when bible hits somebody.
  15. /// </summary>
  16. [DataField]
  17. public SoundSpecifier BibleHitSound = new SoundCollectionSpecifier(DefaultBibleHit, AudioParams.Default.WithVolume(-4f));
  18. /// <summary>
  19. /// Damage that will be healed on a success
  20. /// </summary>
  21. [DataField("damage", required: true)]
  22. [ViewVariables(VVAccess.ReadWrite)]
  23. public DamageSpecifier Damage = default!;
  24. /// <summary>
  25. /// Damage that will be dealt on a failure
  26. /// </summary>
  27. [DataField("damageOnFail", required: true)]
  28. [ViewVariables(VVAccess.ReadWrite)]
  29. public DamageSpecifier DamageOnFail = default!;
  30. /// <summary>
  31. /// Damage that will be dealt when a non-chaplain attempts to heal
  32. /// </summary>
  33. [DataField("damageOnUntrainedUse", required: true)]
  34. [ViewVariables(VVAccess.ReadWrite)]
  35. public DamageSpecifier DamageOnUntrainedUse = default!;
  36. /// <summary>
  37. /// Chance the bible will fail to heal someone with no helmet
  38. /// </summary>
  39. [DataField("failChance")]
  40. [ViewVariables(VVAccess.ReadWrite)]
  41. public float FailChance = 0.34f;
  42. [DataField("sizzleSound")]
  43. public SoundSpecifier SizzleSoundPath = new SoundPathSpecifier("/Audio/Effects/lightburn.ogg");
  44. [DataField("healSound")]
  45. public SoundSpecifier HealSoundPath = new SoundPathSpecifier("/Audio/Effects/holy.ogg");
  46. [DataField("locPrefix")]
  47. public string LocPrefix = "bible";
  48. }
  49. }