| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- using Content.Shared.Antag;
- using Content.Shared.Chat.Prototypes;
- using Content.Shared.Chemistry.Reagent;
- using Content.Shared.Damage;
- using Content.Shared.Humanoid;
- using Content.Shared.Roles;
- using Content.Shared.StatusIcon;
- using Robust.Shared.Audio;
- using Robust.Shared.GameStates;
- using Robust.Shared.Prototypes;
- using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
- using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
- namespace Content.Shared.Zombies;
- [RegisterComponent, NetworkedComponent]
- public sealed partial class ZombieComponent : Component
- {
- /// <summary>
- /// The baseline infection chance you have if you are completely nude
- /// </summary>
- [ViewVariables(VVAccess.ReadWrite)]
- public float MaxZombieInfectionChance = 0.80f;
- /// <summary>
- /// The minimum infection chance possible. This is simply to prevent
- /// being invincible by bundling up.
- /// </summary>
- [ViewVariables(VVAccess.ReadWrite)]
- public float MinZombieInfectionChance = 0.25f;
- [ViewVariables(VVAccess.ReadWrite)]
- public float ZombieMovementSpeedDebuff = 0.70f;
- /// <summary>
- /// The skin color of the zombie
- /// </summary>
- [DataField("skinColor")]
- public Color SkinColor = new(0.45f, 0.51f, 0.29f);
- /// <summary>
- /// The eye color of the zombie
- /// </summary>
- [DataField("eyeColor")]
- public Color EyeColor = new(0.96f, 0.13f, 0.24f);
- /// <summary>
- /// The base layer to apply to any 'external' humanoid layers upon zombification.
- /// </summary>
- [DataField("baseLayerExternal")]
- public string BaseLayerExternal = "MobHumanoidMarkingMatchSkin";
- /// <summary>
- /// The attack arc of the zombie
- /// </summary>
- [DataField("attackArc", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
- public string AttackAnimation = "WeaponArcBite";
- /// <summary>
- /// The role prototype of the zombie antag role
- /// </summary>
- [DataField("zombieRoleId", customTypeSerializer: typeof(PrototypeIdSerializer<AntagPrototype>))]
- public string ZombieRoleId = "Zombie";
- /// <summary>
- /// The CustomBaseLayers of the humanoid to restore in case of cloning
- /// </summary>
- [DataField("beforeZombifiedCustomBaseLayers")]
- public Dictionary<HumanoidVisualLayers, CustomBaseLayerInfo> BeforeZombifiedCustomBaseLayers = new ();
- /// <summary>
- /// The skin color of the humanoid to restore in case of cloning
- /// </summary>
- [DataField("beforeZombifiedSkinColor")]
- public Color BeforeZombifiedSkinColor;
- /// <summary>
- /// The eye color of the humanoid to restore in case of cloning
- /// </summary>
- [DataField("beforeZombifiedEyeColor")]
- public Color BeforeZombifiedEyeColor;
- [DataField("emoteId", customTypeSerializer: typeof(PrototypeIdSerializer<EmoteSoundsPrototype>))]
- public string? EmoteSoundsId = "Zombie";
- public EmoteSoundsPrototype? EmoteSounds;
- [DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))]
- public TimeSpan NextTick;
- [DataField("zombieStatusIcon")]
- public ProtoId<FactionIconPrototype> StatusIcon { get; set; } = "ZombieFaction";
- /// <summary>
- /// Healing each second
- /// </summary>
- [DataField("passiveHealing")]
- public DamageSpecifier PassiveHealing = new()
- {
- DamageDict = new ()
- {
- { "Blunt", -0.4 },
- { "Slash", -0.2 },
- { "Piercing", -0.2 },
- { "Heat", -0.02 },
- { "Shock", -0.02 }
- }
- };
- /// <summary>
- /// A multiplier applied to <see cref="PassiveHealing"/> when the entity is in critical condition.
- /// </summary>
- [DataField("passiveHealingCritMultiplier")]
- public float PassiveHealingCritMultiplier = 2f;
- /// <summary>
- /// Healing given when a zombie bites a living being.
- /// </summary>
- [DataField("healingOnBite")]
- public DamageSpecifier HealingOnBite = new()
- {
- DamageDict = new()
- {
- { "Blunt", -2 },
- { "Slash", -2 },
- { "Piercing", -2 }
- }
- };
- /// <summary>
- /// Path to antagonist alert sound.
- /// </summary>
- [DataField("greetSoundNotification")]
- public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/zombie_start.ogg");
- /// <summary>
- /// Hit sound on zombie bite.
- /// </summary>
- [DataField]
- public SoundSpecifier BiteSound = new SoundPathSpecifier("/Audio/Effects/bite.ogg");
- /// <summary>
- /// The blood reagent of the humanoid to restore in case of cloning
- /// </summary>
- [DataField("beforeZombifiedBloodReagent")]
- public string BeforeZombifiedBloodReagent = string.Empty;
- /// <summary>
- /// The blood reagent to give the zombie. In case you want zombies that bleed milk, or something.
- /// </summary>
- [DataField("newBloodReagent", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>))]
- public string NewBloodReagent = "ZombieBlood";
- }
|