Files
OldThink/Content.Shared/Chemistry/DefaultMetabolizable.cs
Acruid ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08:00

25 lines
788 B
C#

using Content.Shared.Interfaces.Chemistry;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry
{
//Default metabolism for reagents. Metabolizes the reagent with no effects
public 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);
}
}
}