* Removed arbitrary modifier scaling. The bleed amount is now 1-1 in units. * Added some comments to explain the blood and bleed code * added some comments * added some comments * profusely bleeding message scales with max bleed rate * Added some comments * Added some comments (tm) * Halved the speed bleed rate heals. * Changed the wording of a comment to make the function of the values more clear * Changed bleed rate values, made heat heal more bleed rate * doubled crit chance, since damage types were reduced * Made iron restore more blood, 2->4u per 1u * Starting to add the blood pack * add bloodlevel to healingcomponent * Created code support in the healing system for restoring blood * first test of blood pack prototype * More pack testing, and defining the yml stack * yml syntax fix * adds bloodpack tag * Successfully added the item, but the effect and deletion after using the item is not working yet. * the blood regen worksgit add -A! * blood pack is entirely functioning * Removed bleed rate healing from brute pack * Comment correction * I tried * Removed bleed stats from corrupted corgi, they inherit same stats from basemob * Removed bleed stats from xeno, they inherit same stats from a base mob * Removed bleed stats from diona, they inherit same stats from a base mob * Removed bleed stats from slimes, they inherit same stats from a base mob * All mobs now heal bloodloss damage at a rate of 1 instead of 0.25 when healthy * The cautery now closes bleed wounds * Nerf blood pack bleed rate heal * Added 2 blood packs to medicine locker * Added 2 blood packs to wall medicine locker * Minor YML fix to chemistry locker, no changes in game * Added tag to medical belt for blood pack, added 2 blood packs to medical belt * Added 1 gauze to medical belt * 5 blood packs addded to nanomed plus * nanomed inventory change * 2 blood packs added to medical supplies crate from cargo * Moved 1 gauze from med kit to advanced med kit * Moved 1 tricord pill from advanced med kit to basic med kit * added 2 ointment to burn kit * Moved ina syringe from burn treatment to oxygen kit * Removed one gauze from brute kit * Added one bloodpack to brute med kit * Moved tranex acid syringe from advanced first aid to brute kit * Poison medipen moved from advanced first aid kit to toxin kit * Removed health analyzer from advanced first aid kit * removed one brute pack from advanced aid kit * added one ointment to advanced aid kit * Added one blood pack to advanced aid kit * Added 2 blood packs to combat med kit * Starting with adding the license for the tg sprite * Adds the blood pack sprite and meta.json code * I forgor to actually code the sprite in * Advanced med kit missing one blood pack * Replaced tricord pill with emergency medipen in cobat kit * Removed emergency pen from combat kit, there's no space for it * Revert "I tried" This reverts commit 94c2e28df3200993d3f09b72ecabc838ea5ae5c0. * Trying to fix yml test fail * Try again * attempt number 3 * Restock crate price was too low * fixing merge conflict without making a HUGE mess this time * ??? * again * again * Can I add the newline now maybe??? * Revert "Can I add the newline now maybe???" This reverts commit 22d26706a65a24633f7da1dea6315012e2d3ac6f. * Adds the doafter fix code from Keron to the blood level healing * minor typo fix * Feedback from Emisse and sloth; Removed chance based feedback on cauterizing * comment fix
68 lines
2.3 KiB
C#
68 lines
2.3 KiB
C#
using Content.Shared.Damage;
|
|
using Content.Shared.Damage.Prototypes;
|
|
using Content.Shared.DoAfter;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Server.Medical.Components
|
|
{
|
|
/// <summary>
|
|
/// Applies a damage change to the target when used in an interaction.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed class HealingComponent : Component
|
|
{
|
|
[DataField("damage", required: true)]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public DamageSpecifier Damage = default!;
|
|
|
|
/// <remarks>
|
|
/// This should generally be negative,
|
|
/// since you're, like, trying to heal damage.
|
|
/// </remarks>
|
|
[DataField("bloodlossModifier")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float BloodlossModifier = 0.0f;
|
|
|
|
/// <summary>
|
|
/// Restore missing blood.
|
|
/// </summary>
|
|
[DataField("ModifyBloodLevel")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float ModifyBloodLevel = 0.0f;
|
|
|
|
/// <remarks>
|
|
/// The supported damage types are specified using a <see cref="DamageContainerPrototype"/>s. For a
|
|
/// HealingComponent this filters what damage container type this component should work on. If null,
|
|
/// all damage container types are supported.
|
|
/// </remarks>
|
|
[DataField("damageContainer", customTypeSerializer: typeof(PrototypeIdSerializer<DamageContainerPrototype>))]
|
|
public string? DamageContainerID;
|
|
|
|
/// <summary>
|
|
/// How long it takes to apply the damage.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("delay")]
|
|
public float Delay = 3f;
|
|
|
|
/// <summary>
|
|
/// Delay multiplier when healing yourself.
|
|
/// </summary>
|
|
[DataField("selfHealPenaltyMultiplier")]
|
|
public float SelfHealPenaltyMultiplier = 3f;
|
|
|
|
/// <summary>
|
|
/// Sound played on healing begin
|
|
/// </summary>
|
|
[DataField("healingBeginSound")]
|
|
public SoundSpecifier? HealingBeginSound = null;
|
|
|
|
/// <summary>
|
|
/// Sound played on healing end
|
|
/// </summary>
|
|
[DataField("healingEndSound")]
|
|
public SoundSpecifier? HealingEndSound = null;
|
|
}
|
|
}
|