Refactors smoking to ECS, smoking actually makes you inhale reagents. (#4678)

This commit is contained in:
Vera Aguilera Puerto
2021-09-26 15:19:00 +02:00
committed by GitHub
parent 0767bd3777
commit f913d8361d
19 changed files with 284 additions and 150 deletions

View File

@@ -0,0 +1,27 @@
using Content.Server.Nutrition.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Smoking;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Nutrition.Components
{
[RegisterComponent, Friend(typeof(SmokingSystem))]
public class SmokableComponent : Component
{
public override string Name => "Smokable";
[DataField("solution")]
public string Solution { get; } = "smokable";
/// <summary>
/// Solution inhale amount per second.
/// </summary>
[DataField("inhaleAmount")]
public ReagentUnit InhaleAmount { get; } = ReagentUnit.New(0.05f);
[DataField("state")]
public SmokableState State { get; set; } = SmokableState.Unlit;
}
}