Files
tbd-station-14/Content.Server/Singularity/Components/SinguloFoodComponent.cs
rokudara-sen 8b7f175f84 Added decelerator percentage drain (#35643)
* Added variable PercentageDrain to SinguloFoodComponent

* Set percentageDrain to 0.03 (3%) for anti particles

* Added percentageDrain logic in public OnConsumed

* Simplify SinguloFoodComponent and set percentageDrain to negative

* EnergyFactor now applies to positive values too

* Better commenting on EnergyFactor

* Update Content.Server/Singularity/Components/SinguloFoodComponent.cs

* Documentation of EnergyFactor

* Fixing spelling mistake

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-03-03 11:37:28 -05:00

26 lines
863 B
C#

namespace Content.Server.Singularity.Components
{
/// <summary>
/// Overrides exactly how much energy this object gives to a singularity.
/// </summary>
[RegisterComponent]
public sealed partial class SinguloFoodComponent : Component
{
/// <summary>
/// Flat adjustment to the singularity's energy when this entity is eaten by the event horizon.
/// </summary>
[DataField]
public float Energy = 1f;
/// <summary>
/// Multiplier applied to singularity's energy.
/// 1.0 = no change, 0.97 = 3% reduction, 1.05 = 5% increase
/// </summary>
/// /// <remarks>
/// This is calculated using the singularity's energy level before <see cref="Energy"/> has been added.
/// </remarks>
[DataField]
public float EnergyFactor = 1f;
}
}