Files
tbd-station-14/Content.Shared/Chemistry/DefaultMetabolizable.cs
Tyler Young de274de9e3 use CannyFastMath in various places even where it might not be any different
also update a bunch of packages

clean up redundant YamlDotNet references
2020-06-14 09:36:53 -04:00

27 lines
863 B
C#

using Content.Shared.Interfaces.Chemistry;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry
{
//Default metabolism for reagents. Metabolizes the reagent with no effects
class DefaultMetabolizable : IMetabolizable
{
//Rate of metabolism in units / second
private double _metabolismRate = 1;
public double MetabolismRate => _metabolismRate;
void IExposeData.ExposeData(ObjectSerializer serializer)
{
serializer.DataField(ref _metabolismRate, "rate", 1);
}
ReagentUnit IMetabolizable.Metabolize(IEntity solutionEntity, string reagentId, float tickTime)
{
return ReagentUnit.New(MetabolismRate * tickTime);
}
}
}