Files
crystall-punk-14/Content.Server/Chemistry/ReagentEffects/AdjustTemperature.cs
mirrorcult 181fd055ce Adds metabolism effects to pretty much every chem already in the game (#5349)
* pass 1

* a little more reagent effect for breakfast

* move lots of stuff around

* implements all medicines

* implement all cleaning & elements

* implement toxins/pyrotechnic

* p

* linter fixies

* fixes + narcotic balancing

* fix and standardize

* reviews

* things
2021-11-20 16:47:53 -07:00

23 lines
751 B
C#

using Content.Server.Temperature.Components;
using Content.Server.Temperature.Systems;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Chemistry.ReagentEffects
{
public class AdjustTemperature : ReagentEffect
{
[DataField("amount")]
public float Amount;
public override void Metabolize(ReagentEffectArgs args)
{
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out TemperatureComponent temp))
{
var sys = args.EntityManager.EntitySysManager.GetEntitySystem<TemperatureSystem>();
sys.ChangeHeat(args.SolutionEntity, Amount, true, temp);
}
}
}
}