mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* initial visual nubody * oops overlay * im so pheeming rn * conversion... * tests * comeback of the underwear * oops eyes * blabbl * zeds * yaml linted * search and visible count constraints * reordering * preserve previously selected markings colors * fix test * some ui niceties * ordering * make DB changes backwards-compatible/downgrade-friendly * fix things again * fix migration * vulpkanin markings limit increase * wrapping * code cleanup and more code cleanup and more code cleanup and more code cleanup and * fix slop ports * better sampling API * make filter work + use the method i made for its intended purpose * fix test fails real quick * magic mirror cleanup, remove TODO * don't 0-init the organ profile data * remove deltastates --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> # Conflicts: # Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs # Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs # Conflicts: # Resources/Prototypes/Species/diona.yml # Conflicts: # Content.Server/Zombies/ZombieSystem.Transform.cs
164 lines
5.1 KiB
C#
164 lines
5.1 KiB
C#
using Content.Shared.Body;
|
|
using Content.Shared.Chat.Prototypes;
|
|
using Content.Shared.Chemistry.Components;
|
|
using Content.Shared.Damage;
|
|
using Content.Shared.Humanoid;
|
|
using Content.Shared.Humanoid.Markings;
|
|
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 have no protective gear
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseZombieInfectionChance = 0.75f;
|
|
|
|
/// <summary>
|
|
/// The minimum infection chance possible. This is simply to prevent
|
|
/// being overly protected by bundling up.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float MinZombieInfectionChance = 0.05f;
|
|
|
|
/// <summary>
|
|
/// How effective each resistance type on a piece of armor is. Using a damage specifier for this seems illegal.
|
|
/// </summary>
|
|
public DamageSpecifier ResistanceEffectiveness = new()
|
|
{
|
|
DamageDict = new ()
|
|
{
|
|
{"Slash", 0.5},
|
|
{"Piercing", 0.3},
|
|
{"Blunt", 0.1},
|
|
}
|
|
};
|
|
|
|
[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 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";
|
|
|
|
[DataField]
|
|
public Dictionary<ProtoId<OrganCategoryPrototype>, OrganProfileData> BeforeZombifiedProfiles;
|
|
|
|
[DataField]
|
|
public Dictionary<ProtoId<OrganCategoryPrototype>, Dictionary<HumanoidVisualLayers, List<Marking>>> BeforeZombifiedMarkings;
|
|
|
|
[DataField("emoteId")]
|
|
public ProtoId<EmoteSoundsPrototype>? EmoteSoundsId = "Zombie";
|
|
|
|
[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 },
|
|
// DeltaV Start - Buff Zombies
|
|
{ "Heat", -0.2 }, // Was -0.02
|
|
{ "Shock", -0.2 } // Was -0.02
|
|
// DeltaV End - Buff Zombies
|
|
}
|
|
};
|
|
|
|
/// <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>
|
|
/// The damage dealt on bite, dehardcoded for your enjoyment
|
|
/// </summary>
|
|
[DataField]
|
|
public DamageSpecifier DamageOnBite = new()
|
|
{
|
|
DamageDict = new()
|
|
{
|
|
{ "Slash", 13 },
|
|
{ "Piercing", 7 },
|
|
{ "Structural", 10 }
|
|
}
|
|
};
|
|
|
|
/// <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 reagents of the humanoid to restore in case of cloning
|
|
/// </summary>
|
|
[DataField("beforeZombifiedBloodReagents")]
|
|
public Solution BeforeZombifiedBloodReagents = new();
|
|
|
|
/// <summary>
|
|
/// The blood reagents to give the zombie. In case you want zombies that bleed milk, or something.
|
|
/// </summary>
|
|
[DataField("newBloodReagents")]
|
|
public Solution NewBloodReagents = new([new("ZombieBlood", 1)]);
|
|
}
|