|
| 1 | +using Content.Shared.Chat.Prototypes; |
| 2 | +using Content.Shared.Damage; |
| 3 | +using Content.Shared.Damage.Prototypes; |
| 4 | +using Content.Shared.FixedPoint; |
| 5 | +using Robust.Shared.GameStates; |
| 6 | +using Robust.Shared.Prototypes; |
| 7 | +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; |
| 8 | + |
| 9 | +namespace Content.Shared._DV.Body.Components; |
| 10 | + |
| 11 | +/// <summary> |
| 12 | +/// This is used for Avali feather preening functionality. |
| 13 | +/// </summary> |
| 14 | +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause] |
| 15 | +public sealed partial class PreenableComponent : Component |
| 16 | +{ |
| 17 | + [DataField] |
| 18 | + public EntProtoId FeatherPrototype; |
| 19 | + |
| 20 | + [DataField] |
| 21 | + public HashSet<ProtoId<DamageGroupPrototype>>? ValidDamageGroups = new() |
| 22 | + { |
| 23 | + "Brute", |
| 24 | + }; |
| 25 | + |
| 26 | + [DataField] |
| 27 | + public LocId SelfPreeningMessage = "preening-popup-self"; |
| 28 | + |
| 29 | + [DataField] |
| 30 | + public LocId GettingPreenedMessage = "preening-popup-self-recipient"; |
| 31 | + |
| 32 | + [DataField] |
| 33 | + public LocId PreeningOtherMessage = "preening-popup-other"; |
| 34 | + |
| 35 | + [DataField] |
| 36 | + public LocId FeatherBloodiedNameString = "feather-bloody-name-modifier"; |
| 37 | + |
| 38 | + [DataField] |
| 39 | + public LocId FeatherBloodiedDescString = "feather-bloody-desc"; |
| 40 | + |
| 41 | + [DataField] |
| 42 | + public LocId PreeningVerbString = "preening-action-verb"; |
| 43 | + |
| 44 | + [DataField] |
| 45 | + public LocId DroppedFeatherString = "preening-feather-dropped-injured"; |
| 46 | + |
| 47 | + [DataField] |
| 48 | + public ProtoId<EmotePrototype> ScreamEmote = "Scream"; |
| 49 | + |
| 50 | + /// <summary> |
| 51 | + /// The minimum amount of damage that must be taken from one attack to have a chance to shed a feather. |
| 52 | + /// </summary> |
| 53 | + [DataField] |
| 54 | + public FixedPoint2 ShedDamageThreshold = 9; |
| 55 | + |
| 56 | + /// <summary> |
| 57 | + /// The chance for a feather to be shed on hit, per point of damage taken. |
| 58 | + /// </summary> |
| 59 | + [DataField] |
| 60 | + public float ShedScalingChance = 0.0125f; |
| 61 | + |
| 62 | + [DataField] |
| 63 | + public DamageModifierSet? VulnerabilityModifier; |
| 64 | + |
| 65 | + [DataField, AutoNetworkedField] |
| 66 | + public int MaximumFeathers = 3; |
| 67 | + |
| 68 | + [DataField, AutoNetworkedField] |
| 69 | + public int CurrentFeathers; |
| 70 | + |
| 71 | + [DataField] |
| 72 | + public TimeSpan ReplenishDelay = TimeSpan.FromSeconds(150); |
| 73 | + |
| 74 | + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField] |
| 75 | + public TimeSpan? ReplenishTime; |
| 76 | +} |
0 commit comments