Stasis bed cleanup and bugfixes. (#38762)
* Stasis bed sent to shed * Code Review * Code Review 2
This commit is contained in:
20
Content.Shared/Body/Systems/SharedMetabolizerSystem.cs
Normal file
20
Content.Shared/Body/Systems/SharedMetabolizerSystem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Content.Shared.Body.Events;
|
||||
|
||||
namespace Content.Shared.Body.Systems;
|
||||
|
||||
public abstract class SharedMetabolizerSystem : EntitySystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Updates the metabolic rate multiplier for a given entity,
|
||||
/// raising both <see cref="GetMetabolicMultiplierEvent"/> to determine what the multiplier is and <see cref="ApplyMetabolicMultiplierEvent"/> to update relevant components.
|
||||
/// </summary>
|
||||
/// <param name="uid"></param>
|
||||
public void UpdateMetabolicMultiplier(EntityUid uid)
|
||||
{
|
||||
var getEv = new GetMetabolicMultiplierEvent();
|
||||
RaiseLocalEvent(uid, ref getEv);
|
||||
|
||||
var applyEv = new ApplyMetabolicMultiplierEvent(getEv.Multiplier);
|
||||
RaiseLocalEvent(uid, ref applyEv);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user