2024-06-30 05:43:43 +02:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
2025-05-23 12:32:22 -04:00
|
|
|
namespace Content.Shared.EntityEffects.EffectConditions;
|
2024-06-30 05:43:43 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Requires the target entity to be above or below a certain temperature.
|
|
|
|
|
/// Used for things like cryoxadone and pyroxadone.
|
|
|
|
|
/// </summary>
|
2025-05-23 12:32:22 -04:00
|
|
|
public sealed partial class Temperature : EventEntityEffectCondition<Temperature>
|
2024-06-30 05:43:43 +02:00
|
|
|
{
|
|
|
|
|
[DataField]
|
|
|
|
|
public float Min = 0;
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public float Max = float.PositiveInfinity;
|
|
|
|
|
|
|
|
|
|
public override string GuidebookExplanation(IPrototypeManager prototype)
|
|
|
|
|
{
|
|
|
|
|
return Loc.GetString("reagent-effect-condition-guidebook-body-temperature",
|
|
|
|
|
("max", float.IsPositiveInfinity(Max) ? (float) int.MaxValue : Max),
|
|
|
|
|
("min", Min));
|
|
|
|
|
}
|
|
|
|
|
}
|