Refactor Flammable to be ECS. (#4671)
- Refactor IHotItem into IsHotEvent. - Refactor IFireAct into TileFireEvent.
This commit is contained in:
committed by
GitHub
parent
9bde39c533
commit
6cea9cb973
20
Content.Server/Nutrition/EntitySystems/SmokingSystem.cs
Normal file
20
Content.Server/Nutrition/EntitySystems/SmokingSystem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Content.Server.Nutrition.Components;
|
||||
using Content.Shared.Smoking;
|
||||
using Content.Shared.Temperature;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Nutrition.EntitySystems
|
||||
{
|
||||
public class SmokingSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<SmokingComponent, IsHotEvent>(OnIsHotEvent);
|
||||
}
|
||||
|
||||
private void OnIsHotEvent(EntityUid uid, SmokingComponent component, IsHotEvent args)
|
||||
{
|
||||
args.IsHot = component.CurrentState == SharedBurningStates.Lit;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user