CatStation/Content.Shared/Temperature/TemperatureEvents.cs
Princess Cheeseballs 2e9c4c0103
IHeatContainers for TemperatureComponent (#42785)
* Hope I'm not forgetting anything...

* They call me the sender the way I'm sending it.

* remove commented out YAML

* last of the slop

* fix test fails

* first batch of test fails

* no more test fails

* make cryo pods work again.

* Make cryo work better-er

* I didn't like that a firesuit helmet was so effective on its own so I decided to be a dick about it.

* review.com

* oop

* actually real quick do this

* fix YAML issues

* IHeatContainer my beloved <3

* borger

* not networked :(

* jackets

* burgeewqjfrwjkhaskfjfsahjkfsahjkfsahjkfsajhkfsa

* utter yaml nonsense

* phishing

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-07-26 07:56:44 +00:00

30 lines
1.1 KiB
C#

using Content.Shared.Inventory;
namespace Content.Shared.Temperature;
/// <summary>
/// This event is raised before heat is exchanged so that the conductance of the exchange can be changed.
/// </summary>
[ByRefEvent]
public record struct BeforeHeatExchangeEvent() : IInventoryRelayEvent
{
public SlotFlags TargetSlots { get; } = ~SlotFlags.POCKET;
/// <summary>
/// A multiplicative modifier for heat transfers on the entity this event is being raised to.
/// </summary>
public float HeatTransferModifier = 1f;
}
/// <summary>
/// This event is raised after heat is exchanged to inform other systems that temperature has changed.
/// </summary>
/// <param name="CurrentTemperature">Current temperature of this entity.</param>
/// <param name="LastTemperature">Previous temperature of this entity.</param>
[ByRefEvent]
public record struct TemperatureChangedEvent(float CurrentTemperature, float LastTemperature)
{
public readonly float CurrentTemperature = CurrentTemperature;
public readonly float LastTemperature = LastTemperature;
public readonly float TemperatureDelta = CurrentTemperature - LastTemperature;
}