mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-24 09:08:04 +03:00
## Mirror of PR #25925: [Zombies can very slowly regen heat and shock damage](https://github.com/space-wizards/space-station-14/pull/25925) from <img src="https://avatars.githubusercontent.com/u/10567778?v=4" alt="space-wizards" width="22"/> [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `3884c2d2d2e8c907a33cbef28a55bda701cc4963` PR opened by <img src="https://avatars.githubusercontent.com/u/140359015?v=4" width="16"/><a href="https://github.com/shampunj"> shampunj</a> at 2024-03-08 05:06:55 UTC --- PR changed 1 files with 3 additions and 1 deletions. The PR had the following labels: - Status: Needs Review --- <details open="true"><summary><h1>Original Body</h1></summary> > <!-- Please read these guidelines before opening your PR: https://docs.spacestation14.io/en/getting-started/pr-guideline --> > <!-- The text between the arrows are comments - they will not be visible on your PR. --> > > ## About the PR > <!-- What did you change in this PR? --> > Zombies have learned to regenerate burns very slowly > ## Why / Balance > <!-- Why was it changed? Link any discussions or issues here. Please discuss how this would affect game balance. --> > Make zombies stronger, make it possible to get up from crit when severely burned > ## Technical details > <!-- If this is a code change, summarize at high level how your new code works. This makes it easier to review. --> > n/a > ## Media > <!-- > PRs which make ingame changes (adding clothing, items, new features, etc) are required to have media attached that showcase the changes. > Small fixes/refactors are exempt. > Any media may be used in SS14 progress reports, with clear credit given. > > If you're unsure whether your PR will require media, ask a maintainer. > > Check the box below to confirm that you have in fact seen this (put an X in the brackets, like [X]): > --> > > - [ ] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase > > ## Breaking changes > <!-- > List any breaking changes, including namespace, public class/method/field changes, prototype renames; and provide instructions for fixing them. This will be pasted in #codebase-changes. > --> > > **Changelog** > <!-- > Make players aware of new features and changes that could affect how they play the game by adding a Changelog entry. Please read the Changelog guidelines located at: https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog > --> > 🆑 > - tweak: Zombies now passively heal 1 heat/shock damage every 50 seconds </details> Co-authored-by: SimpleStation14 <Unknown>
163 lines
5.3 KiB
C#
163 lines
5.3 KiB
C#
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, IAntagStatusIconComponent
|
|
{
|
|
/// <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.50f;
|
|
|
|
[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 EntityName of the humanoid to restore in case of cloning
|
|
/// </summary>
|
|
[DataField("beforeZombifiedEntityName"), ViewVariables(VVAccess.ReadOnly)]
|
|
public string BeforeZombifiedEntityName = string.Empty;
|
|
|
|
/// <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<StatusIconPrototype> StatusIcon { get; set; } = "ZombieFaction";
|
|
|
|
[DataField]
|
|
public bool IconVisibleToGhost { get; set; } = true;
|
|
|
|
/// <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";
|
|
}
|