Event-ify Rejuvenate (#11145)
This commit is contained in:
@@ -4,6 +4,7 @@ using Robust.Shared.Random;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Rejuvenate;
|
||||
|
||||
namespace Content.Server.Nutrition.EntitySystems
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
_sawmill = Logger.GetSawmill("thirst");
|
||||
SubscribeLocalEvent<ThirstComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovespeed);
|
||||
SubscribeLocalEvent<ThirstComponent, ComponentStartup>(OnComponentStartup);
|
||||
SubscribeLocalEvent<ThirstComponent, RejuvenateEvent>(OnRejuvenate);
|
||||
}
|
||||
private void OnComponentStartup(EntityUid uid, ThirstComponent component, ComponentStartup args)
|
||||
{
|
||||
@@ -47,6 +49,11 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
args.ModifySpeed(mod, mod);
|
||||
}
|
||||
|
||||
private void OnRejuvenate(EntityUid uid, ThirstComponent component, RejuvenateEvent args)
|
||||
{
|
||||
ResetThirst(component);
|
||||
}
|
||||
|
||||
private ThirstThreshold GetThirstThreshold(ThirstComponent component, float amount)
|
||||
{
|
||||
ThirstThreshold result = ThirstThreshold.Dead;
|
||||
|
||||
Reference in New Issue
Block a user