Makes repairable component able to heal a set amount of damage (#6852)

This commit is contained in:
SplinterGP
2022-02-23 21:00:39 -03:00
committed by GitHub
parent bee627ac6a
commit 351c518582
2 changed files with 23 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared.Damage;
using Content.Shared.Tools;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -9,6 +10,16 @@ namespace Content.Server.Repairable
[RegisterComponent]
public sealed class RepairableComponent : Component
{
/// <summary>
/// All the damage to change information is stored in this <see cref="DamageSpecifier"/>.
/// </summary>
/// <remarks>
/// If this data-field is specified, it will change damage by this amount instead of setting all damage to 0.
/// in order to heal/repair the damage values have to be negative.
/// </remarks>
[ViewVariables(VVAccess.ReadWrite)] [DataField("damage")]
public DamageSpecifier? Damage;
[ViewVariables(VVAccess.ReadWrite)] [DataField("fuelCost")]
public int FuelCost = 5;